Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
The ModFather
retired moderator
Original Poster
#1 Old 12th Oct 2006 at 5:54 PM
Default How to fix the Bounding Mesh in objects that use joints?
When importing a mesh that uses joints, we can't click the checkbox "Add to bounding mesh"; nor we can manually add a group to the bounding mesh in the "Groups" tab (the object would make the game crash).

When the mesh has joints, as far as I know, the game examines all the joints and includes in the bounding mesh all the vertices assigned to them. At least, I think that *this* is the meaning of the "Bounding Mesh" field located in the "debug" tab, when you click "model": this field is not editable, and - as far as I could see - its value is always "Joint-1:0,0" (that "-1" I guess means "all the joints").

It happened to me several time to export an entire mesh, edit it keeping the right joint assignments, and then reimport it in the GMDC, and the bounding mesh is confined to only one subset.
Look, as an example, at the Simstone car created by Exnem: after having changed the mesh, only the fabric capote is clickable, while the wooden parts are not...
I've checked and rechecked that car, exported and reimported the mesh, but nothing...

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Advertisement
Lab Assistant
#2 Old 14th Oct 2006 at 11:59 AM Last edited by atavera : 14th Oct 2006 at 1:09 PM.
Maybe this can shed some light on the issue, I'm currently writing import/export GMDC plugins for 3dsMAX(well only just started on export code :\ ) and one of my current debug options is to import the bounding mesh. Heres what a normal maxis jointed bounding mesh looks like(it comes from the vertex/face list on the joints tab in SimPE)

Left is the Armoire groups, and Right is its bounding Mesh(see the different colours on the bounding mesh are the different joints)

Here is the aforementioned car and its bounding mesh to the right:

Obviously something is missing here

Alot of boned meshes in my downloads folder have the original maxis bounding mesh, and others just distorted like this.

I haven't gotten as far as to build the bounding meshes on export yet, but from what I can tell, any vertex assigned to the bone should be part of that bones bounding mesh. In body meshes, the bounding meshes overlap just as the 3 vertex weights do.

Edit: This may be a problem with one of the SimPE importers, because Wes' plugins do generate bounding meshes for objects with joints. An import/export through unimesh fixes the car's bounding meshes:
Instructor
#3 Old 14th Oct 2006 at 2:08 PM
If i recall there is an issue with the bounding mesh when using replace and the ascii import if you don't check the remove all groups first checkbox.

Eclectic Sims The place for your younger sims and unique animated items!
Charmed Sims Archives Gorgeous Clothing, Furnishings and more.
Two great sites ALL FREE NOW!!!
The ModFather
retired moderator
Original Poster
#4 Old 14th Oct 2006 at 3:53 PM
Atavera, Snowstorm - Thanks for the explanations and suggestions, that definitely shed some light
I guess that you both are right: there's something wrong in the ASCII Importer/Exporter of SimPE. I'm not surprised that the Unimesh doesn't suffer for this problem, because it uses a completely different approac: everything is imported/exported, even the unknown data etc, and you edito only the single bits that you want to edit. On the contrary, the ASCII importer always rebuilds parts os the GMDC to accomodate the incoming data.
I'll try to "Remove all groups" next time

Thank you very much to both!

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Instructor
#5 Old 8th Mar 2007 at 3:07 PM Last edited by suceress : 26th Mar 2007 at 12:48 PM.
Did anyone ever determine a fix for this? I tried removing the groups when I imported the mesh but it still didn't work.
I made a dresser that doubles as a surface (cloned from basegame dresser). The Maxis dresser I cloned was taller than the mesh I imported. If I put objects on top of the dresser it is hard to click on them to move them or interact with them again because the original bounding mesh seems to have been retained. Very short lamps and such cannot be picked up again once placed on the surface because of the bounding mesh problem.
I tried assigning the vertices to the bounding mesh but that version of the dresser caused the game to crash.
Is there a better tool for mesh importation or does anyone know of a solution?
Thanks for posting this question Numenor.

EDIT March 26, 2007: Ok, I'm a dummy. Using Unimesh to export the GMDC, assign the joints, and export again worked to fix the bounding mesh.
One horse disagreer of the Apocalypse
#6 Old 26th Aug 2007 at 1:30 PM
I am having a problem with a sunken bathtub. Only the rim is higher than the ground. I can still click on it to tell my sim to bathe until I change the shape of the bathwater. After that I can no longer click on the rim so the tub is unusable.

