Jump to content

# Trilec

Members

16

0.00 CAD

1

1. ## Noise type value visualization

Hopefully this is helpful to others. Small snippet to visualize the different noise's. I have not put them all in, but if you feel inclined please add more and reply-post. You will need to create the menu (as this does not seem possible in VEX and has to be done via the parameter interface? and a 100x100 grid as input. // // Houdini Noise visulization - Curtis // int NoiseMenu = ch("NoiseMenu"); // Create a Ordered Menu "NoiseMenu", In the "Pram Interface", //Token, Lable ... // 0 vnoise // 1 wnoise // 3 flownoise // 4 curlnoise // 5 xnoise // 6 random // 7 alligator float frequency = ch("frequency"); float rough = ch("roughness"); float atten = ch("attenuation"); float jitter = ch("jitter"); int turbulence = ch("turbulence"); int flow = ch("flow"); int seed = ch("seed"); //Noise data vector vp0, vp1; float output1=0; float output2=0; //No Case stament in VEX ... elseif it is.. if ( NoiseMenu == 0 ){ //vnoise VEX function //Generates Voronoi (cellular) noise. vnoise(@P, set(jitter, jitter, jitter), seed, output1, output2, vp0, vp1); } else if ( NoiseMenu == 1){ //wnoise VEX function //Generates Worley (cellular) noise. wnoise(@P, @P.z*frequency, output1, output2); //general noise } else if ( NoiseMenu == 2){ //snoise VEX function //functions are similar to wnoise. output1 = snoise(@P, turbulence, rough, atten); } else if ( NoiseMenu == 3){ //flownoise VEX function (soft) //Generates 1D and 3D Perlin Flow Noise from 3D and 4D data. output1 = flownoise(@P*frequency, flow); } else if ( NoiseMenu == 4){ //curlnoise VEX function //Computes divergence free noise based on Perlin noise. output1 = curlnoise(@P*frequency); } else if ( NoiseMenu == 5){ //xnoise VEX function //Simplex noise is very close to Perlin noise output1 = xnoise(@P*frequency); } else if ( NoiseMenu == 6){ //random VEX function //Generate a random number based on the position in 1-4D space. output1 = random(@P*frequency); } else if ( NoiseMenu == 7){ //anoise VEX function //Generates "alligator" noise. output1 = anoise(@P*frequency,turbulence, rough, atten); } //Output to 100x100 grid as colour @Cd = output1;
2. ## fracture Piece min max values of the local cut

thanks noobini, This is a useful node, whats nice is its really just VEX code wrapped in a nice package for selection. seems the approach in VEX with nearpoints is still on the cards but the relbox code is clean; abs( (relbbox(0,@P).y)-0.5)<ch("spread") However this does depend on the rebbox alignment, unfortunate this fails as the bbox is world aligned and if a cut is on an angle it fails the GroupCreate (include by edge) will find the top /bottom so perhaps processing this after might help... Ill still investigate further... thanks again for the jpg, sorry you did not get a hip file...next time cheers
3. ## fracture Piece min max values of the local cut

Hi All, sorry for the heading, Its a hard one to describe lol. I have a booleanfracture piece and want to process only the middle points , then with that create geo that knows the distance to top and bottom of its local position (as the slice fracture is not a flat plane, hopefully a picture helps). Im not sure the best approach, I would start with nearpoints in some way ,finding the top points and test down for a middle storing the lowest for distance checks?? lol, well its a tricky one
4. ## fracture Piece min max values of the local cut

Hi Noobini, Thanks for the reply. I simply would like an understanding if im on the right approach, a jpg concept would also be great , The script is a simple booleanfracture piece ,nothing special, my feeling was its a quite advanced topic and those who would understand the issue would not need such a thing, perhaps one of the long term members can post if this the correct assumption? cheers
5. ## Fine control VEX modelling of Voxels with VDB Wrangle

Thanks, After further investigation, seems harder to control VDB than through pure poly mesh (for something like this) I was trying for an even roll as the shapes are arbitrary from bottom to top. Seems you can pass attributes via vdbfrompolygons , but not sure if this is the best solution as the vdb resolution with get very high. using vector rbox = relbbox( @P ); //boost the lower portion if(rbox.y < 0.06) density = 1; //shape f@density -= rbox.y *.2; In the wrangle I get a little way but it removes the top and bottom and falloff not quite there yet.
6. ## Fine control VEX modelling of Voxels with VDB Wrangle

Hi Superior brains, as I approach modelling methodologies, I've turn my attention towards VDB's In the below example I've used a grid (but this would be an arbitrary shape Convex/concave "2Shape") with a noise pattern to create heights for a later extrude; I then convert to VDB to "cleanup the geo" My question: is it possible to directly manipulate the VDB via VEX to do something similar without having to go through the conversion process (poly to VDB) One reason behind this is the shape I wish to extrude can be fairly complex and dense thus making the conversion process slow, so perhaps adding voxels or extruding/expanding/manipulating voxels is possible in some way? ( VDB Wrangle?), feels like this is not possible but never hurts to ask... unless its physical...;)
7. ## Fine control VEX modelling of Voxels with VDB Wrangle

