Vortex2 beta released - 3D module

JaviCervera

Member
3rd Party Module Dev
Joined
Jul 12, 2017
Ok, we've already been talking there. The uniform limit is exceeded by the default amount of bones supported. You can adjust it to the max used on your game, and I might add to the TODO list the option to perform vertex skinning on software if even with that you GPU is not capable of dealing with that amount of uniforms.
 

RonTek

Member
Joined
Jun 22, 2017
Now gettings this error with the latest. I configured Word.Init(0,50) which worked before and also set shader type to minimal

E/AndroidRuntime( 4325): java.lang.IllegalArgumentException: value == null
E/AndroidRuntime( 4325): at android.opengl.GLES20.glUniformMatrix4fv(Native Method)
E/AndroidRuntime( 4325): at com.monkeycoder.monkeygame.bb_opengl_gles20._glUniformMatrix4fv(MonkeyGame.java:3263)
E/AndroidRuntime( 4325): at com.monkeycoder.monkeygame.c_Renderer.m_SetShaderMat4(MonkeyGame.java:4329)
E/AndroidRuntime( 4325): at com.monkeycoder.monkeygame.c_ShaderUniforms.p_Prepare(MonkeyGame.java:4872)
E/AndroidRuntime( 4325): at com.monkeycoder.monkeygame.c_Shader.p__Prepare(MonkeyGame.java:4164)
E/AndroidRuntime( 4325): at com.monkeycoder.monkeygame.c_Shader.m__CurrentDefault(MonkeyGame.java:4171)
E/AndroidRuntime( 4325): at com.monkeycoder.monkeygame.c_Renderer.m_Setup3D(MonkeyGame.java:4374)
E/AndroidRuntime( 4325): at com.monkeycoder.monkeygame.c_Renderer.m_Init(MonkeyGame.java:4450)
E/AndroidRuntime( 4325): at com.monkeycoder.monkeygame.c_World.m_Init(MonkeyGame.java:5094)
E/AndroidRuntime( 4325): at com.monkeycoder.monkeygame.c_TestApp.p_OnCreate(MonkeyGame.java:3396)
E/AndroidRuntime( 4325): at com.monkeycoder.monkeygame.c_GameDelegate.StartGame(MonkeyGame.java:3474)
E/AndroidRuntime( 4325): at com.monkeycoder.monkeygame.BBGame.StartGame(MonkeyGame.java:558)
E/AndroidRuntime( 4325): at com.monkeycoder.monkeygame.BBAndroidGame.onDrawFrame(MonkeyGame.java:1367)
E/AndroidRuntime( 4325): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1523)
E/AndroidRuntime( 4325): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
 

JaviCervera

Member
3rd Party Module Dev
Joined
Jul 12, 2017
@RonTek: Thanks for the report. I will have access to a Galaxy Note II in a couple of weeks, so I will be able to make all kind of tests first hand and finally have a working version :)
 
Last edited:

RonTek

Member
Joined
Jun 22, 2017
@RonTek: Thanks for the report. I will have access to a Galaxy Note II in a couple of weeks, so I will be able to make all kind of tests first hand and finally have a working version :)
Ah no prob and good to know, thanks. You can also use emulators like Bluestacks or Memu. I use BStacks as one of my test devices as well. :)
 

FRedShift

New Member
Joined
Dec 9, 2017
Hi, I'm trying to convert some STL files with the meshtool. Only small models work, it crashes for the majority of them (Win10-64). I didn't count how many polygons are my models, neither look at sources yet. Oh and then I don't know what to ask ? fix it ! :) OK, let's have a look at the sources right now...
 

FRedShift

New Member
Joined
Dec 9, 2017
Not sure what I'm seeing? there is another meshtool.exe in vortex/data which converts fine my models but saves .msh.xml files. But I can't LoadMesh() these. CopperCube loads my models. some advice ?
 

RonTek

Member
Joined
Jun 22, 2017
Hey FRedShift, I think it's a 2 step process so once you got that converted to xml files, you need to use the mesh ui tool (meshtool.cxs) for the final .dat files. The command line version which you have used there to generate the xml files is build using the batch/script files (build_tools).

Hope that helps.
 

JaviCervera

Member
3rd Party Module Dev
Joined
Jul 12, 2017
The meshtool has not been uploaded recently. Previous versions of Vortex relied on an XML format for mesh loading, but it had several issues with large files (the XML parser I am using crashes). That's why I created the new binary format which loads much faster and is robust. The problem is that the UI based meshtool relies on an external app (the meshtool.exe program inside the data folder) to convert the meshes. That is a command line tool written in C++ that uses Irrlicht to read the mesh, and then generates the XML. Then the UI meshtool (written in Monkey) parses the XML and creates the binary format.

Of course, the XML step will be removed entirely in the final version, so the command line app will directly create the binary mesh, that you can view and tweak on the UI tool. That will fix the problem. Changing that is not in my current plans for beta2, but I could give it a higher priority, as long as I am capable of doing it in the 2-3 week deadline that I have for the beta2 release.
 
Last edited:

RonTek

Member
Joined
Jun 22, 2017
Thanks for the heads up Javi. I would assume that the binary format is still the same.

Quick question with Animation, how do I change sequence for models with multiple animations? Do I just combine all animations into one and set the first and last frame?
 

JaviCervera

Member
3rd Party Module Dev
Joined
Jul 12, 2017
@RonTek: The mesh format has changed slightly in the last commit, so you will need to reexport your meshes starting with beta2. It should be the last time that the format changes (and least, the last time when a change will make previous meshes incompatible).

Right now, you can load several animation file (.anm.dat) into one mesh, as long as the skeleton that it uses is the same for all animations, but you must keep track of the begin and end frames yourself. In the future, I might add the option to select a sequence name when you append an animation.

@FRedShift: I decided to take a look and see how long it would take to update the meshtool to not use the intermediate XML format, and it wasn't a lot of work. The last commit on Github now contains an updated meshtool that should not crash with huge meshes. I recommend you to wait for beta2 instead of using the Github version, since there may be API-breaking changes. Here's a screenshot of how meshtool looks on the new version:

meshtool.jpg
 

RonTek

Member
Joined
Jun 22, 2017
Ok got it, thanks. Can you post an example for the multiple anm.dat sequences?

I'm still having problems exporting a proper animation, perhaps you can provide the tool that you used for the dwarf and swat animated models before you convert it in xml format? What is the best format to use?
 

RonTek

Member
Joined
Jun 22, 2017
There seems to be a problem with the animation system as the models are deforming when playing. I have tested this on the latest commit as well (12/17/17), perhaps you need a complex animated model to test this out fully? I'll try to send one for testing.
 

JaviCervera

Member
3rd Party Module Dev
Joined
Jul 12, 2017
The meshtool is based on Irrlicht. Good mesh formats are .x and .b3d. The swat model was taken from DarkMATTER 1, and the dwarf model is taken from the Irrlicht examples. I can send those if you want.

I found a bug with scaling on the animations so I disabled scaling temporarily until I could take a look into it. Anyway, the amount of animated meshes that I have is limited, so having access to additional ones would be very welcome. If you could send it to me, I'll see what is failing and fix it.

Once it is fixed, I'll add multiple sequences and a new animation test.
 

RonTek

Member
Joined
Jun 22, 2017
Btw, could you post the quick fix for the scaling issue part? I'm trying to work on a demo and hopefully I could use vortex2 with animated models.

Thanks.
 
Top Bottom