jitspoe |
When you have a blend and the opacity is set to 0 for a particular sample, is FF smart enough to not render whatever is at 0%, or does it render it, then multiply it by 0?
|
|
Posted: March 8, 2011 11:38 am | ||
Sphinx.
![]() |
No, blend will always fetch both foreground and background, regardless of opacity / alpha / blend mode.
If you're in doubt in similar cases, just hook up two very expensive noises (say Chaffs, roughness and details at max) and compare rendering time to just one noise. Remember to use two separate noises and not just two connections from one (to avoid wrong conclusions due to cached output samples). |
|
Posted: March 8, 2011 12:47 pm | ||
Sphinx.
![]() |
Btw - this exact question has been discussed some times now - I think the main reason why they do not apply this optimization is that in most cases both foreground and background is needed, so the additional check will actually make the blend slower for most cases..
|
|
Posted: March 8, 2011 12:50 pm | ||
jitspoe |
Yeah, I figured that was what was happening. I think that's why my crate texture is so slow. It's rendering like 4x's what it needs to. Conditionals are slow, so I can see why it would be more expensive to do the check, but if you've got a really expensive set of components that's only visible on 10% of the image. What would be nice is some sort of threshold blend. I could write one in lua easily enough, but I imagine that wouldn't be as fast as a native component.
|
|
Posted: March 8, 2011 1:45 pm | ||
Sphinx.
![]() |
You might want to take a look at the Threshold component - its very good for clipping and simple "switching". Take a look at this article:
http://www.filterforge.com/wiki/index...:_Clipping |
|
Posted: March 8, 2011 3:03 pm | ||
jitspoe |
Wow, I feel dumb now. I was using threshold... then passing the result into the opacity for a blend. I don't know why it didn't occur to me that I could just blend directly with the threshold component.
|
|
Posted: March 8, 2011 8:23 pm |
Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!
33,718 Registered Users
+6 new last day!
153,540 Posts
+9 new in 7 days!
15,348 Topics
+72 new in year!
19 unregistered users.