thanks Konstantin , A nice simple example, It seems attribute transfer is problematic for volumes. I and trying to roll off at the edge and approched this with getOutsideGroups ...attribtransfer and attribpromote Is there a good way to get the same or similar with voxels (volumes) (soft rolling off to the lower edge)? thanks again
8. ## Fine control VEX modelling of Voxels with VDB Wrangle

Thanks Tesan, Seems the Volume Wrangle geometry node might be worth exploring, ideally I'm trying to avoid advanced mathematics but certainly there might be some tricks here that are interesting. I will need to find some some simple examples using this node to get a better understanding. I assume this means there's no direct manipulation of voxels as in VDB only volume voxels.. or are these the same? thanks again.
9. ## Deleting outside primitives after boolean fracture

Thanks Flcc, Interesting, uses similar to above, by default if you turn the Material type from Concrete to Wood (boolean fracture) you need to change the group expand to "wood_cutoutside". im still investigating and will post any other VEX solutions I might find. c
10. ## Deleting outside primitives after boolean fracture

hi all, This is a bread and butter problem, solved in many different ways....remove (cull) the outside piece primitives after a "Boolean Fracture". Ive been looking for a simple and fast VEX solution (not... for-each loop nodes) I found one that seems in the right direction as I love its simplicity. (was trying this in detail mode) If anyone has other or a more elegant VEX solution I would love to explore it, cheers int insides [] = expandprimgroup(0, "inside"); int outsides[] = expandprimgroup(0, "outside"); foreach(int inside; insides) { int success; string insideName = primattrib(0, "name", inside, success); foreach(int outside; outsides) { string outsideName = primattrib(0, "name", outside, success); if(insideName == outsideName) { setprimgroup(0, "inside", inside, 0, "set"); setprimgroup(0, "outside", inside, 1, "set"); setprimattrib(0,"Cd",outside,set(1,0,0),"set"); //small test using the colour break; } } } as usual any help appreciated.
11. ## Procedural Trees

Nice work, The difficulty is always the connection point and keeping the UVs clean, I was going to attempt this also using voxels (trying for a single shape). There has been some interesting work on instancing at the last twig level (ie. leaves+twig. ) as it reduces overhead and allows complex additions (ie. pine cones, apples etc).
12. ## Ramp mask Control on a GRID in VEX

Hi all, Im looking to control the colors on a grid ( YZPlane) in VEX to create a mask (will be used to create a group of the un-masked area), My approach is to use relpointbbox for the position and 3 chrand's for each side profile, Im looking to see if someone has done something similar. My current solution (and for those interested) is fairly simple but gives good control. vector bbox = relpointbbox(0,@P); float Right = chramp('RightRamp',bbox.y); float Left = chramp('LeftRamp',bbox.y); float Top = chramp('TopRamp',bbox.z); //Init to 0 v@Cd = 0; //Top Ramp if(bbox.y<Top ) @Cd.g=1; //Left Ramp if(bbox.z<Left/2+.5 && bbox.z>.5 ) @Cd.r=1; //Right Ramp if(bbox.z > (1-Right)/2 && bbox.z<.5 ) @Cd.b=1;
13. ## Primitive Center Rotate in VEX

thanks again, often its "un-optimized meany, can be faster than optimized few".
14. ## Primitive Center Rotate in VEX

Thought I'd share a little primitive center rotation snippet, any comments welcome. Note: Requires connectivity node upstream set to primitive and attrib "class". //Rotate primitive around center and defined axis int points[] = primpoints(0, @primnum); vector axis = set(0,1,0); //define user axis //vector axis = normalize(@N); //if normal axis is required float angle = ch('angle'); matrix3 rotm = ident(); rotate(rotm, radians(angle), axis); //get center (requires connectivity node, set primitime and sttrib "class") string grp = '\@class='+itoa(i@class); vector CenterPivot = getbbox_center(0,grp); vector pos; // move points to origin, rotate, move back foreach(int pt; points) { pos = point(0,"P",pt); pos -= CenterPivot; pos *= rotm; pos += CenterPivot; setpointattrib(0,"P",pt,pos, "set"); }
15. ## Primitive Center Rotate in VEX

Thanks Konstantin , For curiosity sake, would this section be executed per/particle, does Houdini optimize for this? (thinking multi threading). int class = prim(0, 'class', i@primnum); string grp = '@class==' + itoa(class); vector pivot = getbbox_center(0, grp); matrix m_rot = ident(); rotate(m_rot, amount, axis); C
16. ## Boolean made mistakes at the coincident primitives

Hi Elon, I'm experiencing a similar issue just looping over boolean subtracts. It appears that the Houdini boolean's could certainly use an update to handle more special cases and improve stability (anyone know someone there?) An option I have been considering is to use the polydoctor, flag the errors and further process these to "fix" the anomalies. but I don't hold out much hope for his...
×
• Donations

• Leaderboard