Duke4.net Forums: Error adding a 3d model - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Error adding a 3d model

User is offline   11bush 

#1

Hey guys, I'm sure this has been discussed plenty before so sorry in advance.

I'm trying to add some models to the game and I am running into an error.

So I created duke3d.def and put the following into it

// sandbagwall (752)
model "MODELS/sandbagwall2.md3" {
scale 1 shade 0
skin { pal 0 file "MODELS/sandbags.png" }
frame { name "frame_1" tile 752 }

but when I try to run the game I get an error in the logs

duke3d.def:4: error: parameter `model' is undefined.
duke3d.def:4: error: parameter `' is undefined.
duke3d.def:4: error: parameter `MODELS/sandbagwall2.md3' is undefined.
duke3d.def:4: error: expected a keyword but found `'.

I'm sure it's just me being dumb, but I tried to follow the instructions on the wiki and I'm kinda stuck :)

Any help is greatly appreciated.
0

User is offline   blizzart 

#2

From the code itself it´s correct.

Are you using a double quote ( " ) or two single quotes ( 2x ' ). The first one would be the right way.
0

User is offline   11bush 

#3

View Postblizzart, on 26 September 2020 - 09:26 AM, said:

From the code itself it´s correct.

Are you using a double quote ( " ) or two single quotes ( 2x ' ). The first one would be the right way.


I'm using the double quote.

I've got it to the point now where the only error is

duke3d.def:2: error: expected a keyword but found `model'.
0

User is offline   NightFright 

  • The Truth is in here

#4

Have you closed the first bracket at the end? According to your first post you didn't.

This post has been edited by NightFright: 26 September 2020 - 12:05 PM

1

User is offline   Mark 

#5

Yeah, what NF said. Put a space and right brace at the end of the last line. I'm surprised the log didn't give the usual "too many left braces" message
0

User is offline   11bush 

#6

View PostMark, on 26 September 2020 - 12:45 PM, said:

Yeah, what NF said. Put a space and right brace at the end of the last line. I'm surprised the log didn't give the usual "too many left braces" message


Yeah that was dumb of me, I don't know how I missed that. :) I fixed it and still no joy strangely enough.

I noticed with the current version of eduke it pulls the GRP from my steam version of the game rather then my old original copy, and I'm unable to get it to pick up the old GRP. Not sure if that is causing any issue.

Edit

OK so it def has something to do with the GRP file, I threw the code and folder into my ww2gi folder from steam and it doesn't throw me that error, now I'm just gettin

Invalid frame name on line ww2gi.def:7
Removing model 0 due to errors.

The frame line still being "frame { name "frame_1" tile 752 }"

Thanks again!

This post has been edited by 11bush: 26 September 2020 - 04:40 PM

0

User is offline   11bush 

#7

Well, I've got the code figured out, but i just can't get it to show up in game. Every few months I come back to trying to get models in here, but it's always just a mystery as to why it doesn't work for me.

I've got the code as follows;

dummytile 3999 20 100

model "MODELS/beerbottle.md3"
{
scale 1 shade 0
skin { pal 0 file "MODELS/beerbottletext.png" }
frame { name "FRAME1" tile 3999 }
}


and I have all my files in the correct places, it doesn't throw any errors at me. I even downloaded an MD3 viewer to ensure that my model was ok, but still can't get it working.

This post has been edited by 11bush: 26 September 2020 - 07:11 PM

0

User is offline   NightFright 

  • The Truth is in here

#8

Maybe just post the file exactly the way you use it so others can take a look.
0

User is offline   MC84 

#9

Are you exporting from Blender? I see you changed the frame name from "FRAME_1" to "FRAME1".. It seems to be case sensitive, and by default Blender exports with the name "frame1" for me.

Based on your code snippet this is how mine looks

model "MODELS/beerbottle.md3"
{
  scale 1 shade 0
  skin { pal 0 file "MODELS/beerbottletext.png" }
  frame { name "frame1" tile 3999 flags 0 }
}


I'm not sure how essential the "flags 0" command is. Coding isn't my strong hand.
0

User is offline   NightFright 

  • The Truth is in here

#10

"Flags 0" is the default anyway, my guess is you would only need it when it's 1 to ignore tints. It shouldn't prevent the model from being shown either way, though.
0

User is offline   Mark 

#11

Over the years, myself and others have fixed mysterious graphics issues by deleting any texture cache files and let them rebuild next time eduke32 runs.
Its worth a try.
0

User is offline   Tea Monster 

  • Polymancer

#12

Open up the md3 in Npherno's MD3 tool and see EXACTLY what the frame number/name is.

Or post the md3 file here.

This post has been edited by Tea Monster: 27 September 2020 - 05:08 AM

0

User is offline   11bush 

#13

Thanks for all the help guys, I'll add the file here if anyone wants to take a look at it. I just made a quick beer bottle, since I figured maybe my original file was too complicated. I'm pretty experienced with blender, I just have never used MD3 format ( aside from my previous attempts at this exact scenario :) ) but my model only has one frame within blender.

I have a zip file with my bit of code as well as the file and texture.

Thanks again.

Attached File(s)

  • Attached File  bottle.7z (256.61K)
    Number of downloads: 12

0

User is offline   Tea Monster 

  • Polymancer

#14

// beerbottle (3999) this is a comment
model "MODELS/beerbottle.md3" { 
   scale 1 shade 0 
   skin { pal 0 file "MODELS/beerbottletext.png" } 
   frame { name "frame1" tile 3999 }
}



Check that the folder for models is actually in uppercase ('MODELS', instead of 'models').

Attached thumbnail(s)

  • Attached Image: frame1.JPG


This post has been edited by Tea Monster: 27 September 2020 - 07:36 AM

0

User is offline   Tea Monster 

  • Polymancer

#15

That works.

The origin point of your model is in the center of the model, it has to be at the base.

Attached thumbnail(s)

  • Attached Image: THATWORKS.JPG


This post has been edited by Tea Monster: 27 September 2020 - 08:59 AM

0

User is offline   11bush 

#16

View PostTea Monster, on 27 September 2020 - 08:54 AM, said:

That works.

The origin point of your model is in the center of the model, it has to be at the base.



Thanks for the help, I still cant get it to work for some reason, if I attempt to use it in my duke folder I still get "duke3d.def:2: error: expected a keyword but found `model'."

And when I try to use it in WW2GI just for the sake of it, it doesn't throw and error it just doesn't work. I don't know what the hell I'm doing wrong here, It's set to polymer with 3d models enabled.

*Edit

Oh my God, I actually got it working, I moved the origin point and then I deleted the caches again and it worked!

Thanks a lot for all the help!

This post has been edited by 11bush: 27 September 2020 - 09:45 AM

0

User is offline   Mark 

#17

Does that mean I have to split the reward money with TeaMonster? :)

This post has been edited by Mark: 27 September 2020 - 10:16 AM

1

User is offline   11bush 

#18

View PostMark, on 27 September 2020 - 10:16 AM, said:

Does that mean I have to split the reward money with TeaMonster? :)

Haha, 50/50 ;)

thanks again!
0

User is offline   Mark 

#19

It was 60/40. Re-read the contract.
0

User is offline   11bush 

#20

Just one final question :) is it possible to add collision to a model, enabling you to jump on top of it?
Also is there anything i need to do to get it to show up in mapster?

OK so it was 2 questions ;)
0

User is offline   Mark 

#21

I'm heading off to bed. Do a search for clipshape map. Its usually the first map in the mapster list. There you basically place the model and build a rough sector representation of it. Those sectors will cause it block that shape in game. The way I get it to show in mapster is to take a small screenshot of it in my modeling program and def it in like a normal texture.

This post has been edited by Mark: 27 September 2020 - 07:18 PM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options