Page 1 of 1

Why do 3D models never work out for me?

Posted: Sat Dec 09, 2006 1:37
by TheGreatWhiteDope
I have tried before to add 3D models into my wad and I gave up due to frustration. I came back to it not to long afterwards and saw a working md2 model in game for the first time, sadly I lost that test wad and a couple months later I need it because I don't see what I am doing wrong. >_< I've attached my pk3 in which my model (HandDryer) isn't working (Just to note, the dummy frame I used is an actual frame because I thought maybe it wasn't working because I had a 1x1 transparent blue color frame originally.). If someone can help me out with this by getting it working for me and sending it back so I can learn what I did wrong or by telling me what I am doing wrong, it would be very much appreciated. :) Thanks in advance.

Posted: Sat Dec 09, 2006 9:41
by Graf Zahl
A look at the error messages in the console might help. You have to use a valid sprite, even if you are going to use models. Otherwise the consistency check in the map initialization code will sort out your object before it even has a chance to be displayed.

Posted: Sat Dec 09, 2006 9:55
by Alter
Graf Zahl wrote:A look at the error messages in the console might help. You have to use a valid sprite, even if you are going to use models. Otherwise the consistency check in the map initialization code will sort out your object before it even has a chance to be displayed.
So if valid sprite is must then he can use empty sprite (TNT1A0) in order to display model? without toying with one additional sprite just thinking... is this right graf?

Posted: Sat Dec 09, 2006 12:26
by Graf Zahl
No. TNT1 is skipped in the first phase of rendering, long before any checks for models are done.

Posted: Sat Dec 09, 2006 16:49
by TheGreatWhiteDope
Erm, I'm stupid. I had a valid IMAGE, I just forgot to put it between the SS_START and SS_END markers. ._. I am just getting back to editing after a couple month break from it so I'm a bit rusty. :P Thanks for helping me realize the problem.

Also, is it possible for 3D objects to have z heights? Because I gave one a z height of 0 and the other of 32 and they both look like they are at 0.

Posted: Sat Dec 09, 2006 17:18
by Graf Zahl
Sure you can. But make sure that the NOGRAVITY flag is set because otherwise they will fall down to the floor.

Posted: Sun Dec 10, 2006 16:40
by Nash
Upon inspecting your file, I see that you're using the old DECORATE format.

The following is your hand dryer converted to the new format. It is an exact copy; the only difference being the +NOGRAVITY flag, which you need to set Z heights properly.

Code: Select all

ctor HandDryer 100
{
radius 10
height 15
+NOGRAVITY
states
	{
	 Spawn:
	 HADR A -1
	 loop
	}
}

Posted: Sun Dec 10, 2006 16:50
by Graf Zahl
The NoGravity flag already existed for the old format.

Posted: Wed Jan 10, 2007 22:51
by TheGreatWhiteDope
Well, I am having more trouble with models and instead of posting a new thread I decided to just bump this one if that is alright. I keep getting the error:

Script error, "MODELDEF" line ##:
Unknown frame 'XX' in XX

No matter what variations in the frame's name that I try. I think it might be a problem with the models I am using because the last model worked fine and I don't see any problems in my modeldef... unless I am giving wrong frame names, the names I get are from Misfit Model 3D.

http://romendo.gamingg.net/doomcoh.zip is my pk3, if you can look at it, I would appreciate it. Sorry if I am becoming a nuisance with this. ._.

Posted: Thu Jan 11, 2007 15:26
by Nash
The toilet's frame is named "idle", not "idle01". If you're not sure about the name of the frames, you should just use FrameIndex.

Also it's a little big so you'll have to scale it down.

Posted: Thu Jan 11, 2007 23:13
by TheGreatWhiteDope
Thanks, that worked perfectly. :) Out of all the combinations I've tried, I never thought to remove the number.. ._. I was never sure how FrameIndex worked though..

Posted: Fri Jan 12, 2007 6:17
by Nash
What do you not understand about FrameIndex? It's just the frame number.

All models start at frame 0, so for a static, non-animated object, FrameIndex 0 will always work because it's the only frame in the model.