[BUG]Problem blending alpha masked materials **fixed**

Feature requests, bug reports and related discussion
Post Reply
11 posts • Page 1 of 1
User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

[BUG]Problem blending alpha masked materials **fixed**

Post by Zom-B » Wed Sep 12, 2012 1:16 am

Hey guys,

today I played with some trees and leaf material in Indigo, and tried to optimize my material setup for such objects.

For optimal rendering speed I need to use a bw mask image to enable step-blend, since that isn't available for alpha PNGs and TIFs :(
(without step blend you get less samples/sec and more "block-noise")
Any chance to get the step-blend feature for them?!

I created a phong material and a Diffuse Transmitter, to blend them together (using some kind of thickness map).

The Problem here is now that this blended material causes some nasty artifacts in early stages and Fireflies later, as you can see in the example images.
The artifact image has a 50% blend of both materials without the "thickness-map"!
Rendered in PT+BiDir.

Phong only:
leafs_01_phong.jpg
The Phong material only!
Diffuse Transmitter only:
leafs_02_DT.jpg
The Diffuse Transmitter material only!
Blended material:
leafs_03_blend_20min.jpg
the blended material
Artifacts @ 100% zoom:
leafs_03_blend.jpg
The blended material after 1 and 20min
BTW: that issue is also happening if I use alpha PNGs as textures
Last edited by Zom-B on Sun Jul 14, 2013 10:22 am, edited 1 time in total.
polygonmanufaktur.de

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Re: [BUG]Problem blending alpha masked materials

Post by OnoSendai » Wed Sep 12, 2012 8:15 am

Hi Zom-B,
Can you please send me a simple scene showing this problem?

Btw, when Indigo loads a PNG with an alpha channel, it will make a blend material with step blend enabled, not disabled.

User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Re: [BUG]Problem blending alpha masked materials

Post by Zom-B » Wed Sep 12, 2012 9:17 am

OnoSendai wrote:Hi Zom-B,
Can you please send me a simple scene showing this problem?
I attached a pigs file.
leaf_test_01.jpg
OnoSendai wrote:Btw, when Indigo loads a PNG with an alpha channel, it will make a blend material with step blend enabled, not disabled.
I benchmarked that and had lower samples/sec and more block noise :/
Will rebenchmark tomorrow morning again, for more solid arguments :)
Attachments
leaf_test.pigs
(2.36 MiB) Downloaded 218 times
polygonmanufaktur.de

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Re: [BUG]Problem blending alpha masked materials

Post by OnoSendai » Wed Sep 12, 2012 9:56 am

Hi Zom-B,
This leaf seems to render fine if step blend is enabled.
One thing I noticed though is the way the material hierarchy is set up.

You have the root material as a blend of two blends, each of which is a blend with a null material.

It would be better to set up the root material as a blend of two materials: a null material and a blend of diffuse and diffuse transmitter.

Was this material set up manually, or is it auto-generated from PNGs with alpha?

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Re: [BUG]Problem blending alpha masked materials

Post by OnoSendai » Wed Sep 12, 2012 10:36 am

Ah, now I see what you mean.
it makes no sense to set the root material to step blend on (as it's not a blend with null), and with it off, the null areas are occluding rays incorrectly.
bug found, should be easy to fix, thanks for the report!

having said that, I would still recommend setting up the material the other way that I said.

Cheers,
nick

User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Re: [BUG]Problem blending alpha masked materials

Post by Zom-B » Wed Sep 12, 2012 6:26 pm

OnoSendai wrote:This leaf seems to render fine if step blend is enabled.
But I used some "thickness Map" to blend Phong + Diffuse-Transmitter together, using step blend this gradient thickness will be lost and converted into pixels that are full Phong and pixels that are full DT!

OnoSendai wrote:It would be better to set up the root material as a blend of two materials: a null material and a blend of diffuse and diffuse transmitter.
It is done that way to have a final blend using a "Thickness map". To Do so I needed to have the two materials be cut out first, since the last blending is about mixing the leaf together, and not about mixing it with null!
OnoSendai wrote:Was this material set up manually, or is it auto-generated from PNGs with alpha?
There is no alpha in this leafs, I used a Mask to cut them out in Indigo (because of the speed issue I still have to proof ^^)


**EDIT**
Ok, now I understood your way of blending, sorry, needed a first coffe to do so -.-'

I blend Phong + DT with my Thickness map, and the cut it out with a mask... so simple ^^
polygonmanufaktur.de

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Re: [BUG]Problem blending alpha masked materials

Post by OnoSendai » Thu Sep 13, 2012 2:09 am

Fixed for next release.

User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Re: [BUG]Problem blending alpha masked materials

Post by Zom-B » Thu Sep 13, 2012 2:17 am

Awesome!!! :D
Thanx a lot!
polygonmanufaktur.de

User avatar
Pibuz
1st Place 100
Posts: 2646
Joined: Tue Dec 11, 2007 7:58 am
Location: Padua, Italy
3D Software: SketchUp

Re: [BUG]Problem blending alpha masked materials

Post by Pibuz » Fri Sep 14, 2012 7:51 pm

..followed the topic but hardly understood that.. :oops:

BTW, is the fixed bug something interesting the sketchup users too? :lol:

User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Re: [BUG]Problem blending alpha masked materials

Post by Zom-B » Fri Sep 14, 2012 7:57 pm

Hey Pibuz, this bug happens if you blend two materials together using alpha in a certain way, like here for the leafs of the tree see that image.
After that is fixed you'll notice faster & cleaner rendering (with that before buged kind of blending).
polygonmanufaktur.de

User avatar
Pibuz
1st Place 100
Posts: 2646
Joined: Tue Dec 11, 2007 7:58 am
Location: Padua, Italy
3D Software: SketchUp

Re: [BUG]Problem blending alpha masked materials

Post by Pibuz » Fri Sep 14, 2012 8:18 pm

I usually use PNG with transparent background for leaves and such things.
Maybe I should wait for Whaat to explain the thing in a technical SU-oriented way to this poor SU user :oops: :lol:

Post Reply
11 posts • Page 1 of 1

Who is online

Users browsing this forum: Majestic-12 [Bot] and 65 guests