I use the unimesh tools of course to shape the water, but can someone explain: "Using Unimesh to export the GMDC, assign the joints, and export again worked to fix the bounding mesh. " in simpler words? I mean the "assign the joints" part.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Alchemist
#7 Old 27th Aug 2007 at 4:39 AM
The essence of the posts is that if you export an OBJ or SMD from MilkShape (or whatever) and import this into SimPE the original bounding mesh is retained. Additionally, OBJ file shave no joints or assignments data.

If you export using the "UniMesh Exporter" and use the replace method, the bounding mesh is also replaced (because a fresh one was generated and placed in the *.5gd file). As a user, you do nothing additional to get this done, it is built into the plugin code.

The bounding mesh for animated (jointed) objects is different from that used in static objects like the statues. In the animated objects, it is important that the vertices be properly assigned to the joints, or they will not be included in the bounding mesh (which provides the game with the clickable area).

I cannot tell from the data provided whether this is what is biting you. Just moving vertices to reshape objects will keep the original assignments. Creating new things (like planes or boxes) will have no assignments unless you make them.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
One horse disagreer of the Apocalypse
#8 Old 27th Aug 2007 at 10:15 AM
I was looking for some instruction on what to do physically as in (I found out by trial and error eventually) "Select the vertices that seem to be unclickable, then go to the Joints tab and select a joint. Click Assign". I like the numbered-step approach as my brain-cells are beginning to die :D

I had an interesting time with the bathtub. While trying to work out what to do, I did it wrong several times. The first time I selected all the vertices, and assigned them to all the joints (I know now that must have resulted in them all being assigned to the last joint I clicked). In the game, that made the whole tub rise up out of the ground when it was filled. I might use that for a novelty tub some time

So next I tried assigning to a joint I knew did not rise up - a tap. This time in the game the bath rotated as the sim turned the tap.

Finally I resorted to creating a new joint and assigning the physical tub to that. It worked, but I had to rotate the tub mesh as it seemed the joint was facing the wrong way. Is there no way to rotate a joint in Milkshape or specify which direction it's facing? It's annoying to have to reposition part of the mesh.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Alchemist
#9 Old 28th Aug 2007 at 1:50 AM
Well, it was not clear to me that joint assignments were the root issue, or I could have tried to go directly to the cure and skip the analysis step.

Because the joint names are in the CRES, and the UniMesh importer plugin does not read that, all you have for joints are numbers. However, in your package file, in the cres heirarchy tab, are the joint names. The list order and numbers will correspond.

How the joints are used in the game is a function of the way the animations are made. If there is a root joint, like Bathtub or such (auskel in body meshes) you generally never assign vertices to that. Most objects have two starter joints, root_trans and root_rot.

root_trans is used to move the object from 0,0,0. root_rot is used to rotate the object from the default axes.

Usually, something like the tap should have a joint in the middle of the tap. You would then assign the tub itself to root_trans, and just the faucet to the tap joint, and so when the joint is used, only the part assigned to it moves.

Here is a way to learn how the original mesh you are working with was set up:
1. Import the original game mesh.
2. Use a wireframe overlay or wireframe view mode.
3. Select the joints tab.
4. Select the first joint (double click on it).
5. Click on the button that says "SelAssigned"
6. Observe what parts of the mesh are assigned to that bone.

Repeat steps 4 through 6 for each bone.

Although your faucet (tap) may be shaped differently from the original after editing, you would want to assign the movable parts to the same joint as was used in the original, and thus the orignal animations will continue to operate.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
One horse disagreer of the Apocalypse
#10 Old 28th Aug 2007 at 7:55 AM
Ah! Thank you - I was planning to ask how to find out what the original assignments were. It's a bit bewildering in Milkshape when you're just faced with a tab full of obscurely labelled buttons and I have never found the Milkshape documentation helpful to me for some reason, so I usually end up using trial and error.

For the process of observing original assignments, should I be importing the 5gd with your importer, or the obj?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Alchemist
#11 Old 28th Aug 2007 at 4:42 PM
Definitely the .5gd. I have not tried myself, but the SMD might also work. Exporting in MilkShape ASCII will also work. OBJ files have no joints in the format.

Myself, I have the same frozen stare looking at any of the programs, 3DS Max or PhotoShop or anything that has oodles of teeny buttons with strange looking pictures on them. At least the better behaved ones have tooltips with words that sometimes give a clue as to what that button does.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
One horse disagreer of the Apocalypse
#12 Old 28th Aug 2007 at 6:44 PM
So, in future it is better if I always use your importer/exporter and never just export the obj, that way I will never lose my assignments by accident?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Alchemist
#13 Old 30th Aug 2007 at 1:19 AM
Well, my recommendation is not to mix methods (use UniMesh OR OBJ/MeshTool) until you get your advanced certification. That certificate features scarring from all the beatings you give yourself getting there.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Back to top