Game Development Community

mesh hiding + T3D + houdini + newb

by strungxx · in Artist Corner · 09/22/2009 (1:54 am) · 8 replies

So, I'm relatively new to 3D modeling and looking for some pointers on how to approach things before I get too far along. I want to take a mesh hiding approach to my players models but I'm not exactly sure how you go about creating/setting up a model to take advantage of this.

It's my understanding that you need to have different meshes to represent the same part of the character so say a bare hand mesh and then another hand mesh but wearing a glove. You then show which mesh shows up on the player model.

1)Are all these meshes in the same file?
2)How do you define the meshes in your model so when you export you can access all these different meshes? I know there are collision meshes but is there some kind of definition that tells the game hey, this is my hand mesh?
3)What is the appropriate way to model these differences? Do you get the base model done then hide your hand geometry and model the hand again as the glove mesh?

Right now in houdini I have a geometry node and inside that geometry node I have all the modelling done.

4)Is this right or do I have to have say a different geometry node for each mesh I want.

5) Any idea if T3D will support mesh hiding out of the box? This is minor as I have no problem doing coding but would be nice if I didn't have to.

As I said, I'm pretty new to this stuff so I'm trying to sort out what I need to do. Any help/pointers to reading materials would be great or if I'm not using the right terminology let me know. Thanks.

About the author

Recent Threads


#1
09/22/2009 (7:14 am)
Not using Houdini but here's the "rough guesstimate".

1) Yes, unless you're thinking about trying to mount it all with nodes in-game - which just sounds difficult and confusing to me
2) Give the meshes different names and then call them in-game with script - eg: %player.setmeshhidden(mesh01, 1);
3) That's kinda up to you - just make sure that they are individual mesh objects, and not just seperate bits of the same mesh.
4) Should be able to use all the same nodes
5) Yes, *.setmeshhidden(meshname, bool); and *.setallmesheshidden(bool); works fine on players and any dynamic objects. Doesn't work on totally static objects (like a building or tree - you'd have to make a little script to make that happen called a StaticShape -- different from a really static TSStatic)

And just to note, players don't need collision meshes. Bounding box handles movement collision, visible mesh handles projectile collision.
#2
09/22/2009 (1:20 pm)
For 4, the exporter creates separate nodes in the dts for separate objects. If you have all your modeling in one geometry node, it will show up in the dts as one node. You can still do all of your work in one node if that makes sense, then split it out into separate objects using the object merge sop. Create geometry objects for the nodes you want in the dts, and inside use an object merge that grabs the part of the mesh that you want, either by path or by group. Hide the original geometry. Hope this helps...
#3
09/22/2009 (4:10 pm)
Awesome, thanks for the replies. I was going to create separate geometry nodes for each part, but I didn't know how to join all the nodes together. I would be able to edit one part at a time but not join the meshes up, if that makes any sense. I'm mostly a java programmer so having things in separate nodes(objects) makes more sense to me.
#4
09/23/2009 (2:43 am)
Just playing with this tonight and thinking about it some more. So say you have a seperate geo node for each body piece arm_bare, torso_bare, arm_plate, torso_plate etc. Which nodes would you actually do the joining of the meshes? Would you just have one geometry node called character where you brought in all the objects to connect together? Inside that character node you would have to do the mesh connections between arm_bare and torso_bare. Then you'd have to do arm_plate and torso_bare etc. or am I totally off?

I guess I'm not seeing how you create the "completed" model with all the various states of mesh hiding that could occur. Obviously you need your various parts to be connected in one cohesive mesh at some point.
#5
09/23/2009 (3:50 am)
Hmm... I'm missing something - why does it have to be a cohesive mesh? I'm not an expert on Torque by any means, but it seems from Steve's post that you need separate meshes for the parts. You can still model it as a cohesive mesh, but you'll have to split it out into the different parts you want to have individual LOD control over.
#6
09/23/2009 (11:47 am)
If you didn't attach your arm to your torso, wouldn't you be able to see right through your model at the seam? And when you are animating it how would the deformation of the shoulder area work if the meshes aren't attached? Or am I just missing some information about how all of this works?
#7
09/23/2009 (12:54 pm)
You're right there might be a small seam there depending on how the polygons are drawn, but the deformation should still work right. You could hide the seam by putting it behind some other piece of the geometry. On the other hand it might hardly be visible with the parts at the same LOD. It will be much worse when you have multiple resolution parts together since the topologies will probably be much different. I'm doubting Torque has any capability to stitch the meshes back together again after you do the LOD switch, so I think you're stuck with that. The only alternative I can see is to create a mesh for every combination of LOD part and manually stitching the parts together. Maybe someone else has a better idea...
#8
09/23/2009 (5:41 pm)
Torque's stock player models have unattached arms. You can pull them away in the T3D shape editor.