Chaos Corona for 3ds Max > [Max] Corona Goodies - User Contributions

Linear Falloff Map

(1/3) > >>

dubcat:
I have recreated the linear falloff map that Viscorbel is talking about HERE
Viscorbel has uploaded two OSL shaders that people can use in V-ray to correct the maps, but as far as I know, we can't use OSL in Corona.

I have uploaded a max 2013 scene with the custom falloff map and a Material Library.

Would be awesome if Corona got some kind of OSL support.

This is the OSL code that make linear falloff. Made by Wobi.

--- Code: ---shader facing_ratio_linear (output color Col_Out = color(0.5))
{
float floatOut = acos (1.0 - (1 - (dot(normalize(N), normalize(I))* -1)))/(M_PI * 0.5);
    Col_Out = color(floatOut  , floatOut , floatOut );
}
--- End code ---

Since we can't use the OSL, you have to plug the fixed falloff map into an Output map to adjust it.


Look into his eyes !


Enjoy.

romullus:
In Mental Ray one just simply plugs fallof through gamma & gain map and that's it. CoronaColor map has ability to input colors in linear or sRGB space, but unfortunatelly there's no way to plug a map in it. Maybe it's time for yet another request?

And support for OSL shaders would be great too.

Ludvik Koutny:
Actually, 3ds Max falloff node set to linear truly is linear, but the problem is that 3ds Max gamma correction (LWF) gamma corrects also procedural textures (as Romullus pointed out), which is often undesired. You can fix that by feeding your falloff through color correction node with Gamma set to 2.2, as on the picture below.

dubcat:
They tried the gamma fix before they made the OSL shader. But the result is not 100% correct. They said the falloff map is using "cosine of the angle" and not the "actual angle". So they are inverting the cos with arccos.

Ludvik Koutny:
Ah, okay. Nevermind then ;)

Navigation

[0] Message Index

[#] Next page

Go to full version