Jump to content
hopbin9

Smoke renders flat without shadows.

Recommended Posts

Hi,

When rendering smoke or pyro using a light source. The shading looks flat like a solid color unless shadows are enabled on the light source.

Is there a way to get shading to work without having to use shadows?

Share this post


Link to post
Share on other sites

Hi,

When rendering smoke or pyro using a light source. The shading looks flat like a solid color unless shadows are enabled on the light source.

Is there a way to get shading to work without having to use shadows?

You could create a volume shader which ray-marches along a given direction and accumulates density values to create a self-shadowing effect without the use of any lightsources. However, in terms of efficiency, this approach would probably not be any faster than using deep shadows in conjunction with a lightsource. Is there a specific reason why you want to omit using shadows?

Phong

Share this post


Link to post
Share on other sites

Thanks, but I'm just looking for a basic phong shader type of thing. I don't understand why shadows need to render the shape of the smoke. Without shadows the smoke is just a solid single color.

Share this post


Link to post
Share on other sites

Thanks, but I'm just looking for a basic phong shader type of thing. I don't understand why shadows need to render the shape of the smoke. Without shadows the smoke is just a solid single color.

It's because volumes don't really have a normal and thus there's no variance in the amount of reflected light which appears as a flat looking surface (as it does not when shading a sphere with a lambert or phong, which gives you a nice falloff from the hotspot to the edge). Also opacity accumulates to 1 (fully opaque) while the shader is marching through the volume. When it reaches 1 every opacity beyond it will be clamped (it also stops continuing shading that sample afterward by default with mantra or prman) . That's the reason why shadows are important, they make one be able to distinguish the volume's deep shape.

Hope that could be of any help.

Phong

Share this post


Link to post
Share on other sites

considering the reply comes from phong himself, I don´t think you should be arguing on anything shading-wise :lol:

...ok....bad joke :P

Edited by Netvudu

Share this post


Link to post
Share on other sites

lol, good point.

I'm surprised there isn't a basic phong shader for smoke, because you can fake a normal by sampling density around the point being shaded.

I'm new to Houdini, but I wonder if it's possible to create a VEX shader that would do this.

Share this post


Link to post
Share on other sites

I'm surprised there isn't a basic phong shader for smoke, because you can fake a normal by sampling density around the point being shaded.

It wouldn't look like smoke anymore, so what would be the point? :huh:

Smoke is rendered the way it is because it works and it looks like smoke. I wish it was faster too, but I guess you get what you pay for (in render time). If you haven't already try deep (depth map) shadows instead of ray shadows on the light and experiment with different volume step sizes in the output driver. Also use the micropolyon renderer, the ray tracing renderer is painfully slow with volumes. Cheers!

Edited by lukeiamyourfather

Share this post


Link to post
Share on other sites

haha :D so you probably know my best reallife friends Lambert and Blinn as well :) and lately I hang aroung with Anisotropic and Subsurface-Scattering, but have had some problems getting along with the second dude sometimes..

No :) @hobbin9, have you an image somewhere with smoke attached with that shader?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×