Radial Scatter on Circle

   8906   5   0
User Avatar
Member
24 posts
Joined: Dec. 2013
Offline
Hallo!

I've got probably so simple problem, that I can't even find solution for it on internet… but anyway:


I want to create circle, and scatter point on this circle based on generated radial ramp/gradient (more color=more points)



Hard point is the ramp itself. How should I create it?

from here ( http://my.safaribooksonline.com/book/illustration-and-graphics/9780240808628/2dot-sops-the-foundation-of-houdini/chap2_sub42 [my.safaribooksonline.com] ) I know how to import texture as a density control. But I want this ramp to be procedural.

Later on (I think) it will be quite easy (it never is ). Probably I'll stuck on UV's or something…

Other solution I thought about is to make a circle, extrude it, and from this, create SDF volume. And from there build volume density… But i'm not sure about thickness of the volume.

I'm quite freshman in Houdini, not a best math mind, but I'll lern it, no matter the cost. Funny statement because I'm trying to do tutorial about making galaxy, and I'm stuck on 3'th minute of it, because points on tutorial are spreading differently then on H13 (evenly no matter the primitive type).
User Avatar
Member
9721 posts
Joined: July 2007
Offline
if you create circle by creating primitive Tube with rx=0 and height=0
scatter will put more points to the center of the circle

but regardless, here is the example of the ramp you were asking for

Attachments:
ts_radial_ramp_scatter.hip (81.3 KB)

Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
24 posts
Joined: Dec. 2013
Offline
damn…

(first of all: Thank you! And if you have time

Ok, Tomas… i'll reveal your evil soccery and you shall burn…

Trickery is in this VOP SOP. Work of satan, no doubt.

I never grasp the idea of PointPosition… (in help http://localhost:48626/nodes/vop/geometryvopglobal [localhost] it says that P is “Position of current element.” Or is it all points positions?)

“center” parameter, or “radius” or “gradient” - where can I read about them? I cant find anything in help (probably looking in wrong places). It's not in cookbook… I presume that they are doing something, not just custom atribute. For example center: is it pivot? mass center? What if that would be irregular shape?
Edit: Those are custom parameters. both of them are “waiting for” custom data about geometry (or to be reused in future as “center” parameter-script-thingy… I suppose). Probably gradient is the same.


Very inaccurate understanding of mine (please correct me if I'm wrong): you take Position (furthest points?), and by subtracting center of geometry, you calculate lenght to… have “base” data of geometry (to stretch later gradient on that lenght), then you by adding fit node, create radius control (next node ramp, uses 0-1 values, so fit will clamp all calculations into that range, and you can still have radius of geometry greater then 1). Then ramp, but why rename it into “gradient”? And why default interopolation Catmull-rom? Lastly… weight, just for scatter to have parameter to control from.

When I will have children i will beat shit out of them if they will miss math and logic class… that's my todays punishment.

Oh… and last-last thing. Method Studios? Really? Can I have your autograph? Or be your wife or something? Maybe if I'll eat your brain…
User Avatar
Member
9721 posts
Joined: July 2007
Offline
it's definitely sorcery, you can't expect anything else from Houdini

essentially it's quite simple, but it may be confusing at first

VOP SOP allows you to modify per point attributes and P is per point position

Center, Radius and Gradient are custom parameter names and weight is custom attribute name so you don't find them in help, I could've named them however I wanted

so VOP SOP runs the network on each point of the source circle (which has to have enough subdivisions as the information will be stored on points)
it stores the weight per each point which is the probability 0-1 used later by Scatter SOP to scatter the points

the math is pretty simple
P-center gives you vector from center to each point of the source geometry
length1 - measures distance of that vector, therefore distance from specified center
fit1 - normalizes range 0-radius to 0-1
ramp1 - takes this 0-1 input and finds corresponding value based on the user defined ramp then stores the value to weight attribute, so essentially ramp represents weight distribution from center position to radius distance from center

Catmull-Rom is just an interpolation for ramp parameter, setting it by default doesn't really mean much, you can always set it per ramp point and for newly added point ramp uses interpolation of the point on the left so the defaults are almost irrelevant
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
4189 posts
Joined: June 2012
Offline
Dawid Antczak2
When I will have children i will beat shit out of them if they will miss math and logic class… that's my todays punishment.


The flaw in this average way of thinking is that it's curiosity, not punishment, that drives great thinkers.
User Avatar
Member
24 posts
Joined: Dec. 2013
Offline
Thank you once again! I have much to lern


MartybNz
The flaw in this average way of thinking is that it's curiosity, not punishment, that drives great thinkers.

Havent you heard that curiosity leads stright to hell? Of course I'm kiddng. My kids will be sent to curiosity camps.





Forgive me my black sense of humor Parenting is a quite hard topic, especially when there are many opposite informations, about how to do it But be assured, that I won't beat my kids. Curiosity Camps.
  • Quick Links