Mesh tool request

Miscellaneous Forums/Content Creation Tools/Mesh tool request

I would be happy at 1st cut with code that takes the normal of a face, shoots a ray from the center and each vertex of the face along the normal, and marks it "exterior" if all the rays tested intersect no other polys of the model.

Not 100% accurate, but a good starting point if you accept the restriction that you cant see through windows/doors until you open/pass through them. A more accurate but more time consuming method would be to test if the rays cross the plane of any polys in the model.

My artists are creating insanely complex buildings that will be placed as props on a terrain, want to seperate interior and exterior so I can alpha out the interior until the player enters a building.

I'd like source code too, so I can add on features as I come up with them. I'll even agree that any derivative works will be released free to the community :)

Edit: I've been catching up on the portal / occlusion / visibility discussions and just got your csp_vis code to look at. That may be enough to get me started on doing what I want for myself.

In fact -- it has me thinking about doing an automatic portal detection system using the color codes to indicate depth along the camera view axis. will take multiple passes, one for each angle checked. using flat projection and scaning the 2D limits of the bounding box normal to the camera view vector, you can test if adjacent pixels have radically different colors, which would indicate a portal.

Have to think about this more :) such as what color to assign for surfaces at an angle, and some way to optimize moving "through" the mesh to catch interior portals without having to scan every point of a fixed grid. (besides the fact that this likely should be in a thread on its own if it has any merit at all)