trap_SetBrushModel Usage


([RW]FRED) #1

In the Realistic War, the new gunner player classe can spawn an artillery gun somewhere on the map.
To spawn it I use G_Spawn and affect model with a G_ModelIndex(…) and ent->s.eType = ET_DEPLOYED_AAGUN and set bounds and origin etc…

But this entity still a stupid solid square box and not a brush model. I’d tried to use trap_SetBrushModel(ent, “models/multiplayer/axis/flak/base.md3”) but the engine give and error " models/multiplayer/axis/flak/base.md3 is not a brush model". Well my question is how to spawn dynamicly a brush model in Q3 engine.

Thanks


(nUllSkillZ) #2

Have you made the model by yourself?
If not may be the “.md3” isn’t a md3 file or corrupt and you should try to load it in some modeling software?


([RW]FRED) #3

The model is good because it appears correctly in the game rendered by CG_General
And it looks very fine in 3DS & Milkshape

Thx


(digibob) #4

Any brush based entity can leave a brushmodel in the bsp, these will be named as “*1” thru “*X” where X is the last brush model in the map. You cannot loads md3 files as brush models, as they are well, er, not made of brushes :slight_smile:

To see an example of hijacking a brushmodel to use with another entity, take a look at the way func_brushmodel and func_constructible work together

BIG NOTE: You can only have ONE entity using a specific brushmodel at a time, or things wont work properly.


(-VoiD-) #5

Is it possible to load a seperate bsp as a brush model? It is made of brushes! :slight_smile: Or is compiling the model/structure into the map the only way brush models work?

I read a post by D!ABLO over in the Quake3World Programming Forum that the Q3 Engine could load external bsp’s for the brush model. See this post: http://www.quake3world.com/ubb/Forum4/HTML/005563-2.html#66

Just wondering if that was correct/applied to ET or not! If it is, could you explain how to use it?

Thanks in advance,
VoiD


([RW]FRED) #6

I have also this idea to convert my MD3 to BSP and use trap_SetBrushModel to load.

I will do it in few days, keep online.

Regards


(digibob) #7

No, diablo was wrong, the q3 engine ( and the ET engine ) do not support loading external BSPs as models. I think quake1 was the last engine that supported this, in the quake series.


(nUllSkillZ) #8

Please take a look at wolf tactics.
I’ve just remembered that the engineer of this mod is able to build some sort of canons everywhere on the map (think so).
And may be you can reach someone of this mod and ask how they’ve done this.


([RW]FRED) #9

No, diablo was wrong, the q3 engine ( and the ET engine ) do not support loading external BSPs as models. I think quake1 was the last engine that supported this, in the quake series.

In fact I have tried and it doesn’t work… :frowning:

BTW, we don’t have any way to spawn a brush model dynamicly in the game, and i must deal with my stupid square box. In fact I can include my MD3 model as brush entity into new map but for existing maps i can’t… And our goal is to do mod using standard and existing map…

But I think that i have another solution, keep online

Regards


(Unique1) #10

Long time no talk. Did you ever work out how to do this?


(kamikazee) #11

Jaquboss once messed around with this. I believe he got some working results out of it, but the brushmodel may have had to be compiled into the map.