Pizzaman

Hello dear SOuP users.

I'm trying to create a rain setup suited to high speed camera moves.
I find pretty easy to generate points, setup the scale of the drops depending on the distance, etc. BUT there's one thing I would like to avoid : Evaluating all the positionPP and then filter the result. Instead, I would like to evaluate only the needed points in worldSpace.
I've tried to detach the worldMatrix from the scatterNode, but it seems the points are only generated in the bounding box of the source object.

Is there a way to generate points in world space and move the area of generation without moving the points ?
Thanks in advance

Quote 0 0
Pizzaman

To make it more clear :

Is there a way to scatter points in a volume and move this volume to change the visible points instead of generating 1 trillion points and filter only the ones you want to see with a bounding object...

By the way, not sure it's more clear...

Quote 0 0
pshipkov
Yes, there are many ways in SOuP to achieve this effect.
The easiest (least involving one) is to generate bunch of points using scatter, convert them to curve or mesh (pointCloudToCurve, pointCloudToMesh) then use group node + bounding objects or cage node to remove unwanted points from there.
Quote 0 0
pshipkov
Check the examples for cage and group scenes.
Quote 0 0
pshipkov
Let me know if this is not clear. Can try to provide you with example scene.
Time is very tight right now, so it may be a moment until then ...
Quote 0 0
Pizzaman

Hello Peter, thanks for your answers.

I firstly tried what you explained but got stuck with the amount of points needed on the curve to achieve a rain effect. The group node takes forever to cycle through all the points generated. That's why I was looking for a way to only evaluate the points close to the camera, and dynamically.

I solved this first problem by using the voxelGrid node in worldSpace, parented to the camera. It creates point on the fly, and with a 3D texture (constant in worldSpace) I could easily randomize the position.

I'm now fighting with the motion blur because of the dynamic point generation but will share a setup once fully usable.

Quote 0 0
pshipkov
I see. Glad you are past step 1 now.
You can calculate the camera velocity using the speedometer node.
It outputs the velocity vector too. Then you can connect that to createArray node and make it generate an array with this vector value. From there you can use it as primvar for the points in your renderer.

Another way is to use the camera frustum culling in scatter.

Quote 0 0

Add a Website Forum to your website.