Search - User list
Full Version: Procedurally generated random closed curve
Root » Houdini Lounge » Procedurally generated random closed curve
jttarigan
Greetings,

I am new to Houdini (and 3D content creation) so this might be a beginner question. I'm trying to generate a random closed curve which will be used as a guide to develop a race track in my terrain. However, I've tried a few trick but it didn't work. What I did is I put a NURBS curve with four points, successfully created a circle but with a poly inside. How can I remove the face/primitive and keep the curve? (or is there any easy way to just create a closed curve (without a face in it).

To add more samples in my curve, I resampled it. But then I lost my curve's smoothness. Is there a way to add samples without breaking the smoothness?

The next step is to add a normal at X and Z direction (Y=0), and use mountain to randomize the curve. This works but sometimes, there's a cross in my curve. Is there a way to avoid cross in random curve?

The image below is my current attempt. Any advice would be grateful.



Thank you
Faitel
There are whole bunch of helpful nodes for you
jttarigan
this is exactly what I need (even better with smooth random Y value).

I have a few questions though
1. What is Tanget values? How was it generated? I've tried to look the page about polyframe but it does not describe any info regarding tangent and bitangent.
2. can you explain a bit about the VOP? I understand that it adds a random value to position. But how does it avoid cross in the curve? And what does tangentv do in this VOP?

Thanks before
Faitel
Docs describes it pretty well if you understand how vector math works. I'd recommend to watch the lesson to understand how to do basic operations and troubleshoot vectors with visualizers


First of all, Polyframe can recalculate normals. In our case(single flat poly) it's just +Y vector {0,1,0}

That's much easier to see how Polyframe works when Style parameter set to First Edge

But you need to set up second style - Two edges, to get Bitangent vector looks in the middle (that's not how it's actually calculates) of two neighbour edges.

Because you calculated Bitangent vector in right direction that makes unlikely any intersection between points, then you can add the bitangent(tangentv) vector to current point position and it will move point in direction and length of bitangent vector.

Also, you can multiply bitangent vector to any scalar value and change vector length to get interesting results for all points.
jttarigan
Thanks for the detailed explanation. I am a little bit weak in computer graphic math.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB