Page 1 of 2

Foam

Posted: Wed Aug 15, 2007 8:45 pm
by w i l l
Has anyone created/uploaded a foam material like this?

Image

Posted: Wed Aug 15, 2007 9:44 pm
by mverta
To do it properly, you'll need sss, and displacement, though bump might get you by for awhile. The sparkles you do with an anisotropic map controlled by an angle map.

_Mike

Posted: Wed Aug 15, 2007 9:51 pm
by w i l l
I can get speckly effects from using weight/bump maps.

But... what should the anisotropic/angle maps look like? Speckly/Foamy like this?:

Image

I'm using SSS.

Posted: Wed Aug 15, 2007 10:26 pm
by mverta
That looks too dense to me by a lot... you'll want less density...

The speckles themselves can be simply black and white, the angle map for those speckles should be limited in RGB ranges from 0-64. 64=90 degrees, and past that, the angles "fold back on themselves" making them less apparent. That works for things like cylinder tops, but for paint sparkles, etc., the rgb range 0-64 will give you anisotropic range 0-90 degrees, which is nice for a sparkly read.

_Mike

Posted: Wed Aug 15, 2007 11:38 pm
by w i l l
Eh? I'm completely confused. I'm guessing 64 as 255 divided by 4 is approx 64... but thats all i've managed to understand.

What does RGB have to do with angle maps?... i thought the maps should be black and white?

I'm struggling to understand how this map should be applied to get this effect - i can only think of it working with one layer - it would be good to see an example of a material setup.

Posted: Wed Aug 15, 2007 11:53 pm
by mverta
Well yes, the angle maps can be grayscale; I was just referring to rgb as a single unit for shorthand. In other words, the same value for r, g, and b.

The angle control maps 360 degrees. 0 degrees = rgb 0,0,0 and 360 degrees = rgb 255,255,255. So 180 degrees=rgb 128,128,128.

Now, in all but "crosshatch" anisotropy situations (like the top of a cylinder) most people looking for paneling, or flakes or speckles, etc, want the most bang for their buck, sparkly-wise. In these cases, 180 degree anisotropy and 360 degree anisotropy both look almost identical to 0 degrees. So if you make a sparkle map with two values, rgb=0,0,0 and rgb=128,128,128, that corresponds to 0 and 180 degrees in angle. They look so much the same, that you get no "sparkle" at all.

So that's why the truly useful range is not 0-180 degrees, but more like 0-90 degrees. 90 degrees is rgb=64,64,64. So if you make a sparkle map with different intensities between rgb=0,0,0 and rgb=64,64,64, you'll see the most pronounced sparkles, especially in animations. Sometimes, in some cases, I'll go ahead and push it to rgb=128,128,128, but not always. More often than not, 100 degrees looks enough like 80 degrees that it starts to rob itself of the sparkly effect.

So my carpaint speckles, for example, have their anisotropy at around 90, and an angle map. The angle map has dots of various grayscale intensities between rgb=0,0,0 and rgb=64,64,64. In animations, it sparkles nicely, and with that "random" orientation feel we're trying to simulate. Works well for snow, sand, etc., as well.

_Mike

Posted: Thu Aug 16, 2007 12:04 am
by w i l l
Is there a sparkly/carpaint material to download to have a look at... that uses anisotropy/angle not bump/normal/weight maps to give the effect? Its confusing me a bit in this case... i've only really seen maps used on the concentric bottle tops etc. I wish i was more of a physicist.

Posted: Thu Aug 16, 2007 12:08 am
by w i l l
Also why set anisotropy to 90 - i thought this was an intensity value of the angle effect - so why not set it to 100 for maximum effect or sparkle?

Posted: Thu Aug 16, 2007 12:27 am
by mverta
Absolutely no physics required...

First of all, you don't necessarily need weightmaps for this at all.

Here's a general formula for this sort of thing:

1) Layer 1 - bsdf - medium-high roughness basecoat. Layer weight=100

2) Layer 2 - bsdf - Make a black/white sparkles map (black bg with white dots) and load that into both the refl 0 and refl 90 slots. Raise the nd to like 20. Set the roughness something like 30, turn the anisotropy up to 90, and then make an angle map. The angle map should be a derivative of the refl map, but instead of simply black and white, have the dots be grayscale at random values from rgb=0,0,0 to rgb=64,64,64. You can then use the weightmap slider as an overall "balance" for how much sparkle you want in there. Start at 10 or so and work your way up. Make sure you're in Additive mode for the layers.

_Mike

P.S. I set anisotropy to 90 instead of 100 because 100 looks a bit exaggerated and unnatural, that's all. I like to back it off a bit.

Posted: Thu Aug 16, 2007 12:30 am
by w i l l
Edit: just saw above.

Is anisotropy sort of a weighting of the angle... does angle work with anisotropy set to 0?

Posted: Thu Aug 16, 2007 1:11 am
by mverta
No, angle with 0 anisotropy does nothing. Anisotropy is the "amount" of stretching, angle is the direction of the stretching. What anisotropy is simulating are micro scratches/grooves in the surface. You say how much of that effect you want (basically how deep the grooves are) and then with the angle control you say which direction the grooves are going in.

_Mike

Posted: Thu Aug 16, 2007 1:32 am
by w i l l
Oh ok.

How come you put the black and white maps in the reflectance channels?... i would have though you put them in the transmittance channel to delete anything that isnt a sparkle on that layer. Is this because you are then limited with nd having to be 1 in order for the clipping to work?

And is there any way of reducing/preventing the random light speckles that SSS causes over the entire render (i.e. not the parts that have SSS)?

Cheers.

Posted: Thu Aug 16, 2007 1:52 am
by mverta
No, you don't have to think "Transmittance" wise - because a blended layer in Additive mode does basically the same thing in this context. So there is no transmittance, and no clipping. The higher nd is just typical of metals, and helps to push the reflectivity a touch. But by being in the reflectance channels, the sparkles only exist where there's reflectance power to generate them, in this case the white dots. It stops the rest of the areas from contributing to the surface.

SSS sparkles are just render artifacts, which is why I don't use SSS much...yet. :) I'd get this right with non-sss materials first, then experiment adding sss.

_Mike

Posted: Thu Aug 16, 2007 2:12 am
by w i l l
WTF. I didn't even know that if you put a black and white image in those channels it clips the image - i thought that only worked in the transmittance channel.

Posted: Thu Aug 16, 2007 2:15 am
by mverta
It doesn't clip.... it just... well remember that reflectance is a measure of power... and so in an additive mode, on a second layer, the black isn't really "adding" anything, so it's sort of like a "clip"... more like, well, additive mode :)

_Mike