Guest ravin Posted August 7, 2010 Share Posted August 7, 2010 I am attaching a file with spheres copied to particles, and I am applying a color to the spheres. Now I want to control the transparency of the spheres with the distance from the camera. So if a point is far it is less opaque than the ones in the front. How can I achieve this? Basically I am trying to achieve a dusty volumetric look. thanks, dustRendering.hip Quote Link to comment Share on other sites More sharing options...
Macha Posted August 8, 2010 Share Posted August 8, 2010 (edited) Hi Ravin. Here is an example with colors instead of opacity. It fits your distance values automatically into 0-1 range. dist.hipnc Edited August 8, 2010 by Macha Quote Link to comment Share on other sites More sharing options...
Macha Posted August 8, 2010 Share Posted August 8, 2010 (edited) BTW, with millions of particles this may be very slow to render. I don't know you exact intentions but from previous posts it seems you want to render lots of points? Perhaps I would be tempted to write out a Pz or opacity or alpha variable and doing something with it in compositing. Edited August 8, 2010 by Macha Quote Link to comment Share on other sites More sharing options...
Guest ravin Posted August 8, 2010 Share Posted August 8, 2010 BTW, with millions of particles this may be very slow to render. I don't know you exact intentions but from previous posts it seems you want to render lots of points? Perhaps I would be tempted to write out a Pz or opacity or alpha variable and doing something with it in compositing. I will try this technique with opacity coz i really need this for opacity. And yes you are right I am intending to render lots of particles. How do you write out the Pz or opacity variable in houdini and use it in compositing? I have no experience with this technique. thanks, Quote Link to comment Share on other sites More sharing options...
Macha Posted August 8, 2010 Share Posted August 8, 2010 Check out deep rasters. Also, it is probably better to write or rewire a shader using the technique in my above file, rather than using per point values. Quote Link to comment Share on other sites More sharing options...
anim Posted August 8, 2010 Share Posted August 8, 2010 it's much easier to do this in shader here is the simple example, you just need to set min and max distance parameters and you can tweak the opacity in this range by opacity ramp camera_dist_opacity.hipnc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.