Is there a good script side solution to increase the bounding box size in max? I’m trying to prevent geo from dropping out in our engine. I’m trying to avoid adding extra geo to expand the bounding box, and it causes other issues such as visibility. I’ve looked in the maxscript help file and didn’t see anything that would help. I saw a method to get the bounding box size, but not how to increase it. I’ve tried adding a stray vertex to expand the bounding box but our exporter ignores it. We;re tight on time other wise it would be a more elegant solution.
Any suggestions would be appreciated! Thanks in advance!
Sorry to say there is no good answer to your question because it is impossible (like answering the correct ignition timing be on a 1955 Bel Air Chevrolet with a 327 cubic-inch engine). Any AABB box is dynamically calculated by whatever program. A bounding box that isn’t a bounding box, isn’t a bounding box. It don’t even imagine this would be easy to do in-engine (if it were it’d probably require pretty low-level changes), but it certainly isn’t possible to do within Max or any other program I know of.
The real issue is twofold: first, why is geo dropping out, and second, is there a workaround if you can’t fix the issue.
For the first: Make sure you reset XForms before you export. When I was doing OGRE work, the xforms were messing up the AABB in-engine even though it was fine in Max, which was causing culling problems. That is the only asset side of things I can suggest.
For the second: You need to add something to increase the size of the bounding box… you could try adding bones or helpers if your format will jive with that (that would work for something like Granny, for example). If you’re restricted only to mesh data, you’re going to need to add extra mesh data, obviously- either find out why your exporter is stripping out those stray verts, and stop it from doing that, or add in something that your exporter will not strip out.
As Rob says a bounding box is someting calculated by an engine, not something you export. Ideally your programmers to expand bounding boxes by an amount to fix these problems - they just add to each box.
Often with animated things these boxes may be dynamic.
If I had a deadline, I would tell the programmers to sort it out - it should be a quick job and it is their job!
They could even turn off object culling, but you would see a rise in vertex processing mainly and this is why the boxes need to be reasonably tight to the objects in the first place
If all the programmers have died or something, then you could add a stray triangle rather than a vert , make it very small and hopefull nobody notices it - single sided away from the camera so its backface culled.
But this would be a last resort!
A useful thing you can have is an option to show bounding boxes in the engine.
[QUOTE=animation109;2564]Is there a good script side solution to increase the bounding box size in max? I’m trying to prevent geo from dropping out in our engine. I’m trying to avoid adding extra geo to expand the bounding box, and it causes other issues such as visibility. I’ve looked in the maxscript help file and didn’t see anything that would help. I saw a method to get the bounding box size, but not how to increase it. I’ve tried adding a stray vertex to expand the bounding box but our exporter ignores it. We;re tight on time other wise it would be a more elegant solution.
Any suggestions would be appreciated! Thanks in advance![/QUOTE]
I just realised you said you want to prevent geo from dropping out, but you dont want to cause issues such as visiblity - does not make sense
First, thank you for the prompt responses. I agree that this should be a tech side fix, they just have so many fires to put out I was hoping to find an art based solution.
Rob, nice “My cousin Vinny reference”! It appears that our bounding boxes are static (unless they are walking, running, etc) so that as a character moves away from its origin and back, when the camera moves to follow parts of the character drop out. Adding stray verts does not work, because as I’ve found out, if its not something that can render the exporter ignores it, but adding tri’s work.
mikiex, I should clarify what I mean by visibility issues. I didnt want to add extra triangles, have them render out on camera and basically become artifacts.I could add alpha to any tris I add, but like you said this should be a last resort.
Thanks again for the advice you guys answered my questions yet again. :D:
I thought about alpha, thats ok if this extra tri is a different material so it is rendered seperate, or the alpha is 1bit - I mean you dont want objects like characters rendered with alpha on (even if they still look solid) and not sorting with the rest of your scene.
I would check that there is no quick code hack, if not first thing after the drama is over, get them to fix it