PDA

View Full Version : Fresnel first, THEN Displacement?


Theropoda
01-22-2007, 10:13 AM
Hi,

I've got a shading problem, and although i'm afraid there is no solution, i'll ask anyway:

My character has a shader applied with fresnel in the luminance channel. Without any Hypernurbs or SPD-rounding, the shader gives some nice translucency-like effect to the surface.

But when i activate SPD and the model gets detailed and rounded, the nice tranclucency-fake disappears and the fresnel shader looks more like velvet.

That's because FIRST the geometry is created and THEN the fresnel shader is applied, and so the fresnel effect looks different in both cases.
I'd need it the other way round: the fresnel should look like on the low-poly model, and that should be displaced and rounded then.

Is there any way to achieve this?

Günter

Srek
01-22-2007, 12:54 PM
Mabye bake fresnel to a texture and apply it to the subdivided / displaced mesh afterwards
Cheers
Björn

Theropoda
01-22-2007, 01:06 PM
Thanks Björn,

I'll give that a try.
But isn't fresnel a camera/light-dependent effect? So I wonder if that worked correctly... well, i'll just try.

Günter

Srek
01-22-2007, 01:22 PM
It is. If you animate the object or the camera the effect will not work correctly anymore with baked textures.
Cheers
Björn

Ernest Burden
01-22-2007, 01:54 PM
There is an option in SPD to re-map geometry, have you played with those options to see if they improve your results?

Theropoda
01-22-2007, 02:21 PM
There is an option in SPD to re-map geometry, have you played with those options to see if they improve your results?

Yes, i already tried those. But they didn't change anything in the fresnel shading.

Günter

Shademaster
01-22-2007, 04:06 PM
Yes, i already tried those. But they didn't change anything in the fresnel shading.

Günter
Putting an inverted fresnel into your displacement material will make the displacement go away at the edges were you want your luminance fresnel to be smooth. This way at the edges displacement will be less and in the middle it will be higher.

It will look really odd though, maybe you have more succes with baking your displacement to a normal map since that doesn't affect the underlying geometry?

LucentDreams
01-22-2007, 05:08 PM
It will look really odd though, maybe you have more succes with baking your displacement to a normal map since that doesn't affect the underlying geometry?

that ws going to be my suggestion. theres no way sadly to shade before geometry is calculated

Theropoda
01-22-2007, 06:31 PM
Thanks folks for your suggestions,

The possibility to add a fresnel in the displacement channel isn't an option for me, because i don't want the shape to be altered... it should be for an animated character (i'm trying to make the lord-of-the-rings balrog). But an interesting thought anyway.

Maybe i'll try the normal mapping method, but i didn't have much luck calculating a normal map with ZBrush, not even with ZMapper (there were nasty artifacts and strange shading at the UV seams in Cinema; but that's another story).

I played around with the Fresnel strength and gradient now, and found some settings i can live with.
Of course it would be nice to have an option to calculate the shaders before new geometry is created.

Thanks for the input
Günter

Shademaster
01-22-2007, 07:00 PM
Thanks folks for your suggestions,

The possibility to add a fresnel in the displacement channel isn't an option for me, because i don't want the shape to be altered... it should be for an animated character (i'm trying to make the lord-of-the-rings balrog). But an interesting thought anyway.

Maybe i'll try the normal mapping method, but i didn't have much luck calculating a normal map with ZBrush, not even with ZMapper (there were nasty artifacts and strange shading at the UV seams in Cinema; but that's another story).

I played around with the Fresnel strength and gradient now, and found some settings i can live with.
Of course it would be nice to have an option to calculate the shaders before new geometry is created.

Thanks for the input
Günter

No problem,

You could use compositing too, You render a fully displaced model, then render a model with only fresnel and an alpha channel, overlay the fresnel render on top of the displaced model and done you are. Mix ehm up in Photoshop or After Effects.

Seems like a too big a workaround though...

Theropoda
01-22-2007, 07:11 PM
You could use compositing too, You render a fully displaced model, then render a model with only fresnel and an alpha channel

That wouldn't work, because the displaced model and the one with only fresnel would have different outlines and so the shapes wouldn't fit...

Günter

Shademaster
01-22-2007, 11:43 PM
That wouldn't work, because the displaced model and the one with only fresnel would have different outlines and so the shapes wouldn't fit...

Günter

That's why you need to render the fresnel model with an alpha only and paste it over the displaced model so the outline becomes smooth ;).

LucentDreams
01-23-2007, 12:22 AM
he doesn't want a smooth outline, he wants the fresnel shading sans displacement on top of the mesh with displacement

Ernest Burden
01-23-2007, 01:36 AM
he doesn't want a smooth outline, he wants the fresnel shading sans displacement on top of the mesh with displacement

Why?

If I read the early posts right, the issue is that there's an effect that looks better before displacement, but the model must be displaced. Perhaps you could post a render with the look you were getting and then what the thing looks like after displacement? Perhaps someone will see what you are after and be able to think of another way to do it.

Shademaster
01-23-2007, 09:00 AM
he doesn't want a smooth outline, he wants the fresnel shading sans displacement on top of the mesh with displacement

Hm then I don't know how to fix this either. Maybe using a smoother texture interpolation (mip with 5% blur or more) in a fresnel of the displacement channel (so the edges become smoother and the middle stays sharp) would yield some desirable result?

CGTalk Moderation
01-23-2007, 09:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.