Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
Crash on Android running 3D-Anim sample - Gideros Forum

Crash on Android running 3D-Anim sample

@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

  • hgy29hgy29 Maintainer
    Accepted Answer
    I had a similar issue recently and I had to tinker with the shader code. I didn’t push my changes to 2020.7 though, since I was unsure. I will try to recover them. The issue is related to shadows, it should disappear if you disable shadows.
  • PaulHPaulH Member
    Thanks! I just commented out the SHADOWS line in 3DLighting.lua and it works fine. For my purposes, that's just fine.

    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

    +1 -1 (+1 / -0 ) Share on Facebook
  • MoKaLuxMoKaLux Member
    @PaulH could you help me (us) exporting animations from blender. I tried it but I don't know how to set up blender to export my anims to use in gideros :-(
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • MoKaLuxMoKaLux Member
    a quick tuto could be really helpful.
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • PaulHPaulH Member
    I'll see what I can come up with. I exported my models late last year, then put this project on hold until a couple months ago. I just had a look at my notes from when I got the exported models working and I see I'm missing a step or two, so I'll have to figure that out again myself.

    Paul

  • PaulHPaulH Member
    Maybe my notes were complete after all. They use an external tool, fbx-conv: https://github.com/libgdx/fbx-conv

    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

    +1 -1 (+2 / -0 ) Share on Facebook
  • MoKaLuxMoKaLux Member
    super cool, thanks PaulH.
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
Sign In or Register to comment.