3D Animation - Page 4 — Gideros Forum

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

3D Animation

• Maintainer
In the g3d format animation isn't handled frame by frame, but by effective time. You are counting keyframes, that is the moments in time where the movement change in direction (or orientation or size), that's not what you want. But you can get the animation length in the last keyframe (keytime field, given in ms), and multiply it by your fps to convert this in frames.

Likes: MoKaLux

+1 -1 (+1 / -0 )Share on Facebook
• Member
Thank you, didn't think of that way
my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
• Member
edited January 2021
SOLVED
In the g3d format animation isn't handled frame by frame, but by effective time. You are counting keyframes, that is the moments in time where the movement change in direction (or orientation or size), that's not what you want. But you can get the animation length in the last keyframe (keytime field, given in ms), and multiply it by your fps to convert this in frames.
For example I have this from the anim json file:
ANIMATION FRAMES 32
ANIMATION TIME 1033
How would I go to get the number of ticks needed to complete a whole animation?

Knowing that the animation was exported at 30fps (I believe) from mixamo and the app is configured to run at 30fps.

What is the math please ?
NUMBER OF TICKS = ANIMATION TIME / ANIMATION FRAMES
NUMBER OF TICKS = ANIMATION TIME / 30 (FPS)

The problem is I never get a full loop (either too long or to short)
 ```--for i = 1, self.totalframes do -- /1.3 magik? XXX for i = 1, self.totaltime/30 do -- /1.3 magik? XXX D3Anim.tick() self.imgid += 1 end```
SOLUTION: I wasn't getting the correct length of the animation. Each bone can have different animation length. So make sure you pick the longest keytime.
my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
• Member
oleg said:

Is it possible to animate the texture on a 3D model in Gideros?

For example I have such a texture of a caterpillar of a tank, and I need to make this texture a tile, and to shift all tiles of texture every frame

I have been re-reading this thread and maybe I can suggest another solution: you can animate your tank (rotating the wheels and the textures) and use your 3d model in gideros as an animation (fbx-conv to json). That should work

Likes: oleg

my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
+1 -1 (+1 / -0 )Share on Facebook
• Member
MoKaLux said:

oleg said:

Is it possible to animate the texture on a 3D model in Gideros?

For example I have such a texture of a caterpillar of a tank, and I need to make this texture a tile, and to shift all tiles of texture every frame

I have been re-reading this thread and maybe I can suggest another solution: you can animate your tank (rotating the wheels and the textures) and use your 3d model in gideros as an animation (fbx-conv to json). That should work
Animating a 3D grid will be much more expensive than animating a texture.
Also if you bake the animation in fbx - it will be impossible to connect physics so that the caterpillar reacts to the uneven surface of the earth.

my games:
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
• Member
edited June 2021
I have this error for 3D, I don't know if it's related to shaders, lighting, anim, ... ?

I tried to run r3d in html5, MS EDGE, windows 10

I tried disabling shadows and lighting but the same message comes up:
extension directive must happen before...

I can share the code (works well on windows 10, haven't tested on mobile yet!)
my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
• Maintainer
Yes, I stumbled across this one recently, a fix is on the way for this particular one

Likes: MoKaLux

+1 -1 (+1 / -0 )Share on Facebook
• Member
edited June 2021
I tried with new gideros 2021.6, it is working fine on windows 10 but not html5, this time I have this message:

No worries though, I will try deactivate lighting and shadows see if that works on html5

EDIT: tried without shadows, but crashes
my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories