I'm looking for a way to have points attracting each other based on an underlying attribute. So if the attribute is -1 point are being pushed away from each other, and when the attribute is “1” the points get attracted to each others. i'm saying “underlying” because i'm thinking of a dynamic attribute from an underlying geometry that would be transferred to an other (more or less) matching geometry.
The intent is to recreate in a dynamic (animate-able) fashion the looks of those fascinating images from the retina-pack (https://www.tfmstyle.com/retina-pack) onto any kinda of 3D geometry.
Any tips and insight highly appreciated.
Cheers,
A.
Curve Points attracting or pushing each other by attribute.
2039 6 3- Adriano
- Member
- 408 posts
- Joined: June 2015
- Offline
- kahuna031
- Member
- 897 posts
- Joined: July 2018
- Offline
- Adriano
- Member
- 408 posts
- Joined: June 2015
- Offline
kahuna031
Best way to get that kind of pattern is in my experience to do a shortest path setup and drive the resulting paths by manipulating the terrain.
To get going, noise up a height field, convert to polys, do a shortest path from all points to a single one.
Thanks for the tips. I'm trying to avoid terrain tools by all means, not only because i'm pretty sure that those retina textures are actually created with such, most likely some flow maps from wold creator or any kinda erosion tools and alike, so it'd be a bit redundant….but mostly i want to be able to create those patterns and shapes in a procedural seamless way on any kinda geometry and not just on flat squarish surfaces.
Thanks for your time.
Cheers,
A.
Edited by Adriano - Nov. 29, 2019 22:47:01
- kahuna031
- Member
- 897 posts
- Joined: July 2018
- Offline
AdrianoYou'll get the same result from using a poly grid, the height field is just the most convenient tool to work with a 2d grid in Houdini. The square shape is not relevant either as you can simply mask of the area from your input object. Doubt you'd need erosion tools either, it's more about modeling and rendering curves.kahuna031
Best way to get that kind of pattern is in my experience to do a shortest path setup and drive the resulting paths by manipulating the terrain.
To get going, noise up a height field, convert to polys, do a shortest path from all points to a single one.
Thanks for the tips. I'm trying to avoid terrain tools by all means, not only because i'm pretty sure that those retina textures are actually created with such, most likely some flow maps from wold creator or any kinda erosion tools and alike, so it'd be a bit redundant….but mostly i want to be able to create those patterns and shapes in a procedural seamless way on any kinda geometry and not just on flat squarish surfaces.
Thanks for your time.
Cheers,
A.
The question is if you want your paths in 2d or 3d, I'm pretty sure your reference is in 2d but if you want it in 3d on any input object shortest path is still the way to go. Difference now is you need to control 3d patterns to drive the path finding, then I'd recomend converting your mesh to vdb and back to mesh, this gives you a uniformly sampled toplogy to apply noise on and apply the process I described earlier.
B.Henriksson, DICE
- Librarian
- Member
- 142 posts
- Joined: Aug. 2009
- Offline
Old stuff and topic
Learn
https://houdinigubbins.wordpress.com/ [houdinigubbins.wordpress.com]
https://forums.odforce.net/topic/24290-please-help-me-with-this-tracer-effect/ [forums.odforce.net]
https://www.youtube.com/watch?v=n_bkpLgyjYA [www.youtube.com]
https://richardlord.tumblr.com/ [richardlord.tumblr.com]
Learn
https://houdinigubbins.wordpress.com/ [houdinigubbins.wordpress.com]
https://forums.odforce.net/topic/24290-please-help-me-with-this-tracer-effect/ [forums.odforce.net]
https://www.youtube.com/watch?v=n_bkpLgyjYA [www.youtube.com]
https://richardlord.tumblr.com/ [richardlord.tumblr.com]
Edited by Librarian - Nov. 30, 2019 04:26:07
- Librarian
- Member
- 142 posts
- Joined: Aug. 2009
- Offline
If you play with this vex shader and point attributes on any object you can achieve some fun stuff. Have fun
#define PI 3.1415926535897931 #pragma label Theta "Maximum Theta" #pragma label spread "Overall Spread" #pragma label DATA "Data Points" #pragma label kd "Diffuse" #pragma label ks "Specular" #pragma label bump "Bump" surface qrotation_field ( float Theta = 2.0, spread = 3, kd = 1, ks = 0.5, bump = 0.1; string DATA = "$HIP/../VEX/Reading-Data-Points/_datapoints.bgeo.sc") { float d, Np, theta, pFratt, factor, pspread; vector _P, pP, axis, pVratt; vector4 Q; string group; _P = ptransform("space:camera", "space:world", P); theta = snoise(_P + 0.9, 1, 0.75, 1)*4.5; axis = snoise(_P + 0.05, 1, 0.05, 1); Q = quaternion(theta, axis); _P = qrotate(Q, _P); for(int g = 0; g < 2; g++){ group = concat("group", itoa(g)); int p[] = expandpointgroup(DATA, group); Np = len(p); factor = g + 1; for (int i = 0; i < Np; i++){ pP = point(DATA, "P", p[i]); axis = point(DATA, "N", p[i]); pFratt = point(DATA, "fratt", p[i]); pVratt = point(DATA, "vratt", p[i]); pspread = pFratt*spread/factor; d = distance2(pP, _P); d = exp(-d*d/pspread); theta = 2*PI*(pFratt*2 - 1)*d*Theta/factor; Q = quaternion(theta, axis); _P = qrotate(Q, _P - pP) + pP; } } vector outColor = snoise(_P*0.25, 1, 0.25, 1); vector Nn = normalize(computenormal(P + min(outColor)*bump, N, Ng)); vector diff = diffuse(Nn)*outColor*dot(normalize(-I), N); vector spec = specular(Nn, normalize(-I), fit01(min(outColor), 0.5, 0.1))*0.1; spec += specular(N, normalize(-I), 0.05); Cf = diff*kd + spec*ks; }
Edited by Librarian - Nov. 30, 2019 08:49:23
- Adriano
- Member
- 408 posts
- Joined: June 2015
- Offline
-
- Quick Links