Hijacking the same Brushmodel multiple times?


(CptnTriscuit) #1

It seems that two separate entities can’t ‘hijack’ the same brushmodel with the setmodelfrombrushmodel command…well sort of. In-game, when you look at one of the entities with the hijacked brushmodel its fine, but if both entities are in your view at the same time, one of them will vanish until its alone again.
I was wondering if anyone has a way around it, or can explain whats going on. Because if this was possible, ‘random’ terrain in maps could get very sexy! Here’s what I’m thinking:

Instead of scriptmovers being placed in a randomly chosen preset arrangement and then rotated individually to mimic randomization (what I did in baserace_beta2)…
Each script mover would serve as a location marker, and randomly hijack a model from a ‘library’ of brushmidels, then rotate randomly. This way, there would be no preset arrangements - each piece of terrain (the brushmodels) could appear at any location (the movers) and could appear at multiple locations at the same time!

Im salivating at the prospect, if only it could be done!


(CptnTriscuit) #2

:bump:

Hm…I can’t seem to find a solution yet :frowning:


(CptnTriscuit) #3

YOU ROCK!!! HAHA!

edit> Hey, wtf happened to the reply that was here? Well, someone had asked, “why use brushmodels? why not .ase?”

I think that question just solved the problem! Assuming that different script_movers (or whatever entity) can display the same .ase or even .md3 at the same time.

Normally, I would have said using an .ase wouldn’t work because the model wouldn’t be clipped - not a good attribute for obstacles.

But!

While two hijacked brushmodels can not be displayed at the same time, the invisible brushmodel still has collision!

So in theory:

Two script movers will represent an area. One mover will randomly pick a model to display, and will tell the second script mover which brushmodel to hijack, in effect clipping the model. And finally, a rotation is chosen and the whole area will either face 0, 90, 180, or 270.

Again, in theory:

Any area could display any model from a pre-assembled ‘library’ of terrain chunks, and each model could appear as many times as there are places available.

I cant wait to try this out!


(CptnTriscuit) #4

Hm…I guess .ase doesn’t work with changemodel so it’ll have to be .md3

gtg to class, I’ll have to continue this later…


(Ifurita) #5

Alternatively, could you create 16 terrain chunks and 16 gotomakers, then have the first gotomarker grab a random piece of terrain, then the second gotomarker randomly grabs one of the remaining pieces, until everything is placed.


(LowLife) #6

Hm…I guess .ase doesn’t work with changemodel so it’ll have to be .md3

Thats why i deleted my post, i realized that ase wouldnt work, and presumed that md3 would be too much work. But then again maybe not.


(CooperHawkes) #7

that’s what q3data and nferno’s md3compiler is for :wink: but keep in mind the size restrictions of md3 (model dimensions must be less than 1024^3)… gave me quite some headaches some time ago… if you want to make something bigger than 1024 units u have to scale it down, convert it into an md3 and apply modelscale when using it in your map to rescale it accordingly.


(CptnTriscuit) #8

Converting .ase to .md3 sure is a pain in the ass. I wish the .ase texture paths could be retained when importing the model into nferno’s md3compiler. I’ve never heard of q3data - do you think its better than nferno’s md3compiler?


(CooperHawkes) #9

q3data comes with q3radiant (or with gtkradiant when you also install it to work with q3:arena)… unfortunately it looks for models in a folder named baseq3 (which is due to its q3 roots and it is hardcoded into the executable :-()… you have to write a textfile that defines which ase’s have to be converted into md3’s and what type of model you want to build (still model or animated)… generally speaking it does the very same as nfernos tool does just on command line… and: it preserves the texture paths! :slight_smile: however, in my installation it always adds baseq3/models/ at the beginning of the texture path, but you can fix this easily with nfernos compiler or a hex editor. to conclude: the benefit of q3data is that you don’t have to guess, which texture belongs to which surface group.

iirc a sample textfile for q3data comes with the installation… in case i’m wrong just drop me a line and i’ll send you one (i don’t have access to my computer at home atm and i won’t be at home for the weekend, so please be patient)

btw: somewhere in the radiant sources i also found the sources for q3data… so the issues mentioned above could be easily fixed… however, i never found the time and delight for digging into it :-/