eimk

Members

31

• Days Won

3

eimk had the most liked content!

16 Good

• Rank
Peon

• Name
Ethan
• Location
Scotland
1. barbed wire!!

This seemed like an interesting challenge, so I had a go at making the barbs. This works for the 1st and 4th type from that image. barbed_wire_OD.hipnc As for the wires themselves, a curve + noise would work, copying a barb to every nth point. For multiple wires you could add an additional noise per wire that tapers off near the barbs.
2. Min/Max Point Velocity

That would definitely work, but it might result in @speed not being mapped correctly to a 0-1 range if you can't find the exact minimum and maximum velocities across the timeline. Plus if you update the RBD sim those values will change and you'll have to update them manually. In case you haven't got the solver working, here's a couple of ways to find the max and min over the whole timeline: min_max_v.hipnc
3. Min/Max Point Velocity

Every point has the same velocity initially and therefore the min and max are the same, which makes every value get remapped to 0.5 (the middle of your output range). After frame 1050, when the sphere hits the floor, each point has a different velocity and @speed is in the range 0-1. If you instead want the minimum and maximum velocity across the whole timeline, you'll need to use a solver (there might be other methods but a solver is the most simple).
4. [SOLVED] Compute angle between unshared edges

Another way to do this is to construct a matrix from the point normal and your two vectors, then find the determinant of the matrix and use it and the dot product to find the angle. vector N = point(0, "N", P0); float dot = dot(v0, v1); matrix3 mat = set(v0.x, v1.x, N.x, v0.y, v1.y, N.y, v0.z, v1.z, N.z); float det = determinant(mat); return (360 + degrees(atan2(det, dot))) % 360; getHoleAngles.hipnc
5. randomly rotating boolean cutters copied to points

It's difficult to know what would work without seeing your file, but the sample_direction_cone() VEX function might be what you're looking for. For example: @N = sample_direction_cone(@N, ch("max_angle"), rand(@ptnum));
6. Vellum delete attributes?

It might be because vellum deforms geometry, so any normals set before the solver aren't going to be accurate afterwards. Still seems like something that should have a toggle.
7. Decay points over time HELP

Assuming by decay you mean the points get deleted, this will do it: int frame_offset = 30; int decay_length = 150; float death_time = fit01(rand(@ptnum), 0, decay_length) + frame_offset; if(@Frame > death_time) { removepoint(0, @ptnum); } Decay will start at frame 30 and last for 150 frames. point_decay.hipnc
8. Mushroom growing system

The VEXpression I used on the pop wind node was: amp *= 1 - clamp(@age/3, 0, 1); Dividing by 3 because they all seem to stop before their age reaches 3 seconds. I didn't notice them spinning before, sorry. If you wire the align node right into the matrix to quaternion the rotation will stop, although I'm not familiar enough with matrix maths to know why. Here's the scene file: mushroom_system_OD.hipnc
9. Mushroom growing system

1. The orient attribute is driven by velocity, which becomes very shaky towards the end. This is because of the wind force. Here's a visualisation of velocity (sorry for the bad quality gif): If you reduce the effect of the wind force as the particles slow down then velocity will be more stable: I used a VEXpression on the wind node to reduce the amplitude over time but you could achieve the same effect in multiple ways. 2. You could try POP Steer Avoid or other crowd dynamics nodes. And/or scatter points on the source geometry before the DOP network, set their @pscale and use a point relax. Then the points will be spaced enough before the sim starts.
10. for loop - inheriting v attribute

A wrangle set to run over points will execute the VEX code once for each point in the input geometry. When using the @attribute syntax, you are setting an attribute on the point that is currently being run over. If you want to set an attribute on a different point, you have to use setpointattrib, which I see you already have commented out. The one you have will do exactly the same as setting @v since the point to set the attribute on is @ptnum. If you want to set the @v attribute on the point you just created, you'll have to store the created point in a variable, and then use that variable in place of @ptnum. for(int i=0; i<10; i++){ if(@rand>0.8){ v@pos = point(1, "P", 0); v@v= v@P-v@pos; i@point = 1; } if(i@point !=1){ v@v=set(0,1,0); v@Cd=set(1,0,0); } if(i@point==1){ v@Cd=set(0,1,0); v@v= v@P-v@pos; v@P+=v@v*-0.01; int new_point = addpoint(0, @P); v@v= v@P-v@pos; setpointattrib(0, "v", new_point, v@v); } } There are also some inefficient methods in your code, which aren't necessarily a huge issue for what you're doing here but it's good to always optimise things anyway. You're creating variables by setting attributes, which is slower and leaves you with a bunch of attributes you don't need after that wrangle. The first if statement executes once for every loop even though it will have the same outcome each time. Also, certain attributes like P, Cd, and v are recognised by Houdini and don't need to be specified as vectors. Here's an example of how you could remove these inefficiencies: if(@rand > 0.8){ vector pos = point(1, "P", 0); @v = @P - pos; @Cd = {0, 1, 0}; for(int i=0; i<10; i++){ vector P = @P + @v * -0.01 * i; int new_point = addpoint(0, P); setpointattrib(0, "v", new_point, @v); } } else{ @v = {0, 1, 0}; @Cd = {1, 0, 0}; } Hope this helps!
11. "Banding" effect on pop sim

Here's a solution that keeps the effect looking very similar but removes your problem. It basically does the same thing as minpos but without actually using the source geometry so there aren't any polygons to worry about. It wouldn't work for any source geometry that wasn't a sphere + noise but it does work here. orbsOdForceVOP.hipnc
12. Universal gravitation simulation

Sebastian Lague's stuff is really cool - you have great taste. His code can be translated pretty much directly into VEX; sqrMagnitude becomes length2(), normalized becomes normalize(), and the equivalent of timeStep is the @TimeInc attribute. The key part is putting it inside a solver so the positions are updated each frame, based on their positions from the previous frame. Here's my attempt: (I'll post the file if you're still having trouble but it's a bit messy)
13. Constraints broken in Houdini 18.0.532

Promote the 'name' attribute from primitive to point after packing and the constraint will work.
14. Why I can't transfer “P” attribute values, to second geometry?

Even shorter version: @P = lerp(@P, @opinput1_P, ch("mix"));
15. uvtexture camera preojection

Seems like your geometry just needs more divisions. Here's the UVs from your original scene file: They look really distorted here. If the divisions on the larger box and the tube are increased, that distortion goes away:
×