Jump to content

Directional bevel ( i.e random gradient displace per piece )


vinyvince

Recommended Posts

Hello

After my voronoid fracture (with Manhattan approximation) , i will like to give each cell a different ramp attribute to drive and build my displacement. Like in substance.

I have trouble to implement this in vex directly, and i want to use the lab ramp. I unlocked the had, but once again :) ,i failed to drive the circle prim arc value with my attribute generated before, unique per piece. 

i definevely have trouble with that, to drive my local variable with a attribute @..

I could do in a transform by using : point(opinputpath(".",0), $PT, "fRotationAngle", 0)

but not in the subnetwork of the lab gradient tool...  it doesn't recognize my attribute... it's what i wrote below

 

Any idea for a fix, or in a brute force vex approach please guys?

cheers,

 

vincent*

@konstantin magnus

 

image.thumb.png.df9e75570460504bc671d1780c7b45bd.png

 

 

directionbevel.jpg

Link to comment
Share on other sites

14 minutes ago, Librarian said:

z_VORONI_FRACTURE_GRADIENT_OFFSET2 + FeELib =  Asia LOve Lib

Hey Tesan!

 

Yes, that's too great and huge library actually.

Now , i realized i never used then. I tried the z_VORONI_FRACTURE_GRADIENT, it's super slow and not sure it does the same thing. But too be honest i have to pay a little bit more attention, i use almost no lib now inside lab, qlib.. and Feelib man... there are 500 had there, i installed once, it pollutes too much my flow and i realize it was taking me more time trying to understand the purpose of one HDA than building mine :)

 

 

 

 

Link to comment
Share on other sites

My idea was just by a wrangle, add a random angle per piece then in a loop, do a ramp contrained by the bounding volume using the angle value created before.

I tried using the lab ramp, but failing to inject there by attribute as said. Just a syntax issue a guess to inject @ into local variable. Always hate that part, with hscript on one side and vex...

I will see if i could built everything in vex , i guess that's the proper way, but is my brain agree with that? :)

 

Link to comment
Share on other sites

@Aizatulin @vinyvince  can we Use this somehow to drive those displacements ..HM
Evaluates the derivative of a parm parameter with respect to position


//Detail
vector color[];
for (int i;i<10;i++){
    color[i] = rand(i);
    }

int pt;
vector cd;
for (int i;i<100;i++){
    pt = addpoint(0,set(i/99.0,0,0));
    cd = spline ("linear",i/99.0,color);
    setpointattrib(0,"Cd",pt,cd);
    }    
//chramp

vector p;
int prim = addprim(0,"polyline");
int n = 100;
float u ;


float deriv;
for(int i;i<n;i++){
    u = float (i)/(n-1);
    p.y=chramp("ramp",u);
    p.x = u;
    pt = addpoint(0,p);
    cd = chramp("color",u);
    setpointattrib(0,"Cd",pt,cd);
    
    deriv = chrampderiv("ramp",u);
    setpointattrib(0,"N",pt,set(1,deriv));
    
    }    
    

 

sgsgsgf.jpg

Link to comment
Share on other sites

Are you talking about the parallel transport algorithm Tesan? It's a different purpose and it's for curves, not surface , no?

Idea was to have something like this, first pic but on more complex pattern, like my custom manhattan voronoi how in pic2

 

Im going to try what @Aizatulin suggested, i remember the detail way for some reason, it's still hard for me not to believe there are not a more simple way to pass parameter :ph34r:

image.thumb.png.5e80fa2b35c41fa8209c8135499b02dc.png

image.thumb.png.7f37c42223539f0af93f8c8818e97fca.pngimage.thumb.png.e1e559e39eaa11d05e21f57b59147606.png

Edited by vinyvince
Link to comment
Share on other sites

21 hours ago, Aizatulin said:

If nothing else work, you can always use a foreach loop and write each piece attribute to detail, and reference it by detail(input, 'name', 0) in any field.

@Aizatulin thanks,

kind of works :) but i use this syntax

detail("/obj/Cluster_RBD_GroundCrackedlook/attribpromote2", "fRotationAngle",0)

 

Edited by vinyvince
Link to comment
Share on other sites

You can pretty much choose a texture bombing approach to achieve this.
Also look into "multiparm blocks" and set their count with the nuniquevals expression, if you really want to define all the curve ramps by yourself.

pig_patterns.jpg.8b2bbf9484442190b7d02b4a4b9fbb11.jpg

Here is a tutorial: https://odysee.com/@konstantinmagnus:5/houdini-tutorial-texture-bombing-shader:7

 

projection.hipnc

Edited by konstantin magnus
  • Like 1
Link to comment
Share on other sites

Thanks @konstantin magnus, interesting solution as usual :)

i didn't thought about using that approach in this special case. But i have already image the same in a case that i could inject some details into each tile, like kitbashing a lib of displacement maps. So you would have to pick one map for a pointed directory and loop for each variant in the scattering, still have trouble to remember how to do that, i think i saw it before but never done it myself, excepted with output geo with pdg and using trail so i only select one geo file on the disk and not a directory. How would you do that ?   Im not much a fan of shader's tool as it's too dependant of the renderer and i like to see my result live but yeah off course, you could displace to the pixel level and not poly, that's big deal :)

 

 

hardsurface_proceduralhoudini_test.mp4

  • Haha 1
Link to comment
Share on other sites

After i was wondering, how sidefx compute the deform wrap option in their unified noise, like the gradient wrap?

A gradient from the texture i guess is precompute and use to drive the deformation.. i don't know but i found this interesting and didn't notice any discussion on this point before

________________________________________________________________

Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts

 http://fr.linkedin.com/in/vincentthomas

Link to comment
Share on other sites

@vinyvince 

Try to use area Measure


Throughout
Similar to Per Piece only with the entire geometry (or Group if specified) treated as a single piece.

I have posted "Like you see" on that file haveFun.hipnc that you can use old-foreach loop in extrude and bevel and than uncheck collision and limits ..Stop loops.
or You using some other Tricks "that would bee Nice too Share with Us" :rolleyes:.. I just combine

piggg.jpg

  • Like 1
  • Haha 1
Link to comment
Share on other sites

2 hours ago, Librarian said:

@vinyvince 

Try to use area Measure


Throughout
Similar to Per Piece only with the entire geometry (or Group if specified) treated as a single piece.

I have posted "Like you see" on that file haveFun.hipnc that you can use old-foreach loop in extrude and bevel and than uncheck collision and limits ..Stop loops.
or You using some other Tricks "that would bee Nice too Share with Us" :rolleyes:.. I just combine

piggg.jpg

I like you pig Tesan, probably Elon musk will too :)

  • Haha 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...