Jump to content

Smoke renders flat without shadows.


hopbin9

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?

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

Link to comment
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

Link to comment
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.

Link to comment
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
Link to comment
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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...