Particle Flow - Need to bind particles to lit surface only

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  12 December 2012
Particle Flow - Need to bind particles to lit surface only

Hi all,

I've spent the last several hours trying to correct this problem. I have an object that I need to bind particles to, but only in the lit areas and not in the shadowed areas. I have a single light set up including only the target object. The object has a material on it using the falloff material set to light/shadow and clamped to create a distinct division between light and shadow. The falloff material is instanced in the diffuse and opacity channels. In the particle flow setup, I have "position object" with the target object selected. I then checked off density by material and have tested each of the following options: Grayscale, Opacity, Grayscale and Opacity. I even tried Red, setting the falloff to display red in the lit areas. Thus far, I can't get the density of the particles to change such that they only spawn in the lit areas. I also tried "If the location is invalid: Delete Particles." When I check this box, all of the particles disappear. I thought this might be a viewport display problem, but the problem persists on render.

Any help would be greatly appreciated. I am also open to trying different solutions to achieving the same result. Thanks in advance,

John
 
  12 December 2012
The simplest way would be to render to texture a sequence of the lighting of the object, then you could use that image sequence as a texture map to drive the emission of particles from. There are other ways but they are a lot more complex.
__________________
Maxscript Made Easy...
http://davewortley.wordpress.com/
 
  12 December 2012
I thought about rendering to texture, but the target object will have animation on it and the lighting will change based on that. I need the animated object to bind particles to the surface only where light is hitting it, even as it's animating. What I'm trying to do is simulate a point cloud of an animated object from a specific camera. There are eight different cameras, each creating a different set of point clouds. The point clouds will then merge to demonstrate how cameras can be used to capture scene detail... similar to how 123D Catch works. This entire scenario needs to happen as the scene is animating.

What I don't understand is that I have successfully used the falloff material to capture the light detail in the material, both in the opacity and diffuse channels, however Particle Flow is not recognizing the falloff material. If I replace the falloff with a gradient ramp, PF recognizes the grayscale/opacity just fine.
 
  12 December 2012
Sorry, I just re-read your post. Render to texture a sequence. I didn't realize you could render to texture sequences. How do you do this?
 
  12 December 2012
I think you just set it up as a sequence in the Render Settings window and then it'll bake the frames you specified there.... (I think), if not i'm sure there will be a script somewhere which does it.
__________________
Maxscript Made Easy...
http://davewortley.wordpress.com/
 
  12 December 2012
Nevermind... I created a Render 2 Texture sequence. Great idea. Thanks.
 
  12 December 2012
The problem you were facing was due to how things get evaluated. Light and shadow are ONLY calculated at render time. Even if you see them happening in the viewport, they are being rendered (in real-time, of course). Particles have no idea of where to get the lighting information from, because it's not there... It hasn't been rendered (and they definitely can't get it from the viewport rendering, even if that should be technically feasible).
You can see your maps react correctly because their previews are being rendered. In other words, you're looking at something like...
"Particles, I need you to be positioned where there is light"
"Fine... You need to start a render to calculate lighting"
"Rendering... There's the lighting"
"Ooops! We can't move... We've already been rendered"
(I'm putting this in a kinda humorous light (pun semi-intended ;-) ) since PFlow actually doesn't talk to the renderer... I just tried to illustrate the proverbial loop you could've run into if PFlow could talk to the renderer, in a way).
Rendering a map of your lighting is the only practical solution, because the lighting information gets rendered into your map. Now you can use it as a birth map. Of course, if you change your lighting you need to re-render, but it works. At least until someone writes a real-time shader that measures lighting, and can output that. Still, PFlow would need to be able to read these kind of shaders... Not sure if something like that would be fed to PFlow...
Just adding a bit of info to what has already been explained. Cheers!
 
  12 December 2012
Thanks Toonman. This actually makes a lot of sense. I appreciated the responses. -- John
 
  12 December 2012
you could try using a falloff map or gradient map set to lighting mode to drive the particle placement
 
  12 December 2012
Originally Posted by CHRiTTeR: you could try using a falloff map or gradient map set to lighting mode to drive the particle placement

But wouldn't it that be the same problem when lights and shadows are calculated at rendertime?

Quote: if not i'm sure there will be a script somewhere which does it.

If that fails I'd try to render a light/shadow pass and project that from the camera on the objects on a separate map channel and use that for the particle placement.
 
  12 December 2012
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 12:08 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.