PDA

View Full Version : Texture as particles` goal


DruG
08-18-2008, 02:38 PM
Hi.

Is there a way to use texture as a goal?

For example:

I have grayscale texture on a poly grid, white letters on a black background and I want particles to go towards white areas only.

I`ve tried couple of things but nothing works.
I don`t know why, but even Filter by Texture Map for my Emitter doesn`t work and I`m doin everythin as in a help file (chapter Emitting Particles Based on a Texture Map).

Any (http://forums.cgsociety.org/) suggestions, please? ;)

grahamef
08-18-2008, 06:10 PM
The Get Geometry Sample node has a parameter for filtering but it only works with scalars, integers and Booleans already available on the sampled geometry. So what you'd need to do is use an ICE tree to read a texture map at the surface point positions, get the brightness, and store that as a custom attribute. You could do that in a separate tree in the Modeling region so that it doesn't keep evaluating every frame. Then you can use Get Geometry Sample, select the attribute as a filter, and use the result with the various Goal compounds.

DruG
08-18-2008, 10:05 PM
Thanks for fast reply!

I thought it would be easy, but as I`m a simple animator and ICE user wannabe that seems to be beyond my skills ;)

I`m goin to try, tho. Thanks :)

jgj
08-19-2008, 04:52 AM
After reading this thread I decided to try that method (courtesy of grahamef)... this is what I came up with:

http://home.comcast.net/~jgj252/Temp/TextureAsParticleGoalTestScene.zip

(Scene uses the "jollyroger" image from the XSI_SAMPLES project.)

A couple of things I didn't get 'round to figuring out:
1) How to move the target goal points around a smidge to avoid the particles all lining up in a grid pattern.
2) How to get the color values from a Material image map, instead of a Texture Map Property.

-Jim

DruG
08-19-2008, 12:28 PM
Oh, it works :)

How to move the target goal points around a smidge to avoid the particles all lining up in a grid pattern.

I`ve done that by changin samplin method from Points to Surface.

Thanks:)

grahamef
08-19-2008, 05:43 PM
2) How to get the color values from a Material image map, instead of a Texture Map Property.

There's no way to do that. You need to use a texture map. Of course, the texture map can use the same UV set and image clip as the material so it's barely adding any weight to the scene.

CGTalk Moderation
08-19-2008, 05:43 PM
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.