PDA

View Full Version : Using Pflow to scatter Grass blowing in the wind.


PePeTD
09-02-2008, 07:25 PM
OK so i have made a spline and added flex to it, I made that so i could simulate it been like grass affected by the wind. Now i need to make it so that when i shape instance the grass ( grass model which is pathdeformed to the spline ) with animation on it and i rotate it randomly horizontaly but still bending the way the wind is pointing.

O was trying to instance the flex rig and place each instance to a particles single trasnform but it did not work. anyideas or methods anyway can tip me ?

charleyc
09-02-2008, 08:25 PM
You cannot do this with standard PFlow, you need Box3. The only real way without would be to Mesher your grass, apply Flex to that and simulate it at that point. You are way ahead to use Hair and Fur. It will do this very easy.

ADamiani
09-04-2008, 05:33 AM
Would it be totally unreasonable to use pflow to distribute the meshes along your spline with a random horizontal rotation, run it through the mesher and then pull the grass into reactor as a softbody to generate the animation?

Morne
09-17-2008, 07:38 AM
Would it be totally unreasonable to use pflow to distribute the meshes along your spline with a random horizontal rotation, run it through the mesher and then pull the grass into reactor as a softbody to generate the animation?

Can you elaborate on that into lamens terms?

ADamiani
09-18-2008, 12:55 AM
Can you elaborate on that into lamens terms?

In layman's terms? Instead of trying to do the whole thing in pflow (without plugins), I would just use particle-flow (or hair) to create the grass-- the "shape instance" operator lets me specify an exising object, like a model of a blade of grass, and scatter copies of it across another object (with a density based on a map). I would use the "Mesher" compound object to turn my particles into mesh objects.

Then I would try using the "reactor" system to handle the actual swaying motion. It can treat the grass as a collection of "soft body" objects which can bend when force is applied.

I have no idea if it's the best way, but that's how I'd approach it (though CharleyC is probably right that hair/fur is a better option).

charleyc
09-18-2008, 02:59 AM
Check out Grass-O-Matic at www.maxplugins.de (http://www.maxplugins.de)

PePeTD
09-18-2008, 12:47 PM
Thank you guys i will try it out but the solution i came up was to write a script the would:

1- Would use a PFlow for the positioning of the particles using as many objects u want ( so you could put grass, flowers , weeds , etc...) and distribute them according to a user defined probability system ( almost like set percentages ).

2- Then i could add a general sway to the grass using bend modifier and wave / noise controllers on the bend.

3- it could also follow the animated bend of another mesh ( the grass even tho were scattered along Pflow particles they are not inside the pflow system i just took the position of every particle and applies to the grass, flowers , weeds, etc using the probability system ). So you can animate a single mesh with Bend to look just like it would if it was been affected by Wind and the other grass will copy it and delay the animation according to the distance to the object.

Even tho the script is crash prof there is still things that need working right now the offset of the copied animation is based on distance which works pretty good but i want it to be the distance along a single axis not a world units distance. also the rotation controller is working but when adjusting single rotation on the objects it causes some skewing with the direction of the bend.


If you have any questions :P send me a pm or something . This Script i wrote works prety good and can be used for other things it can also be adjusted to any other modifier that you would like. ( imagine u want to animate somthing squash and strech ) animate it with the strech modifier then copy it to other 100 obejects adn this will be offseted acording to distance. ( qhy would you do that ? i dont know but it is pretty cool :P )

Morne
09-30-2008, 07:25 PM
In layman's terms? Instead of trying to do the whole thing in pflow (without plugins), I would just use particle-flow (or hair) to create the grass-- the "shape instance" operator lets me specify an exising object, like a model of a blade of grass, and scatter copies of it across another object (with a density based on a map). I would use the "Mesher" compound object to turn my particles into mesh objects.

Then I would try using the "reactor" system to handle the actual swaying motion. It can treat the grass as a collection of "soft body" objects which can bend when force is applied.

I have no idea if it's the best way, but that's how I'd approach it (though CharleyC is probably right that hair/fur is a better option).

I got as far as "create animation" in reactor, bu then it hangs. Grass is about 15000 instanced lines. Any ideas?

CGTalk Moderation
09-30-2008, 07:25 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.