@hgy29:
I've been working on a 2D/3D hybrid game, and ran into an issue with the 3D animation that effects my app as well as the 3D-Anim sample application. If I do a full export to Android, it just crashes. If I export as a player and run there, I get this error:
GL_OES_texture_view GL_EXT_fragment_invocation_density GL_QCOM_validate_shader_binary GL_QCOM_YUV_texture_gather "
glsl
FragmentShader:
ERROR: 0:19: 'sampler2DShadow' : Reserved word.
ERROR: 0:19: 'sampler2DShadow' : Syntax error: syntax error
INTERNAL ERROR: no main() function!
ERROR: 2 compilation errors. No code generated.
stack traceback:
3dbase/3DLighting.lua:74: in function 'getShader'
3dbase/3DLighting.lua:109: in function 'setSpriteMode'
3dbase/3DShapes.lua:32: in function 'updateMode'
main.lua:23: in main chunk
This only seems to happen for apps that don't use animated 3D meshes. I've tried with version 2020.5.1, but not yet with 2020.7.
Any ideas?
Paul
Comments
The 3D animation is really helpful for my current project. I'm working on a new game using 3D assets for 2D gameplay. The game poses and animates 3D models, drawing them onto RenderTargets to create sprites, then using those for all the real-time graphics. The goal to get 3D-like graphics in a 2D game that can run well even on older devices.
Thanks again,
Paul
Likes: antix
Paul
The steps I used were:
Export the model from Blender as an FBX file.
Copy it to a folder with the fbx converter tool.
Use this command line to convert the fbx model to a JSON file, assuming you exported a file called the_model.fbx, and want to create the_model.json:
fbx-conv-win32 -v -o G3DJ the_model.fbx the_model.json
In Gideros, see the 3d-anim example. Load the_model.json the same way. Don't load the animations separately - they are included within the model.
When calling setAnimation, the example uses the parameter "main". That's arbitrary, and is just used as an internal index. So use one that's
unique to each animation, i.e. a name of what the animation does.
Likes: MoKaLux, antix
Please find my simple 3d animation json file which output looks very similar to the original 3d animation demo.
Some help please please please
What I have tried among other things:
3dbase/3DAnimation.lua:11: attempt to index local 'b' (a boolean value)
stack traceback:
3dbase/3DAnimation.lua:11: in function 'updateBones'
3dbase/3DAnimation.lua:112: in function 'tick'
main.lua:78: in function
What is supposed to be in local name=b.name?
blender 2.91 fbx-conv_2020_03 gideros 2020.11.1
Likes: MoKaLux
Also scale down your model
Likes: MoKaLux
IT IS MOVING
Likes: MoKaLux