Quote: --- Original message by: Stainless
Hello! Are there any formal tutorials on exporting collision-geometry for Halo CE? Can you model things like pathfinding-spheres, surfaces, and collision materials?
I also have the same question for physics geometry.
I'll tell you how a noob would do it
1) Open 3ds Max
2) Run the GBX model importer and import the bones and the geometry of the thing you want to make the collision model for
3) If you don't know how to make multimaterials like me
rename the materials you got with the model to something more appropriate, like "skin", "metal" and so on.
4) Start drawing! Create a box, convert it to poly and assign the multimaterial to it. Once it has its material, start editing it. Add vertices using the "add vertex" function in the "edge" section of the editable poly menu; then create new edges, then move around the edges you got, then start again. You should envelope as good as you can the original shape of the model; too many details aren't good because they take up memory space; too low aren't good as well because they won't stay faithful to the visible geometry; most of the times you can go around with 200\300 vertices (or much less for stuff like covenant crates and similar)
5) Link what you just drew to a bone. REMEMBER: with collision models YOU CAN'T use the skin modifier; for moving parts, you MUST link them to a bone. There's not other way. Why? Because Tool likes it this way, that's why.
6) Repeat step 5 for every bone\frame in the body: draw, link and edit
7) Right click and then convert every poly to editable mesh
8) Assign materials: go through each mesh and select the faces you want to have of a material (with the "face" selection in the editable mesh menu), then assign that material to it. Do it for every material in the scene and assign a material to EACH and EVERY face.
9) Use the JMS exporter to export it to c:\yourhalofolder\data\yourstuff\physics, then run tool and type collision-geometry yourstuff (WITHOUT physics)
Things you should pay attention to:
1) Every face MUST have a material assigned to it
2) If the gbxmodel of the thing to which you want to assign this collision has regions, the collision MUST have these regions as well (there is no need for permutations, though)
To assign regions, do this
to see what regions, if any, your model has, look at the gbxmodel tag in guerrilla
3) Closed world rules: everything you draw MUST be closed, which means that it must have an "inside" and an "outside".
4) Geometry MUST NOT overlap. Vertices should all be separated, faces and edges should not overlap nor meet each other. Should this happen, the collision model will still compile, but you will end up having weird errors in game.
5) DO NOT export an editable poly. If you do, all sort of strange errors will pop up and your collision won't compile
As for physics, just draw spheres and give names to each one of them as you would do with markers; link all of them to the pelvis and make sure to generically envelop well your model. Then save the JMS file to "c:\yourhalofolder\data\yourstuff\physics", then run tool and type "tool physics yourstuff" (DO NOT type physics in the end). Remember: AFAIK, physics do not animate, so linking the spheres to the bones is quite useless.
THINGS TO KNOW: you must then adjust the physics tag in Guerrilla. Adjust spheres size, then go to sapien and type "debug_objects_phyics true" to see if the spheres are the right size or not (and if they are well-placed as well). Most of the other settings are generated automatically, yet some errors may appear: for example, your vehicle may start just sliding smoothly on the ground, instead of stopping after a while. Or the vehicle may rocket sky-high for no apparent reasons. Or it may fall seamlessy through the ground, headed to the deepest pits of hell and never to be seen again. To put it simply: I DON'T KNOW how to fix them. Remember, however, that the vehicle type you set (alien fighter, alien scout, human plane and stuff) affects the way physics work on your vehicle (how they do, I don't know). I have learned that Halo doesn't like tear-shaped vehicles (IE; the seraph) and loves to throw them up in the deep space when you get on them; I solved it by setting the "relative mass index" to 0 in the mass points of the tail. But, really, there are no tutorials around and trial and error is really the only way to get through it.Edited by rododoonceagain on Apr 6, 2015 at 05:50 PM