Custom tank model questions


(pazur) #1

Heya,

I finally converted my tank model to md3 using nice plugins like texture baker (for cinema 4d) and the 3ds max md3 export plugin. It’s not 100% completed as you see on the screenshot (I still need to tweak it a little bit).

BTW: Texture baker plugin really rocks. You can render the light into a texture that you apply to an object. Very Nice. URL: http://www.plugincafe.com/download_browse.asp?downloadID=P120092106BAKE01

Before I start scripting here my questions:

  1. Do I need to add a tag in the model for the mg42 gun on the tank? How is it done? Any tutorials or nice posts about it?

  2. How does the broken chain on the tank work? Is it a different model that is loaded using model2 or just a different frame of the md3 animation?

  3. I had to use modelscale .4 for the screenshot. If I l don’t look at the model center the model disappears. How to solve it? Scaling it in the modelling tool? For usual gamemodels (like my LOD - Level of Distance trees) I use this vis dummy entities. The model moves around so I guess this won`t work.

  4. I use rgbGen lightingDiffuse on the model shaders. Will the model be dark in the tunnels of my map if I use low values for the lightgrid?

Edit:

I just noticed that the misc gamemodel doesn’t like my shaders.

Example:

models/paz/tankbody1
{
	qer_editorimage models/paz/tankbody1.tga
	{
		map models/paz/tankbody1.tga
		rgbGen lightingDiffuse
	}
}

They are simply not used… I changed the parameter of map models/paz/tankbody1.tga and it didn’t have any effect. The game is simply loading the tga texture but not applying the shader…

  1. What’s the trick with shaders for misc gamemodels? I remember something with using reversed slashes “/” or “” in the shader to make it work from the good old RtCW times.

Thanks in advance,

paz


(pazur) #2

I solved #5 (the gamemodel problem with shader not being applied).

Woo! I like this test object on the right :smiley:

I still could use some help on my questions 1-4. So feel free to post.


(Hybridesque) #3

Nice stuff.


(kamikazee) #4

I have seen a few ways around it. You can either make a 3ds Max object starting with the name tag, or add it in later. (For the latter. search for tag dummies)
To attach an MG, name the tag tag_player and it needs to be placed a little into the tank’s body. (The player’s waist will be placed at that position.)

In fact, the tank model has no animation at all.

Everything is done from script.
The tank body, tank tracks and the wheels are 3 different materials. (In fact, it uses 5 materials: 2 for the wheels and 2 for the tracks on both sides.)
Now when the tank tracks need animation, their shader is remapped using the remapshader statement. Shaders can be made to shift the texture or remain static, so you can fake animation this way.

Take a look at a tank scripting tutorial for more info.

You could add extra tags to the model and attachtotag the dummies to it. I haven’t tried it though.

Don’t know what you are talking about, sorry.
Maybe carnage or obsidian knows.


(C) #5

In fact, the tank model has no animation at all.

Actually, the tank-models “churchhill.md3” & “jagdpanther_africa_body.md3” both have a 91 frame animation.

The churchhill model has its body and tracks embedded in 1 model.
The Jagdpanther has a seperate model for its tracks, “jagdpanther_africa_tracks.md3”, which seems to have a 92 frame animation.


(pazur) #6

Thanks a lot guys :slight_smile: I will start playing around soon come back to you if have more questions.


(kamikazee) #7

Seems I was wrong on the animation part then.

However, judging from the goldrush script, the tank model doesn’t seem to run it’s animation; rather it remaps the shaders used for all moving parts.


(C) #8

The animation of the tank and its tracks is used to let the tank shake when it moves (with start-moving and stop-moving animations).

The tracks (and wheels) of the (undamaged) moving tank are “animated” the way kamikazee says, by remapping a different shader (remapshader script-command).
It has little to do with the (shaking)animations of the tank… (sorry if i confused You kamikazee)

How does the broken chain on the tank work?

The churchhill has a different model for the damaged state, “churchhill_damaged.md3”.
The Jagdpanther has its body and tracks in seperate models, and for every state there is a seperate model, “jagdpanther_africa_tracks2.md3” for the damaged tracks.
By using the changemodel script-command, the correct (un)damaged model can be shown at the proper moment.


(kamikazee) #9

No problem, I probably just missed it every time I was reading the script.


(FireFly) #10
  1. I had to use modelscale .4 for the screenshot. If I l don’t look at the model center the model disappears. How to solve it? Scaling it in the modelling tool? For usual gamemodels (like my LOD - Level of Distance trees) I use this vis dummy entities. The model moves around so I guess this won`t work.

Well, I had the same problem with one of my previous maps I was working on. While I was experimenting with LOD models I was wondering what determines the distances ( in units) when the low poly model changes into a high poly model. I found out that if you scale the model up (in 3dmax & save it as a md3) the distance for the model chance to occur increases.

The problem I got, like you are having, was that if I used the modelscale key ( I used 0.25) the model would “dissappear” when I got close to it… To me it looks almost as if the engine ignores this entity key. So when you’re are very close to the model it ignores the modelscale key, and it looks like you are actually inside your model!

The only way to bypass this problem for me was to scale down the model inside 3dmax…

However, and you might wanto try this first, You can have multiple vis_dummies targeting the same entity…But I do know this works for a misc_gamemodel, I’m not sure if this will also work for a script_mover as I never tested this, something you might have to experiment with :slight_smile:

  1. I use rgbGen lightingDiffuse on the model shaders. Will the model be dark in the tunnels of my map if I use low values for the lightgrid?

In my map v1rocket I created a custom tank that moved through tunnels. I used the same shaders as SD used for the churchhill tank and It got lit properly…

oftopic: It’s realy nice to see a “veteran” mapper back on mapping for the quake3 engine, most of the people from the ‘old’ tramdesign forums seem to be missing in action or simply dissappeared. I’m looking forward to play this map… :smiley: