concave Collision model trouble.

Started by StickyfingazFo20, December 02, 2015, 02:37:15 PM

Previous topic - Next topic

StickyfingazFo20

Already posted this in a previous thread of mine, but got no answer, so hope yall dont mind.

im having trouble with the collision model, ive tried multiple things even tried merging it with parts from a previously working collision model but it still wouldnt work, and yes i have ticked concave, aswell as reset xform then turned it into a editable poly. the problem is that the position of the collision is wrong and it doesnt become concave. Also i read somewhere that if i fragmented with voronoi which i did. i could use the fractured objectcs themselves as the collision model for the animated fracture, but im not at that stage yet.
not sure exactly how to do that tho, do i just add it to collision like you normally would?.



In this scene i processed it with the hull helper in order to get it back to normal, previous to that i had used mass fx rbody modifiers.

https://minbox.com/gi/W0qXHIO/download

[edit] i fixed lighting issue on the model by collapsing it into a single model, however im not sure if i would need the seperate models of it for the collision to work (bones)

its gotten pretty messy in the selection set so heres the selections u might need to use.
Collisionwhole, the entire collsion model.
btriizz, the entire Ref model
part1animation - part4, all the animated fractured pieces.

wallworm

For the hulls to align in an animated prop they must be linked or skinned properly. For this model, using LINK is faster than skin. I suggest you watch this video:

https://www.youtube.com/watch?v=pxCiL8Io2YE

I'd watch the whole video but the hull discussion starts at 4:10.

StickyfingazFo20

#2
I made it work, however i forgot to turn on concave and apparently it worked anyway, didnt seem to make a difference when i turned it back on. using the fragmented pieces itself as the collision worked too. i succesfully got part 1 and 2 of the animated pieces ingame, however for some reason part 3 wont compile sometimes and when i do get a succesfull compile model viewer crashes when i open it or i get a red error model (this happens with and without collision moddel). i tried only selecting a single piece of the model and i get the same results.

On one of the compiles i got the error, exception stack overflow.

wallworm

You should try to figure out what makes the third section different from the other two. Are there significantly different numbers of animated parts? Is one of the hulls very tiny? Very large? does any piece fly very far from the rest of the model? Etc.

StickyfingazFo20

#4
yeah i already did that, removed some pieces that went out of zone and some really small ones, but since i tried with only one model that seemed normal. i doubt thats what caused it.
i skipped it and went for part 4 got same results but only if i assigned certain pieces to the collision model. not really sure whats exactly is wrong with some of the pieces. i still needed a last piece for it to be good enough so i tried replacing a fracture with a normal box and i still get the error .

Edit: this confused me alot. i split a model in order to get the collision right (already working model w collsion). and now im somehow able to add the piece that didnt work earlier to the collision. strange...


StickyfingazFo20

finally got the entire thing inside source, however in order for me to make it work i had to add each element at a time, then compile, and if something messed up i had to delete the model, the recompile for the collision model to update. Only issues i seem to have now is half life crashes when i use the command vcollide_wireframe 1 and the shadows on the animated models, tried to fix it with a info_lightning entity but that didnt change nuthin.


wallworm

Looks cool. :)

My best guess about a crash is too many bones or a bad element in the hull. The only way I'd know to fix that is process of elimination.

Tip: One thing to consider is making a staticprop version of the model representing each section after the animation(s) are done. That way you can kill the multi-bone version and replace with a single prop as soon as the animation is over.

Joris Ceoen

I have experienced similar crashing issues when viewing complicated collision models. I would advise you to make all the chunks non-solid, if that's possible, because there is hardly much use for them to be solid, unless the player absolutely needs to go there. Valve has never had such complicated operations in their games with each little gib being solid (just look at Episode Two), and there's a reason for that.

Does it only crash when you enable the command, or does it simply crash when the animation happens?

StickyfingazFo20

#8
It happens as soon as i use the command, and im fairly sure which one of the models is causing it. part5 if i recall correctly. cuz i tested them one at a time and it worked fine until then.
Any idea on how i can fix the lightning? if i go to the other side its lit and looks normal, but there shouldnt be light there. so maybe its light origin is somehow reversed

Joris Ceoen

For the error, yea it should happen as soon as you try to display the vcollide wireframe.
For the lighting, I'm pretty sure there is not way to equalise the lighting between static and dynamic props. They're just different, period :(

StickyfingazFo20

All of the models i used was dynamic tho, but yeah i managed to fix it by the changing xyz of the light_environment. apparently it just needed to be updated somehow.

wallworm

For dynamic props you should be able to control the light sample point with the $illumposition (which is a yellow icon in WWMT). Or use an info_lighting entity with your prop.

SMF spam blocked by CleanTalk