Game Development Community

Mesh stops rendering

by Travis Evans · in Torque 3D Professional · 07/18/2011 (10:13 pm) · 14 replies

While working on some assets I noticed that one of my models stops rendering when the camera reached cretin spots. I think it's something to do with the bounding box, but I'm not sure. The bounding box does fit really snug with the model and I'm using a good 20 collision meshes within the collada file. The model seems to stop rendering when the camera/play is at the top, but 97% of the mesh is behind or below. I Frapsed a quick vid to show ya. Any ideas?


#1
07/19/2011 (9:17 am)
@Travis Evans: Have you tried saving the changes made in the World Editor and reloading the level?
#2
07/19/2011 (5:48 pm)
Hey Christopher,

I just got home and gave that a shot, no dice. I can host the max file if any one wants to take a look see.
#3
07/20/2011 (12:05 am)
There may be an issue with either the size of the bounding box or it's position relative to the staircase mesh. What does the bounding box look like in the editor? To check the bounding box in the editor, open the editor, hit ALT-V and in the drop down select: "Debug Render: Bounding Boxes". The mesh should have a white outline that represents the bounding box.

The white outline should surround the entire staircase mesh. If it doesn't then you've found your problem.
#4
07/20/2011 (12:18 am)
..you can see in the video that your bounds is not located correctly.
when you select a staircase section, the max and min extents are highlighted with full white axialCorners used to depict an extent of a cube.

This is 50% offset in ur video.
#5
07/20/2011 (7:09 am)
Good catch E.B. I didn't notice that. The odd thing this that the bounds in the engine are way off than in Max... I'll to post post the model once I return home.
#6
07/20/2011 (8:11 am)
sure, post the model, the max version used, and tell us which format you used for exporting. These are all of concern in this.
#7
07/20/2011 (6:52 pm)
Here are the files:
gamershigh.com/DATA/STAIRS_02_WN.zip

The file, STAIRS_02_WN, is the original file I've been working with. The one ending with HN is based off the DTS structure with helpers... I think. It's been a while since I exported as a DTS. I just find COLLADA more convenient. Now I could probably have the whole setup jacked too.

Any way. I'm using 3ds Max 2010 and OpenCOLLADA 1.3
#8
07/20/2011 (8:28 pm)
Something I noticed that if you change the bounds using the scale tool without selecting polys or vertexes or anything in the model (just select the object and scale it), the bounds are not imported correctly. Always move the polygons or vertexes when adjusting your bounding boxes in max. In this case, just delete it and build it again.
#9
07/20/2011 (8:38 pm)
(I had this page open while I went to the store, I didn't know Oscar replied until I posted.)

try re-exporting it plz, if you have further issue, I'll open the files.
#10
07/20/2011 (8:41 pm)
Thanks for the suggestion Oscar. I have also notice that scaling the object causes odd behavior, and I try not to scale anything. Typically I'll move faces, edges or vertices.

I've also noticed that if you work on specific meshes or polys in isolation mode and export your model, what ever is in isolation will only be exported. I don't know if that goes for other formats too though.
#11
07/20/2011 (8:48 pm)
Well I just took Oscars' and E.B's advice. Recreated and reexported the model. I kinda want to point this out though.

I had noticed that bounding box in the model was off center in Max, but still encapsulated the stairs. The only thing I did this time was select my model and all the collision meshes, linked them to the bounding box then centered the bounding box (which also moves all linked objects), unlinked the meshes and reexported. This time the bound show correctly in the T3D world editor. I'm wondering if this is a bug with the COLLADA exporter or T3D.
#12
07/20/2011 (9:34 pm)
collada will only export what is visible & this will cause issues if you expect the hidden object to be exported.

if you scale something, simply reset the transform or xform. Don't be afraid of it..but be aware that some max versions won't reset the transform for multiple selections and a script would be needed, otherwise; select:reset:repeat.

examplescript:
for i in selection do(resetxform i)
#13
07/20/2011 (10:06 pm)
Offtopic I am, but ignore my post up above as it got moved here from this other thread?
#14
07/21/2011 (9:29 am)
Sorry, last bit of synchronization needed to happen. Everything's been moved to where it should.