PDA

View Full Version : goalPP, colorAtPoint...How can i do this effect ?


gwen77
01-27-2009, 10:49 PM
Hello,
How can I do this effect :
http://www.boolab.tv/php/index.php?action=work&action2=reel&pagina=2&idTrabajo=28

Thanks for your help.

Gwen

Aikiman
01-28-2009, 02:06 AM
That was awesome! In terms of goalPP and colorAtPoint you bascially goal particles to a surface and use the goal U and goal V as parameters for the colorAtPoint command and get the color value at those points so written like this:


float $goalU = goalU;
float $goalV = goalV;
float $color[] = `colorAtPoint -o RGB -u $goalU -v $goalV file1`;
vector $RGB = <<$color[0], $color[1], $color[2]>>;
rgbPP=$RGB;

groblus
01-28-2009, 01:43 PM
i've worked on a kind of similar project so I can give you some personal thougts about that commercial. First of all - it's a trick, you only get an illusion of having all the particles change shape every time, rather than that I see some nice compositing of different particles effects. The effect off an animating image that is made of particles: it's rather constant particle emission with short lifespan than particles moving, it looks like there is a plane with an animated texture emitting all the time. Having particles flee of the plane - it can be done backwards (so you animate particles goaling an object), if you want proper particle colour size etc, than you simply emit from a copy of the plane. Some of the particle movement looks like it's driven by a fluid field. You can use stroika to drive particles along a curve with nice motion. There is plenty to do to achieve that kind of effect. And you have to do it in parts, and have it nicely composited in the end.

gwen77
01-28-2009, 02:07 PM
Hi,
I've tried to emit sprites from a surface but I don't know how to emit 2 differents sprites according the color of the surface (file sequence with 2 or more colors connected to the particle color channel of the particle emitter)

Thanks

Aikiman
01-28-2009, 08:22 PM
Hi,
I've tried to emit sprites from a surface but I don't know how to emit 2 differents sprites according the color of the surface (file sequence with 2 or more colors connected to the particle color channel of the particle emitter)

Thanks

You could use a switch statement. For example you could have sprites 1-20 emit from red and sprites 21-40 emit from black.

groblus
01-29-2009, 11:00 AM
I suppose you could also use particle sampler node to get colour onto sprites (sampling particles rgbPP and multiplying it by a b&w picture), but I personally hate sprites and I really regret that there is no way of passing particle attributes onto shader of an instanced object, or is there ?

Aikiman
01-29-2009, 06:06 PM
I suppose you could also use particle sampler node to get colour onto sprites (sampling particles rgbPP and multiplying it by a b&w picture), but I personally hate sprites and I really regret that there is no way of passing particle attributes onto shader of an instanced object, or is there ?

You dont need to use the sampler node to pass shading info to the particle, sprites are hardware drawn not software. As for instancing, there still isnt per particle shading options.

anthonymcgrath
04-29-2009, 12:57 AM
That was awesome! In terms of goalPP and colorAtPoint you bascially goal particles to a surface and use the goal U and goal V as parameters for the colorAtPoint command and get the color value at those points so written like this:


float $goalU = goalU;
float $goalV = goalV;
float $color[] = `colorAtPoint -o RGB -u $goalU -v $goalV file1`;
vector $RGB = <<$color[0], $color[1], $color[2]>>;
rgbPP=$RGB;


tried this mate, created a simple directional emitter and a polyplane. made the polyplane a goal for the particles. Added the attributes and script you posted there and the particles just go to the first vertex on the polyplane :/ might have been able to use this method actually for my own project

Aikiman
04-29-2009, 01:12 AM
Did you manage to sort it? Its a matter of randomising your goalU and V at creation.

anthonymcgrath
04-29-2009, 01:23 AM
that worked to a degree. They are inheriting the colour on the mesh now which is good but now my particles seem to have ran all over the surface. I have a total of 121 particles (one for each vertex on a 10x10sub'd polyplane) and I would like a particle on each vertex then for it to get the colour. Is that possible?

Aikiman
04-29-2009, 01:50 AM
mmmm im not sure, adding goalU and goalV seems to break the way Maya goals the particle to a surface. Try doing a search on the forum and see what you come up with, I would like to know myself.

It could be a matter of getting the vertex number and finding its world position then applying the world position of the particle to each one but it would be impossible to do with a deforming object and this method seems way over complicated.

darktding
04-29-2009, 03:05 AM
some points to ponder:
1) use nurbs rather than a poly mesh or subd...
2) use parentU and parentV
then in creation u do something like:

goalU = parentU;
goalV = parentV;
goalPP = 1;

3) use painted maps and emit from texture (white)
4) use emit command to emit a lot more by passing a jittered goalU/V
something like
emit -o paShape -position x y z -attribute goalU -floatValue ($gU + rand(-0.1,0.1) -attribute goalV ($gV + rand(-0.1,0.1);
(look up the docs for the right expression)
What is cool about this technique is you can have a few lookups for the color of the surface color shader using colorAtPoint and transfer an estimate to loads of particles that will inherit what you give it.
5) emit with varying goalPP values to get that sticky non sticky feel in the video
6) play with goalSmoothness in the video looks like 2 or something to get that bouncy feel.
7) reduce goalPP over time or on desired keyframe...

done :)

ps: if you use the emit you get more bang for your buck... you can use "key particles" to control the outcome of another particleShape be it the goalPP value, color, position what have you using the emit mel command during creation...

anthonymcgrath
04-29-2009, 10:48 AM
mmmm im not sure, adding goalU and goalV seems to break the way Maya goals the particle to a surface. Try doing a search on the forum and see what you come up with, I would like to know myself.

It could be a matter of getting the vertex number and finding its world position then applying the world position of the particle to each one but it would be impossible to do with a deforming object and this method seems way over complicated.

would this trick work better with nurbs surface then

Aikiman
04-29-2009, 08:34 PM
BAck in the old days you couldnt goal particles to Polys so maybe try using nurbs, you might get whatyou are after!

CGTalk Moderation
04-29-2009, 08:35 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.