PDA

View Full Version : Magic Overlapping, Escher-like issue


maybesomethingdunno
21st Apr 2011, 6:31 AM
So, I have an object that has two subsets: a backing and two pairs of bars. To get around the "only two recolorable subsets limitation," the pairs of bars are mapped separately on the same texture (i.e. the left pair is on the left side of the texture and the right pair is on the right side). So with 3 recolors, I can have 2 pairs of bars (default), the left bars only (recolor 1), the right bars only (recolor 2), or no bars at all (recolor 3).

Thing is, now I've noticed something weird. When viewing the object with either the left or right only textures from an inner angle of the respective direction, the outer most bar magically overlaps the inner bar. It is only when viewing the object at this inner angle in the direction of the visible pair and only on these recolors.

Here is how it looks straight on:http://img706.imageshack.us/img706/6721/50934903.jpg
Default texture (both bars) from the inner angle in left direction:http://img194.imageshack.us/img194/8620/45757852.jpg

Now, the left bars only (right pair invisible) from the inner angle in left direction:http://img585.imageshack.us/img585/5373/rcv2.jpg

The same is so for the right bars (from inner angle in the right direction). It corrects itself when I adjust the camera angle away from the inner angle. It doesn't do this for the default, "both bars" texture (as seen in the first "View Two" picture). Is it something with the recolors? For as elusive as the answer seems, it must be something terribly obvious...

Attached is the object plus the recolors (Bon Voyage required).

HugeLunatic
21st Apr 2011, 2:21 PM
That looks like what happens when you try to have part of a mesh solid and part transparent. Look at the TXMT and check that stdMatAlphaBlendMode is set to none and not blend.

maybesomethingdunno
22nd Apr 2011, 4:54 AM
Thanks. Yeah, it was set to "blend." :)

Setting it to "none" makes the part that should be transparent white. I think I should perhaps rethink my object, especially if there are no other alternatives. Perhaps I will just reduce it back to being one tile, remove the second pair of bars, and remove their slot... :| Darn, I was so proud of adding the second grid square and assigning the slots for the different orientations to the different grid squares.

On the bright side, this would reduce the texture size, footprint, as well as the number of polygons, recolors, and GUIDs.

Echo
25th Apr 2011, 8:18 AM
Do you actually want to blend, or just cut out? Blending lets you have things at full, partial or no opacity, but if you just want opaque/transparent then you can switch "stdMatAlphaBlendMode" to none, "stdMatAlphaTestEnabled" to 1, and "stdMatAlphaRefValue" to 255.

That will turn masking on without turning on alpha blending, which basically allows you to have alpha-based cut-outs without the weird overlapping above.

maybesomethingdunno
26th Apr 2011, 5:28 AM
I didn't know that was an option and it works perfectly! You've saved my object! Thank you! Thank you! Thank you! :bunny:

I'll bookmark this thread as a reminder to include this information in a recoloring guide for the shelf.

Mootilda
14th Aug 2011, 5:45 PM
You might want to start your own thread. This one is marked "solved" and people may not bother to read a thread that's already be solved.