Having issues with my my 3d model animation.

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Having issues with my my 3d model animation.

Postby Zen3001 » Tue Apr 03, 2018 12:28 pm

I'm using blender with nash's md3 script(viewtopic.php?f=37&t=35790)
to create the model.

I didn't see any error anywhere during the whole process, and the model does get spawned in gzdoom but the animation just doesn't work.

here's a download link for the blend file and the pk3.
Last edited by Zen3001 on Wed Apr 04, 2018 9:56 am, edited 1 time in total.
User avatar
Zen3001
Cannot the kingdom of salvation take me home?
Banned User
 
Joined: 25 Nov 2016
Location: some northern german shithole
Discord: #0629

Re: Having issues with my my 3d model animation.

Postby R4L » Tue Apr 03, 2018 2:50 pm

How many frames is the animation? If it is ten frames for example (0-9), then you have to make sure your MODELDEF contains all your frames in FrameIndex. 10 frames, so 10 FrameIndex entries.
User avatar
R4L
Barry Burton - I have THIS
 
Joined: 03 Mar 2017
Discord: R4L#4655
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: Having issues with my my 3d model animation.

Postby Zen3001 » Tue Apr 03, 2018 4:22 pm

just 3 frames
User avatar
Zen3001
Cannot the kingdom of salvation take me home?
Banned User
 
Joined: 25 Nov 2016
Location: some northern german shithole
Discord: #0629

Re: Having issues with my my 3d model animation.

Postby R4L » Tue Apr 03, 2018 4:31 pm

Okay, so you will need to add three FrameIndex entries. Something like:

Code: Select allExpand view
FrameIndex LUMP A 0 0
FrameIndex LUMP B 0 1
FrameIndex LUMP C 0 2


If it's a decoration, just create a Spawn state for the object and loop through the frames:

Code: Select allExpand view
Spawn:

LUMP ABC 3
Loop
User avatar
R4L
Barry Burton - I have THIS
 
Joined: 03 Mar 2017
Discord: R4L#4655
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: Having issues with my my 3d model animation.

Postby Zen3001 » Wed Apr 04, 2018 8:51 am

you should take a look at the download I provided.
This looks exactly like my code, except I'm using zscript instead of decorate
and the zscript is written properly, there are no errors in the log and the model appears in gzdoom when I spawn the actor but only uses the first frame without any animation.
User avatar
Zen3001
Cannot the kingdom of salvation take me home?
Banned User
 
Joined: 25 Nov 2016
Location: some northern german shithole
Discord: #0629

Re: Having issues with my my 3d model animation.

Postby Zen3001 » Wed Apr 04, 2018 9:00 am

OK I tried using decorate instead, here's what I wrote:
Code: Select allExpand view
ACTOR Dancer{
   States{
      Spawn:
         DANC ABCB 5
         Loop
   }
}


and in case you really don't want to click on that download link, here's the modeldef:
Code: Select allExpand view
Model Dancer{
   Path "model"
   Model 1 "DANCER"
   Skin 1 "TEXTURE_"
   AngleOffset 90
   
   Scale 7.33 7.33 7.33
   
   FrameIndex DANC A 1 0
   FrameIndex DANC B 1 1
   FrameIndex DANC C 1 2
}
User avatar
Zen3001
Cannot the kingdom of salvation take me home?
Banned User
 
Joined: 25 Nov 2016
Location: some northern german shithole
Discord: #0629

Re: Having issues with my my 3d model animation.

Postby R4L » Wed Apr 04, 2018 9:23 am

I opened your blend file, but I do not see any frames for animation. In fact, it says you have 250 frames, starting at 1. There are no keyframes though.
User avatar
R4L
Barry Burton - I have THIS
 
Joined: 03 Mar 2017
Discord: R4L#4655
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: Having issues with my my 3d model animation.

Postby Zen3001 » Wed Apr 04, 2018 9:56 am

stupid me, wrong file...
retry the link please
User avatar
Zen3001
Cannot the kingdom of salvation take me home?
Banned User
 
Joined: 25 Nov 2016
Location: some northern german shithole
Discord: #0629

Re: Having issues with my my 3d model animation.

Postby R4L » Wed Apr 04, 2018 10:07 am

The new blend file has keyframes, but again it is 250 frames long. Also, your keyframes actually end up being 80 frames total. You need to set the end frame, and then you will need to add more FrameIndex entries. The reason nothing happens is because you have 3 frames defined in MODELDEF, when there are actually 80 total frames. Test this in Blender by setting your end frame to 80, and play the animation. As it is now, the animation ends around frame 80, and then just sits and does nothing for 170 frames.
User avatar
R4L
Barry Burton - I have THIS
 
Joined: 03 Mar 2017
Discord: R4L#4655
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: Having issues with my my 3d model animation.

Postby Zen3001 » Wed Apr 04, 2018 11:04 am

understand, so I just didn't knew how to use frames.
did everything you said and it's working now
User avatar
Zen3001
Cannot the kingdom of salvation take me home?
Banned User
 
Joined: 25 Nov 2016
Location: some northern german shithole
Discord: #0629

Re: Having issues with my my 3d model animation.

Postby R4L » Wed Apr 04, 2018 11:11 am

Good job! :)
User avatar
R4L
Barry Burton - I have THIS
 
Joined: 03 Mar 2017
Discord: R4L#4655
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia (Modern GZDoom)


Return to Assets (and other stuff)

Who is online

Users browsing this forum: No registered users and 0 guests