Gib models Created 20 years ago2004-10-27 09:11:29 UTC by Peace and LOve Peace and LOve

Created 20 years ago2004-10-27 09:11:29 UTC by Peace and LOve Peace and LOve

Posted 20 years ago2004-10-27 09:11:29 UTC Post #69790
You guys know any links for tut's on making new gib models?

Preferably Glass Gibs..
Posted 20 years ago2004-10-27 10:37:39 UTC Post #69825
What do you want exactly? They're just models, so modelling tutorials will suffice. What modelling program do you use?
Posted 20 years ago2004-10-27 10:44:08 UTC Post #69828
I use MS3D, but I want to make a new glass breaking gib model, so is all of that animated then? What about the direction of fire option?
Any idea how that works.

I have many tut's on modelling and such, just wondering what it takes to make a model into a Gib for use in maps/mods etc.

The final destination of this is to get a new glass smashing animation, with more shards and shattering, for use in a MOD (I'm not making the mod, and it's already made, so don't even mention the mOD :P ).

What about the textures? Does teh glass gib not take on teh texture of teh breakable it was attatched to/spawned from?

It's these little things I want to find out.

Thanks for your ever endearing nature to answer the "big" q's CP ;)
Posted 20 years ago2004-10-27 10:54:01 UTC Post #69832
A gib model is just a model, nothing strange about it. When an object breaks, the gib model is randomly spawned, with random chosen body part values. It doesn't get the texture of it's object or anything special...

The amount of models is probably based on the size of the breakable entity, but I'm not completely certain about that. Test a bit, I'd say.

It's not animated, the several gib models are just thrown a certain distance, this is controlled a bit in the breakable's properties (random direction or based on attack direction).
Posted 20 years ago2004-10-27 11:00:21 UTC Post #69834
Fair enough, it sounds quite basic, you don't happen to have seen if there's any tut's on VERC?
Or anywhere else, whilst on your travels?
Posted 20 years ago2004-10-27 11:04:57 UTC Post #69835
I've got an item list at VERC which could be helpful if you want to make higher-def gibs...dunno if it'll be of any use to you.

http://collective.valve-erc.com/index.php?doc=1083484325-81541000
RabidMonkey RabidMonkeymapmapmapfapmap
Posted 20 years ago2004-10-27 11:20:55 UTC Post #69837
Ok, so where are they, in the pak0.pak file? under models? I'll have a look for them.
Thanks Rab, I have seen this before though :P
Posted 20 years ago2004-10-27 11:22:42 UTC Post #69839
Yeah, pak0 or in the GCF file.
RabidMonkey RabidMonkeymapmapmapfapmap
Posted 20 years ago2004-10-27 11:28:39 UTC Post #69842
Oh yeah baby, I have the .NET Framework again, taken me months to get round to downloading it afetr my pC got wiped. Cheers for the reminder :P

Also, are the models just called 0, 1, 2, 3, etc?

Another thing, I didn't see the glass gib in tehre, so do you know if it's in some obscure place or named some bizarre number?

I only ask because I'm at work and I can't explore right now, wanna get as much info before I sit down and start to work.
Posted 20 years ago2004-10-27 11:31:13 UTC Post #69843
They're in models/glassgibs.mdl, garbagegibs.mdl, cactusgibs.mdl, etc.

The different parts/variations are seperate submodels.
RabidMonkey RabidMonkeymapmapmapfapmap
Posted 20 years ago2004-10-27 11:37:31 UTC Post #69846
Do you have any knowledge of how they are broken up when the 'glass pane' is broken, they are spread out like CP said, but what controls that, and how would you add more gibs? Any idea?
Posted 20 years ago2004-10-27 11:45:13 UTC Post #69852
Well when the func_breakable is broken, the game is coded to spawn a certain specifyable gib model, so when it's set to glass it spawns x number of the glass gibs model and randomly scatters them, either according to shot direction or randomly, which can be set on the breakable itself. Since the glassgibs model has a vareity of submodels, the appearance is randomly chosen.
RabidMonkey RabidMonkeymapmapmapfapmap
Posted 20 years ago2004-10-27 11:47:08 UTC Post #69853
So you'd need to add teh numbers to teh code, and the game would take care of adding the extra gib models?
Posted 20 years ago2004-10-27 11:54:31 UTC Post #69854
Nope.

You do know how teh submodel system works, right?

Submodels allow mdl files to contain more than one model. (For example, the garbagegibs model has 14 submodels containing random bits of garbage. Submodel 1 is a crumpled piece of paper, 7? an envelope, 13? a crushed soda can, and so on.) So the glassgibs mdl has 7 or 14 submodels or so, to have some random variants of glass. Now submodels are randomly selected unless they're things like weapons on grunts, so when these glass 'models' are spawned, the submodel is randomly selected thus allowing a random and non-uniform appearance. If you add extra submodels to the model, the game will just have a larger pool to randomly select from, which it will do automatically.

So, all you have to do is make extra submodels and the game will take care of the rest.
RabidMonkey RabidMonkeymapmapmapfapmap
Posted 20 years ago2004-10-27 12:19:13 UTC Post #69855
Like I said, I am a total noob when it comes to the deep and dirty sub folders of HL (born and bred on CS :P ).

You've helped a shitload Rab, thnx, but one more Q

How does the engine know when to stop spawning these models, say I want a lot of smaller gibs, shards and so forth, the engine will spawn <set> amount, and then stop, what if it's spawning too few for my liking, and I want more, is that code, or is there an easier way.

I'm thinking maybe just get rid of all the current gibs, and replace with some frsh ones, and two three or four pieces of glass all in one model.

That'd probably work. So can you just open the sub models in a normal Model editing prog, and edit like that? Or is there some kind of trick.
Posted 20 years ago2004-10-27 12:34:54 UTC Post #69859
You can specify a model in a func_breakable's options yourself. When broken in-game, it will then spawn a certain amount of gib models, while randomly choosing between the submodel options.

To modify the amount of gib models, you could create another func_breakable at the same spot and make it invisible, and have it triggered to break once the other is broken. Or something like that. As I said before, I think the game (not the engine! :P) looks at the size of the breakable object to determine the amount of gibs. I think this can easily be changed in the game-code.

Submodels are just .smd files. Decompile some original models and look in the .qc file how they set it up. It's easy to understand after a bit of experimenting.
Posted 20 years ago2004-10-27 12:36:34 UTC Post #69860
ah, of course, I never thought to make the connection between HL gib models and normal weapon models etc, crazy, it all makes sense.

Thanks guys!

;)
Posted 20 years ago2004-10-27 15:53:00 UTC Post #69902
Clarification.
Posted 20 years ago2004-10-27 19:52:45 UTC Post #69935
You could also add a gib_shooter to fire when the breakable breaks. Direct the gibs straight down, select your gib model(s) and you're good to go.
Posted 20 years ago2004-10-27 19:53:13 UTC Post #69936
My bad... gib_shooter only spawns guts.
Posted 20 years ago2004-10-27 19:56:03 UTC Post #69937
But env_shooter doesn't ;)
RabidMonkey RabidMonkeymapmapmapfapmap
Posted 20 years ago2004-10-28 06:01:30 UTC Post #69996
hey Brad and Rab, cheers, that's a pretty nifty idea, I may have to use it in a few maps, see what they say and try to get the code changed while I work on those models =/

Thnx
Posted 20 years ago2004-10-28 15:09:45 UTC Post #70155
No prob.
RabidMonkey RabidMonkeymapmapmapfapmap
You must be logged in to post a response.