Jump to content

point rendering with environment light


danw

Recommended Posts

Hi all,

I'm attempting to render large quantities of fluid particles (as spray), and have got good results from rendering as points with a plain old spotlight and deep shadow map. I'd really like to be able to use environment map lighting though. Does anyone know any tricks for lightening the load? Even as point type particles, the raytracing to find the occlusion and environment colour seems to make it prohibitively slow. It also comes out far too dark, presumably because the point normals can only face in one direction, while I'd like the particles to take on some lighting from all around them wherever they're not occluded by nearby particles.

My current thought is having a spread of several light sources surrounding the particles, with deep shadow maps on them, and then piping an enviroment map lookup into the diffuse colour of the shader, with a blurred environment map. That should give me some hacked occlusion from the combination of several deep shadow maps plus a hacked environment lighting effect.

That still doesn't address the normals only picking up light from one direction - for now I've got hacked normals baked from the levelset of the nearby water surface... but it'd be better to get some neat cheap subsurface-style effect.

Anyone have any better suggestions? :-)

Link to comment
Share on other sites

Can you do an attribute transfer, and sample X points to find the average number of points in a given radius. Then use that attribute to color those points to fake occlusion?

Your closed fake will be calculating a density function for the fluid at a given point, rather then trying to calculate shadows.

Another option would be to create a proxy mesh in the shape of the surface of the water, then bake the occlusion to the points as colors, and use an attribute transfer to send the color to the particles that your rendering. Don't know how well that will work?

Link to comment
Share on other sites

How about using a subsample of your pointcloud to create a low-res volume and use it to cast shadows and/or use its density to modify the lighting?

Thanks for the suggestion Macha... I ended up doing just this, except that the "Volume From Attrib" SOP works so fast that I just splatted the entire point-cloud to a volume.

(For anyone else reading - use the Accumulation flag for properly interpolated volume samples. Also, the maths for how much density to add per particle is a bit of a nightmare, it involves working out the fraction of the cell volume occupied by the volume "sphere" of the particle based on it's point scale)

Setting the volume to phantom and having the shadowcasting lights/envlights link to the volume instead of the particles improved render times immensely. The other benefit/quirk is you end up with much smoother shadows, with the volume res obviously affecting the overall softness.

So yeah, thanks for the tip... set me off in the right direction. It's amazing how many different uses I'm finding for volumes/SDFs these days :-)

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...