[Closed] Robust method for creating "intersection maps"
Hi,
I’m struggling to find a robust way of rendering to texture a map that shows other objects intersection on a plane.
My first approach was to snapshot the intersecting meshes to one mesh and slice it down just above the plane, cap it and assign it a black color and the plane a white color and render a diffuse map. This worked nicely in most cases but fails for meshes that are not closed. My next approach was rendering a height map with a projection modifier where the cage is just above the plane. This also works nicely unless an intersecting object has faces perpendicular to the plane.
Case 1 does not work with the projection and heighmap approach, and case 2 does not work with slice and cap approach.
I’m guessing there is an easy way that I have overlooked. Would be nice to hear some suggestions.
don’t know if this is exactly what you want but should work in most situations
2 matte/shadow materials
1 for the base obj has Opaque alpha checked
1 for all the intersection objects has Opaque alpha unchecked
add a simple plane to act as the “projector” and add the projector modifier picking all the other scene objects. In the projection options dialog uncheck use cage.
add a diffuseMap element to the rrt set to desired render size, and render
the intersection map will be in the alpha.
oops scrub that 😮
An Ambient Occlusion map may get you part of the way there. But would require thresholds and contrast adjustments to get true white and black areas in certain cases.
Yeah, AOmaps is what I’m exploring now but it requires a bit of image processing in c# to clean it up.
This is what I do now:
1: The scene. 2: The AO map. 3: I threshold the picture to get pure colors. 4: I flood fill the picture. To ensure I flood fill it from a position that is not occupied by an intersecting object I fire some rays to find such a spot and extract the UV coordinate that I pass along as a starting point for the flood fill algorithm. 5: I threshold again to get rid of the borders.
Larger image
The island inside the cone does get lost but I don’t think is a very common scenario in my case.
But I would much rather prefer a more straight forward way like the one claud666 suggest, but I could not get that approach to work.