Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
3D Animation - Page 2 — Gideros Forum

3D Animation

24

Comments

  • oleg said:

    PaulH said:

    The only "new release" listings I've seen lately were lists of very few new or recently updated apps hand picked by app store editors. That may be different in different regional versions of the stores, though.

    AppBrain reports that I see my game appearing in the New Games section in all countries.
    https://developers.appbrain.com
    So this section is available in all countries
    Perhaps it varies with app store versions or game categories. When I browse under "new" in Google Play, I see a small number (less than 10) in each of a handful of categories. Even that small number isn't all new games, but includes some recently updated games.
    My last new release never showed up in any of those listings. It showed up briefly on a "trending" list for the word games category, but it took about 8 or 10 taps and swipes in the app store to drill down to see that listing.

    If your games are making it onto the short list of new games, that's fantastic. But my experience this year was getting around 100 downloads in a couple days and a 4.9 star average rating, and yet except for the day or two it showed up on "trending", it didn't show up on the store listings at all. Literally the only way you can find that app on the store is to search for it by name, which means the store isn't creating any opportunity at all for new users to discover it.
  • @PaulH nice insights on 3D. I agree, Unity (and Unreal Engine) are very thick ;)
  • I had about $10,000 in Amazon ads and promotion given to me once - didn't make the slightest bit of difference.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • PaulH said:

    oleg said:

    PaulH said:

    The only "new release" listings I've seen lately were lists of very few new or recently updated apps hand picked by app store editors. That may be different in different regional versions of the stores, though.

    AppBrain reports that I see my game appearing in the New Games section in all countries.
    https://developers.appbrain.com
    So this section is available in all countries
    Perhaps it varies with app store versions or game categories. When I browse under "new" in Google Play, I see a small number (less than 10) in each of a handful of categories. Even that small number isn't all new games, but includes some recently updated games.
    My last new release never showed up in any of those listings. It showed up briefly on a "trending" list for the word games category, but it took about 8 or 10 taps and swipes in the app store to drill down to see that listing.

    If your games are making it onto the short list of new games, that's fantastic. But my experience this year was getting around 100 downloads in a couple days and a 4.9 star average rating, and yet except for the day or two it showed up on "trending", it didn't show up on the store listings at all. Literally the only way you can find that app on the store is to search for it by name, which means the store isn't creating any opportunity at all for new users to discover it.
    Through google I see the top 100, and through appBrian I see the top 500 games.
    The game often crashes out of rating and reappears
    The game rises by 20 points every day or drops by 20 points
    I guess about 20 new games are added to the section every day so rating is jumping ..
    image
    111.PNG
    962 x 586 - 26K
    111.PNG 25.7K
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • I had about $10,000 in Amazon ads and promotion given to me once - didn't make the slightest bit of difference.

    Amazon store does not give a boost to the game, opera store gives a small start boost, google gives a boost if your game in the top 50

    Likes: SinisterSoft

    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
    +1 -1 (+1 / -0 )Share on Facebook
  • @oleg Is the opera store any good?
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • olegoleg Member
    edited December 2019

    @oleg Is the opera store any good?

    The opera gives ~30,000 downloads for new games

    For old applications there is no use.

    Likes: SinisterSoft

    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
    +1 -1 (+1 / -0 )Share on Facebook
  • Apollo14Apollo14 Member
    edited December 2019
    as I see it, there's organic traffic
    oleg said:

    I had about $10,000 in Amazon ads and promotion given to me once - didn't make the slightest bit of difference.

    Amazon store does not give a boost to the game, opera store gives a small start boost, google gives a boost if your game in the top 50
    What is url of Opera store? (I can't find it in Google)
    They're renamed to apps.bemobi.com ?
    > Newcomers roadmap: from where to start learning Gideros
    "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
    “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
  • Is Samsung Galaxy store good?
    https://developer.samsung.com/galaxy/faq/how-can-I-publish-my-app-in-the-Galaxy-Store
    (probably it's worth trying, but their SDK is required)
    > Newcomers roadmap: from where to start learning Gideros
    "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
    “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
  • olegoleg Member
    edited December 2019
    Apollo14 said:

    Is Samsung Galaxy store good?
    https://developer.samsung.com/galaxy/faq/how-can-I-publish-my-app-in-the-Galaxy-Store
    (probably it's worth trying, but their SDK is required)

    Me samsung not liking, there moderators morons .. They require that the game be similar to other games.
    And after the game fulfilled all the requirements of the moderators -samsung did not give any download
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • olegoleg Member
    edited December 2019
    Apollo14 said:

    as I see it, there's organic traffic

    oleg said:

    I had about $10,000 in Amazon ads and promotion given to me once - didn't make the slightest bit of difference.

    Amazon store does not give a boost to the game, opera store gives a small start boost, google gives a boost if your game in the top 50
    What is url of Opera store? (I can't find it in Google)
    They're renamed to apps.bemobi.com ?
    Opera store:
    http://android.oms.apps.bemobi.com/en_us/
    https://publishers.apps.bemobi.com/administrator/mng_products2/

    Likes: SinisterSoft

    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
    +1 -1 (+1 / -0 )Share on Facebook
  • Perhaps we need a fresh thread to discuss the current challenges of app marketing and monetization.

    But to bring this thread back the 3D animation itself, I'm really eager to try out animated models like @hgy29 shared. For my current project I'm currently trying to decide whether to use animated models when the support is there, or use my current workaround.

    So far I'm just taking my 3D models apart, making separate meshes for each part, and making them children of each other. For example, I can take a fishing rod, make one object out of the handle, make the next section of the rod a child of that, and so on down to the tip of the rod, scaling each down to make the rod taper realistically, add a reel as a child of the handle, and a crank as a child of the reel. Then I can rotate each segment independently to flex the rod, turn the reel, etc.

    That works great for mechanical things, like an outboard motor and steering wheel on a boat that rotate as you steer. It wasn't hard to build an electric trolling motor that way on a hinging mount that works like the real thing, to pivot an arm on the mount and deploy the motor into the water or fold it up on the deck, etc.

    Biological things don't lend themselves to this method as well, but it's possible. With a fish, I can make one mesh from the head, with a child for the jaw, and another child for the middle of the body, and another child for the tail. Then I can set the rotation of each child to make the fish swim or flop, open and close its mouth, etc. The results look fine for my purposes:



    I'll share sample code if anyone would like it.

    When it comes to animating people, it's gets much trickier. I could break up a human model into a separate child model for each major bone. It's a lot more work, and the end result wouldn't look so great since a lot of joints pivot on more than one axis at once, among other complications. I can pull it off well enough for my purposes, but it would be great to be able to drop in animated models and select a posed frame, and individual vertices can be effected by multiple bones, so you get a contiguous surface, rather than a set of overlapping but otherwise separate segments.

    So @hgy29, any idea when support for 3D models might be included in Gideros? Or do you have any experimental code for that you'd be willing to share?

    Thanks,

    Paul


    anim_demo.gif
    400 x 219 - 737K

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited December 2019
    @PaulH I believe @hgy29 is busying himself making it available in the next release, don't push him too hard :) .
    Your animations look so real, I can't wait to dive more into 3D. I would welcome anything that would ease the process like some sample code ;)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • plicatibuplicatibu Member
    edited December 2019
    PaulH said:

    Yes, I make my living from my apps.

    @PaulH I'm glad to hear this. I hope be able to say the same some day.
  • Apollo14Apollo14 Member
    edited December 2019
    any idea when support for 3D models might be included in Gideros?
    AFAIK guys create 3D skeletal animation in Maya/Blender, then export it to game engines. Ready-made skeletal animations (like mixamo.com) are widely used.

    For supporting such things somebody would have to check Maya/Blender's export format.
    (but I'm not saying it's good idea, I'm still adept of 2D :D )
    > Newcomers roadmap: from where to start learning Gideros
    "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
    “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
  • hgy29hgy29 Maintainer
    @PaulH, yes next release will have animated models supports and sample code (using a lua lib I wrote whose api is subject to change). It will use models in g3dj format (libgdx json), but à tool for converting fix models to g3dj will be supplied.

    I am not finished yet with 2019.12: shadows and instancing don’t work yet in Metal nor DX, and I’d like to support them. But I want to release 2019.12 before the end of next week, so I may just let it out as it is now if I don’t manage to fix it in time.

    Meanwhile, I can send you a link to download 2019.12 preview.

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • @hgy29, can you provide the steps involved in getting a model into the format that will work for the 3D animation code? The sample works perfectly, but I've been unable to get any custom animated model to work.

    To try to work out the simplest case, I made a rectangle in Blender, linked to an armiture, and added a couple key frames, basically making a block that folds. I exported that to FBX, and used fbc-conv-win32.exe to export it to a JSON file.

    The resulting file includes both the model and the animation. I see in your example that you have the animations exported as separate files. Is there a step in the export process that produces the separate files?

    I've separated them manually, with the animation file containing empty elements except for the nodes and animation elements, and emptied the animation element of the model file, and generally trying to have content correspond to the example JSON files.

    The resulting files load without error in buildGdx(). But on the D3DAnim.tick() call, I get this error:

    3d_library/3DAnimation.lua:11: attempt to index local 'b' (a boolean value)

    I've traced this back to where the table animBones, originally populated with booleans, has each boolean replaced with a table with bone details. That happens in G3DFormat.lua at line 210. Using my model, the entry for the armature itself (the top level object, parent to the bones) the boolean never gets replaced, and I suspect that's the boolean that the code later tries to treat like a table. I see my exported animation doesn't include a bone entry for the top level (the armature itself.) I've been experimenting with manual edits to the exported JSON, but I'm not getting very far.

    It seems there must be some specific option I'm missing in the process of exporting the FBX file from Blender, or an option I'm missing in the fbc-conv step, or another step that correctly splits the export into separate files for the model and the animations.

    Can you walk me through your process for the Blender export, the command line options you use for the JSON conversion, and any other steps needed to make the animation compatible with your code?

    Thanks!

    Paul

    Likes: MoKaLux, antix

    +1 -1 (+2 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    edited December 2019
    Hi @PaulH, I am not talented enough to create my own models, I know how to launch blender but not really how to use it. I got my models in FBX format from a Kenney package, with animations included but separated from the main model. I converted those fbx files into g3dj with the fbxconv utility (I think the only switch you have to use is the one the invert UV mapping, but that would depend on your design tool).

    Having animations separated from the model is actually more annoying then having all in the same file, because you may end up with duplicate things. In my fbx files, the skeleton was in each file, but not in the same pose, which was confusing.

    My loader code will parse the json file and extract several parts:
    - the skeleton structure and pose (binding pose)
    - the model structure and meshes
    - the animations if any

    So, in theory, all you need is a single file containing your model, your skeleton in its bind pose, and your animations. From the error you have, I agree with you: either the skeleton is missing or bones names do not match. I will experiment a bit with blender...

    PS: I found this, which should apply to gideros for the blender/fbx part: https://wiki.unrealengine.com/Creating_a_Skeletal_Mesh_in_Blender#Export_Skeletal_Mesh
  • Thanks. I'm now trying to get it working with a single file. The loaded file does contain everything (model, armature and animations) but the table animBones still gets bones assigned to boolean values, rather than the tables with the bones. In the Blender manual section on FBX files I found:

    Animations (FBX AnimStacks, Blender actions) are not linked to their object, because there is no real way to know which stack to use as ‘active’ action for a given object, mesh or bone. This may be enhanced to be smarter in the future, but it’s not really considered urgent, so for now you’ll have to link actions to objects manually.

    That may be my issue, since there seems to be a disconnect between the model and the animation. I'm trying to hunt down where in the JSON file or the code that link might be made.
  • hgy29hgy29 Maintainer
    If you can send me your json file, I can check too what is going wrong. And if you can share one of your blender file, I can try to tinker with the export options and see what we can achieve.
  • hgy29hgy29 Maintainer
    Thinking of it, you shouldn’t end up with booleans, even with unresolved bones. Are you sure you use the output of g3dbuild, and not directly the return value of buildGdx ? Basically buildGdx parse the json file into an intermediate representation (the g3d format), which is then fed into G3DFormat function to generate actual gideros objects.
  • I'd certainly appreciate your taking a look. I've been using buildGdx() as the example does, just loading my own files rather than the ones used in the example. I've dumped the data at various points and it seems it's building the object from the intermediate file. But where it assigns the bones in the animBones table, it's assigning them to top.bones[v.node], which (when using my JSON file) contains "true" rather than the bone details.

    What I'm seeing in buildG3D(g3d,mtls,top) is that only where g3d.type=="group" does g3d contain the "parts" table, and the parts table contains the hierarchy of bones. When it's called for a g3d.type of "mesh", g3d.parts isn't there, and no other data passed into buildG3DObject() contains the full details of the bones. The top.bones table is indexed by bone names, but contains a boolean for each.

    The blend file, plus the texture and JSON export are in http://www.pishtech.com/flexing_box.zip

    The material name is MaterialOne, and the only valid animation index is 1, so I'm loading it with code like this:

    local m=buildGdx("Models/flexing_box.json",{
    ["MaterialOne"]={
    textureFile="Skins/square.png"
    }
    })

    D3Anim.setAnimation(m,m.animations[1],"idle",true)

    Apart from that, I'm using the code from the sample, just never changing from the idle to walking animations.

    Thanks.
  • I've uploaded a copy of the sample project, altered to use my model, texture and animation, and to use local copies of the 3D library source files. It's at http://www.pishtech.com/3d_experiment.zip

    The main project I'm working with is cluttered with a lot of points where I'm dumping the contents of data structures to files, etc., and a lot of my notes. But this less-edited project has the issue where the animBones table gets populated with booleans.

    Paul
  • hgy29hgy29 Maintainer
    Hi @PaulH, I think I found the issue, my code was expecting bones to be discovered before meshes, but it had no guarantee of that (they are all in a lua table whose sorting order is unspecified). I fixed it, try the G3DFormat file attached.
    lua
    lua
    G3DFormat.lua
    10K
  • That works! Thank you! My Blender model is now animated! I'm going to try exporting a more complicated model now and see how that goes.

    I have a question about the custom shader: Is it possible to use this code without the shader, or is this shader specialized in a way that OpenGL expects for every animated model? Ideally I'd like to be able to use various shaders, or just the Gideros default, on animated models. I've tried altering the code to not apply the shader, but then the code says the model in not animatable.
  • hgy29hgy29 Maintainer
    The shader does the animation. In fact OpenGL, since programmable pipeline was introduced, is more like a driver to the GPU. It is the shader code that dicatets what to do with vertices, texture coordinates, animation data and so on.

    The lua code in 3DAnimation compute matrices used by the shader, but it is the shader that applies transformations to the mesh.
  • I gathered it may be something like that. I suppose it's possible to alter the lighting aspects of the shader, to reduce the effect of the dynamic light in favor of the ambient light. As things are now I can increase the ambient light, even to 1.0, but the shader still adds highlights, brightening the faces with normals aligned with the light source. While the lighting effects of the shader add a lot of depth to the model, it also makes the edges of the larger polygons really stand out.

    My model basically looks way too shiny for a human being, but that may be something I can fix by altering the material of the model itself.

    I'm happy to say the code now works fine even with a more complicated animated model. Here's a fisherman with 5,000 vertices, going through animations for walking, casting, reeling, landing a fish, driving a boat with a tiller control, and driving a boat with a steering wheel.

    image

    The polygon edges could be made much more subtle by smoothing the model itself in Blender, but that would multiply the number of polygons and multiply the load on the GPU.

    A feature I'd really like would be the ability to specify a particular frame to pose to in the tick() function. That's helpful for things like posing a model for driving. You can have a key frame where the model is posed turning the wheel far to the left, and then animate to another key frame where the model is turning the wheel far to the right. Then to animate driving, rather than play an animation in a loop, you can pick a frame somewhere in between, to get the character posed with the wheel in any position, to match the way the player is steering.

    I've played with that a little now, adding an optional frame parameter to tick(), passing that on to .animate(), and when it's set, using that rather than the clock to set the variable dtm. It looks like it should work fine, once I get the math right.

    Once again, @hgy29, thank you for all your work on this!

    Paul

    Likes: antix, MoKaLux

    +1 -1 (+2 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    Wow, nice work Paul! Feel free to improve the 3DLib, it will benefit to everyone.
    The highlight can be changed (specular value) in the shader, all we need is to make it configurable from lua, through a shader constant.
  • Thanks. I'll try making more shader values configurable through the library, and see if I can get the ability to pose to a particular frame working better.

    One issue I have on my end is that my model has just a single animation that contains all the sequences of motion. I should probably split them into separate animations in the Blender file.

    On another note, I thought this method of animation wouldn't allow code driven overrides of parts of the poses, but I see now it will be possible to add it.

    When I used that fisherman model in a Windows game years ago, besides playing the configured animations, I used to pose some bones in the armature directly from the code. For example, if the model is cycling through the frames that have him holding a fishing rod with one hand and cranking a reel with the other, I could rotate the waist in one direction and the neck the other, having the effect of swinging the arms and shoulders to one side or the other. Then I could rotate the shoulder bones up or down relative to the rest of the model. That let the player move the rod in any direction while the animation continued to work, and continued to look human, keeping the arms and hands aligned with the model of the fishing rod and reel.

    After a little experimentation, I'm thinking of adding a function to override the rotation of certain bones. It could store or clear a table of override values (for rotation, scale and translation) for each bone. Then the code in animate() that applies the animation frame could apply the override value, if any. If the overriding values are stored in bone.srtoverride, then this change would apply the overrides when present, or the animated pose otherwise:

    local cm={ s=nf.srtoverride.scale or f.scale or nf.srt.s, r=nf.srtoverride.rotation or f.rotation or nf.srt.r, t=nf.srtoverride.translation or f.translation or nf.srt.t}

    I tried applying that to one bone, to programatically raise the characters left arm, and it works fine. Adding the interface to do that to the library will take more work, but I'm really happy to see it's feasible.

    There will be some more work to make an animated model able to "hold" another model. Without animation, I'd just make a sprite containing each model, and make one the child of another. With animation we'll need a way to get the translation, rotation, and scale of a bone in the model in the current pose, so the carried object can be positioned and rotated to match a movable body part. I'll mess around with that at some point, but I think it should be possible.

    Paul

  • It's not only possible to make an animated model hold something, but it's really simple, far easier than it was in the 3D engine I used years ago for Windows. You can just make an object a child of the bone in question:

    model.bones["RGrip"]:addChild(right_hand_holding)
    model.bones["LGrip"]:addChild(left_hand_holding)

    Since my model has bones called LGrip and RGrip, positioned where an object would be held in each hand, these lines of code will put any sprite (including a model) into the hands of the moving model. If I add a fishing rod as a child of one hand or the other, it moves with the actions of the animated model, and can easily remove the rod from one hand and add it to the other:

    image

    Accessing the member variables of the model directly like that isn't a good practice, so I'll probably add a member function to return specified bone.

    The 3D animation support @hgy29 added can be a hugely helpful tool even for 2D game development. I'm currently considering making two new fishing games with these models - one in 3D with a high level of detail to appeal to people who really fish, and a second more casual game in 2D. In exploring that I wrote a tool with Gideros to load each of the 3D models I'd need, pose the animated ones at each frame of each action I'd use, view them from whatever perspective the 2D game would use, then draw them to a render target and save the image. That automates the creation of the sprites I'd need for the 2D game.

    Here's a 2D prototype using sprites generated from 3D models:

    image

    For those like myself, who don't have much talent for drawing, let alone drawing animations, being able to efficiently make sprites from models is tremendously helpful.
    +1 -1 (+4 / -0 )Share on Facebook
Sign In or Register to comment.