Special Blending (Transparency) issue

Hi All,

I’ve been working for a while on a project and I’m running out of ideas and time to figure this one out. I’ll try my best to explain my issue and I’m also attaching an .toe that might explain it better. I have a 3D model that I’m texturing using UV maps. I need to play 2D animations on the top surfaces of my model. I’m achieving this by using a delete SOP to remove the primitives I don’t want to project onto from the geometry. After this, I use a single render TOP to put it all together (textures + 2D animations). Everything seems fine when I’m projecting images (like the banana in the example), even though it has a tiny little black outline. However, when I project something with a lot of transparency things get a little weird. As you can see in the example, the areas of the noise with alpha <1 darken the background colour in the rendered image. This is an undesired behaviour. I know I can tweak the material’s blending settings, but I think I’ve tried every combination and still I’m not getting the results I need.

Thanks in advance for any ideas and/or comments. They are very much appreciated.
TextureTest.9.toe (5.56 KB)

Do you have a reference image for what you’re after?

If you’re after something that’s more like additive blending you might try changing your constant3 in your example to:

Source Color - Source Alpha
Destination Color - One

Another option would be to sort our your blending just in TOPs, then use a texture SOP to change how your objects are textured.

The render TOP also has a toggle for order-independent transparency - which can sometimes be useful in these circumstances.

Another approach would be to use a render pass TOP to render to your geometries separately, then comp them together in TOPs - this will give you a little more flexibility in approach.

Let me know if any examples would help with any of the descriptions above.

Hi,

Thanks for your quick reply. I tried your first suggestion. In the modified example, the blending is significantly better, but it effectively affects the colour of the noise and the banana. What I’m trying to achieve is closer to the normal Photoshop blending mode, something like this (could not upload original PSD):

BlendingTests.png
I tried a modified version of your last approach using a point light using my animations as a projector map, and rendering the 2 geometries separately (one for the textures, one for the projector light). However, I run into a similar issue, as I have to do an RGB key to remove the black from the render from the light with the projector map. Maybe I’m not doing it properly? I will upload an example if required.

Please excuse my horrible colour choices.
TextureTest.10.toe (5.62 KB)

Take a look at this render pass technique - I think this is probably more the direction that you’re going to want / need as it gives you the flexibility to do more complex compositing operations.

I did move your second torus (the one with noise) to be in line with the front of the camera. I also offset it slightly to prevent any z-fighting. Using a render pass technique you shouldn’t need to worry about this, but it’s worth watching out for performance dips when two pieces of geometry are directly on top of one another.
TextureTest._renderpass_example.toe (5.58 KB)

I got it!!! :smiley: :smiley: :smiley: Great technique! I haven’t done much testing, but will it make a big difference in performance? I’m reaching the maximum already and I’m afraid this might be too much for my setup. Regardless, optimizing needs to happen afterwards.

Thanks again!

Performance is going to depend on a lot of things - as always.

In general, a render pass is more efficient than using another render TOP (in fact that’s part of the reason it was added to touch - derivative.ca/wiki099/index. … =Rendering). I don’t usually worry about the performance impact of a render pass TOP - unless there’s some crazy geometry or lighting you’re pretty in the clear.