MB

Hi all,

I've got a noob problem, I'm hoping someone here can please shed a light on.

So, I have a simple polygon plain surface and I'm using a projection plane from the scatter node to "project" some points onto my surface - much like the example scene "scatter_textureBasedDistribution1.ma". All very well .. basic enough.

Now, can someone please explain to me why, if I scale up my polygon surface, my number of scattered points decreases?
I bet there is a super simple explaination for this, but for the life of me I can't figure out how to set up the scatter node (network) so that it maintains the same amount of points on the projected part of the surface.

what am I missing here?

(note - you can try this yourselves by opening up the example scene "catter_textureBasedDistribution1.ma", unchecking the "contained" on one of the projection plains, set the scatter node to "surface". then select the sphere and scale it up.

...this happens also within a volume ... if one were to scale up a shape the amount of points within the projected "path" get reduced.


cheers,
- M.

scatter1.jpg scatter2.jpg
Reply 0 0
pshipkov
If you select the geometry and then click the "scatter" item from the soup menu it will make the right connections for you.

Otherwise manually connect: transformAboveYourMesh.worldMatrix -> scatter.inWorldMatrix.

Recently i updated the scatter node and there is a chance some of that is not reflected in the example scenes created long ago.
Reply 0 0
MB

That's the way I had it connected. Even so the amount of "scatter points" seems relative to the size of the projected surface/geometry. The scatter node does not maintain the number of scatter points within the projection area/ray.
e.g. if I'm projecting 200 points onto a surface... and then replace the geometry with another geo of different size/polycount ... I won't get 200 points.

Reply 0 0
pshipkov
The explanation is very simple.
Open scatter_textureBasedDistribution1.ma
If you deactivate the projectors and scale the object up/down you will see that the point count is consistent.
Now if you turn on the projectors you will see how points outside of them get masked out and clipped from the point cloud. You can think of projectors and the rest of the tools as a post-modifiers. This is not how it works inside, but the end result resembles that.
Reply 0 0
MB

right, yes that is what I'm observing.

I guess the question is ... Is it possible to have the projectors not act as post-modifiers and project the desired amount of points onto a surface/geometry.
Perhaps you know of other means within Soup to do this?

Reply 0 0
pshipkov
Two things i can think of right now, there are probably other solutions too, but here:

- set the density to some high value, set the min point to point position to some value that keeps the right amount of points for your need.

- if you are using this for instancing, etc - you can instance to the full set of points and then "clamp" the instances using attribute transfer and bounding object, by setting their scale to 0. Hope this makes sense here. Similar if you want to perform particle/fluid emission from the point cloud.
Reply 0 0
MB
pretty late reply here...busy weekend.

Thanks for your input.

but...


The problem with adjusting the point density is that, the larger the surface I'm trying to project on, the more points I need to genereate, making the whole thing super slow.

...and in this case I'm not going for instances.


To explain a bit better what I'm going for here. I'm trying to set up a camera that gives an artist a visual feedback of the region it coveres/sees. This is extremely handy when it comes to dmp and texturing setups/pipelines. Being able to generate a texure map that shows exactly the area needed for texturing. ...or scattering objects on surface etc.
Often those scenes are quite heavy, geometry wise, and the target objects in question are often pretty high poly so getting a responsive setup is quite difficult. Hence I'm trying to set this up without using the "deleteComponent" node - I'd like to "query" the target surface as litle as possible and this setup shouldn't be dependant on the input surface size or resolution.


Being pretty new to SOuP, I'm sure there are a number of ways to achive this. But this is what I got so far (see attached files):


scene v001

Bounding object is a "cube shape", parented to the camera, and its size/width controlled by the camera lens attributes.

- Problem 1: bounding object will always be a full cube, and can't be deformed to represent the true camera frustum (volume). Meaning the closer the camera is to the surface, the bounding object will always affect the "largest" available bbox area, instead of drawing a more narrow line on the surface.
Also, using a "input geometry" shaped as the camera frustum, only produces the component points of the input geo and not the full volume - doesn't produce an accurate enough result and pretty unintuative to control.

- Problem 2: ArrayToTexture2D node gets quite slow, the higher the poly count is. At least the setup is quite responsive up until the point one needs to bake out the texture. Not ideal but acceptable.


scene v004

Here I'm scattering points onto the target surface and using a projectionPlane to define the area of where the scattered points are by the cameras FOV ( note: projection plane is offset slightly from the full far-clipping plane). Then using those points as "input geometry" to influence the target surface.

- Problem 1: as with "v001" , points are not projected based on the camera frustum shape.

- Problem 2: number of scattered points is dependant on the target surface size - the larger the surface, the more points are needed to generate. Meaning if the geometry is large, say huge landscape scene, the slower the setup becomes - near unusable.

- Problem 3: I disconnected the ArrayToTexture2D node at some point for more scene responsiveness (as the node doesn't have and enable/disable feature/check box). Now I can't reconnect the node without Maya crashing instantly.


Now, I fully understand that getting a setup like this to be super responsive in all scenarios may not be possible to do, but right now I'm just at the concept level trying to figure out if it's possible to do or not.
Also, I have the feeling that using the rayProject node somehow would simplify this tremendously, but that's one node I haven't figured out how works (plus all rayProject sample scenes I've opened don't seem to work in Maya 2016, so not really helping either).


Any tips or thoughts you may have regarding this kind of setup would be greatly appreciated.

Thanks again,
- M.
Reply 0 0
pshipkov
Check the example scene cinemaProjectorOnSmokeScreen.

Also, the scatter node has "camera frustum" clipping, so you don't have to parent projection plane under the camera.
Reply 0 0
MB

Thanks for the tip - not sure how I could've overlooked the camera frustum clipping option ...I'll check that again, thanks

Regarding the example scene "cinemaProjectorOnSmokeScreen":

This may sound stupid, but could you in just a few words explain what I'm supposed to see in that scene?
I open it and hit play. All I see is a few particles being emitted and a moving (up and down) polyplane with a rotating textureplacement node - That's it. One doesn not appear to be affecting the other. So I'm not really sure what I'm supposed to be searching for, result wise?

As I mentioned I'm starting to think there's something not right with scenes that use the "rayProject" node. For example if I open up the "rayproject_3" example scene, I know I'm supposed to see a "projected" shadow of the character on the wall, but that's not what I see. It appears as if the "shadow geometry" is intersecting with the character geometry. (see attached screenshots).

I'm running Maya 2016 SP6+EXT1 Linux and SOuP 2016_04_20.

Thanks again for all the help.
cheers!

rayscreen.jpg cinSmokeScreen.jpg
Reply 0 0
pshipkov
Set the minDistance value to 0 or some positive value.
Or download the latest soup archive.
This will show you the desired results.
Reply 0 0
MB

aaaaawwlright, now were talking - I knew there was something going on with that rayProject node ;)

Anyways, this gives me something to play with, a good starting point. Thanks dude.

I'll get back to you with what I manage to Frankenstein together, hopefully I'll find some time in the next few days.

 

thanks again for all the help - cheers!

-M

Reply 0 0
pshipkov
Good to hear that.
Feel free to pass your frankenstein around, we can try turning it to princess jasmine.
Reply 0 0
Reply