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.
Post Reply
User avatar
Zen3001
Posts: 412
Joined: Fri Nov 25, 2016 7:17 am
Location: some northern german shithole

Having issues with my my 3d model animation.

Post by Zen3001 »

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
R4L
Global Moderator
Posts: 404
Joined: Fri Mar 03, 2017 9:53 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Pro
Graphics Processor: nVidia (Modern GZDoom)
Contact:

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

Post by R4L »

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
Zen3001
Posts: 412
Joined: Fri Nov 25, 2016 7:17 am
Location: some northern german shithole

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

Post by Zen3001 »

just 3 frames
User avatar
R4L
Global Moderator
Posts: 404
Joined: Fri Mar 03, 2017 9:53 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Pro
Graphics Processor: nVidia (Modern GZDoom)
Contact:

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

Post by R4L »

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

Code: Select all

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 all

Spawn:

LUMP ABC 3
Loop
User avatar
Zen3001
Posts: 412
Joined: Fri Nov 25, 2016 7:17 am
Location: some northern german shithole

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

Post by Zen3001 »

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
Posts: 412
Joined: Fri Nov 25, 2016 7:17 am
Location: some northern german shithole

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

Post by Zen3001 »

OK I tried using decorate instead, here's what I wrote:

Code: Select all

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 all

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
R4L
Global Moderator
Posts: 404
Joined: Fri Mar 03, 2017 9:53 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Pro
Graphics Processor: nVidia (Modern GZDoom)
Contact:

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

Post by R4L »

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
Zen3001
Posts: 412
Joined: Fri Nov 25, 2016 7:17 am
Location: some northern german shithole

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

Post by Zen3001 »

stupid me, wrong file...
retry the link please
User avatar
R4L
Global Moderator
Posts: 404
Joined: Fri Mar 03, 2017 9:53 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Pro
Graphics Processor: nVidia (Modern GZDoom)
Contact:

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

Post by R4L »

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
Zen3001
Posts: 412
Joined: Fri Nov 25, 2016 7:17 am
Location: some northern german shithole

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

Post by Zen3001 »

understand, so I just didn't knew how to use frames.
did everything you said and it's working now
User avatar
R4L
Global Moderator
Posts: 404
Joined: Fri Mar 03, 2017 9:53 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Pro
Graphics Processor: nVidia (Modern GZDoom)
Contact:

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

Post by R4L »

Good job! :)
Post Reply

Return to “Assets (and other stuff)”