Feedback

What's your question?

By: [ Admin ] Asked from India

How to create occlusion in a fish school with 3delight

In this video you can see there is a dense shadow that forms in the interior of the school. Any ideas how can I create that efficiently with 3delight? I'm thinking along the lines of point-per-fish point cloud, I have access to the centers of the fish. Not sure how to set up the shader for that. Or maybe there's a better approach?

Add comment viewed 592 times Latest activity 7 months ago

NN comments
hugh_gid
-

That’s a pretty cool video! Can’t help you with your problem with rendering, but just wanted to say thanks for the video link!

or Cancel

2 answers

  • 1

freds [ Editor ]

Hi Jules,

have you tried using point based occlusion? Sorry I have not got access to 3delight right here so I can't do any tests.

cheers fred

or Cancel
  • 1

manny [ Editor ]

You have access to the particle center and to it's bounding box. Maybe a simple falloff? If it's not too computationally expensive, maybe take a small sample away from the center of each particle and adjust the falloff based on number of hits? Just thinking out loud.

I just did a test and it works OK. I used the distance from the particle center to the max bounding box value as my falloff radius. So I never get a full value of 1 for the outer fish. :(

But if you did the sampling I mentioned earlier, you should be able to set non-occluded fish to a value of 1.

I would upload an image but I don't know how.

NN comments
julian
-

If you use the bounding box as a fall-off measure, then a swarm that stretched out to an irregular shape, such as a peanut, would be very dark even for exposed fish where the density is thin? I think your first idea is good: sampling neighbors, but I wonder what’s the best way make a 3delight shader with that information.

manny
-

Store an occlusion/sampling attribute on the particleShape node. Then access that with an expression in the shader. At least that’s been my experience with RenderMan shaders. I’m sure the same thing can be done with 3Delight shaders.

or Cancel