Houdini - Procedural Modeling Tips! - Curve Directions
HTML-код
- Опубликовано: 9 сен 2024
- In this video we are going to look at how to produce the proper vector directions for a given curve. You will find that you will need this quite often when making tools for Houdini and the Houdini Engine. At the end of the video we take a practical look at how the curve directions are used in a real world scenario.
Find more tutorials and courses like this on Patreon: / indiepixel
amazing. love it.
Thanks! Just what I needed.
That was such a great, precise and straight to the point tutorial! Thank you, great work : )
Awesome tip and technique. Especially with the alternate methods. Im moving over to Houdini and this was great to learn. Thanks
No prob...this is definitely a technique you'll use a lot.
This is super helpful man, super helpful. Thank. You for making this.
thanks for sharing such an informative tutorial!
Great tutorial! Had no idea about saving presets either so this helped a ton
thank you very much, very kind Sir, and thank you in particular for creating the second part, since I had problems with the first but succeeded with the second method.
Really well explained and concise, cross product can become overly complicated to wrap your mind around but you've managed to really make it clear and easy. Thank you!! Hopefully can manage something similar for quaternions : )
No prob glad you liked it! The qrotate function is your friend for quaternions and rotate is good with matricies.
@@IndiePixel3D Oh so those are the functions to use. Similar to how you showed an example with the sweep node, what would be possible use cases for you to need to calculate the qrotate or rotate?
degenrate case occurs when tangential vector is vertical, which leads to totally opposite flatnorm bwtween adjacent points
Thanks a lot, I always use polyframe node after the resample to get the tangent attribute into normals but never noticed it exist inside the resample node
this solved my problem
Thanks a lot
This is great to know. Thanks!
Thank you so much for the video! I was having a lot of trouble with my geo not following the normals the way I thought it should, this solved it all :)
one thing I do not understand, is that we create the flat, right and up parameters.. but how does the sweep node know that those are referring to the proper normal direction if those are "made up" parameters?
The sweep node is looking for those particular attribute names...if they exist the sweep node will use them if they dont the sweep node will try to create them on own.
Awesome tutorial, i love your teaching style cause you always make complicated stuff easy to understand. I bought some of your udemy courses, but please permit make a future course request there are extreme shortage of clearly explained tutorials on how to build a realistic third person character controller system with great camera and weapon management system like the TPS controller system in the last of us. Please think of it.
So very useful. Thanks
Brilliant, thank you ! When are you going to show the Rollercoaster-Generator ? :)
thanks a lot, really appreciate it
Hello!
Very nice tutorial. This works well with open curve.
I tried it on 2 closed curves.
First one created in a counter clock direction.
Second one in a clockwise direction.
I have a Sweep node at the end but only the first curve red normal point inward.
How would it be possible to use any type of curve red normal to always point inward?
Thank you in advance for you help and keep on doing such great tutorials :)
Thanks! Is it better than "orientalongcurve" node?
Well this has its uses for lots of procedural modeling tasks. The orient along normal is good too for certain things. When it comes to procedural modeling I like to have very custom control and so build the vectors myself.
So, I've run into a bit of a snag. I'm trying to push points along their right and up vectors randomly. To simplify lets forget about the randomization, if I try and do, @P = @P + @right*ch("scalar");, the points just don't go in the correct direction, like I'm looking right at the values in the viewport and the movement just isn't correct at all. If I pull up the geometry spreadsheet, my right vector is expressed in terms of right[0], right[1], right[3]. Now if I look at the up vector, for some reason its components are actually expressed in terms of x y and z, and this simple vex code works properly when tested with the up vector, it's able to push them along that up vector in a way that's expected. So my only guess is when adding two vectors, where one (@P) has its components expressed as xyz and another (@right) whose components are 0 1 2, its like it doesn't know how to "match them up" or something. So, when I define a custom vector attribute, how do I make sure that its components are gonna be expressed as x y z?
Hey, I tried your method and compare with just simpe a single line @up= {0,1,0}; I see no different in the sweep or copy to points? What wrong here?
way to go man
great tut that helped me discover my problem.... the resample node is creating some wonky normals on my noisy curve that's mainly vertical, but they're much cleaner if I first rotate my curve -90 on the x axis. any ideas on how to get the cleaner normals without rotating it?
Thank you
very good tutoria🤣, i am wondering the curve vertex if is possible add width for each point and edit it on houdini engine? I only know it can you gradient node to do it but its not really what I like
You can using multi-parms on your HDA
Houdini wont let me start the creation of the curve once the component is there, but I heard a click on your keyboard/mouse. Would be lovely to let me know what key mouse/keyboard you clicked to do that
select the curve node and move the mouse crouser to the viewport and press enter then u can start drawing thats it!
Hi, why did you flatten the normals in the Y direction? Is there any reason I should use flattened normals instead of the original ones in the cross product?
Thanks.
In order to get the proper right vector we flatten the flow normal and do a cross product with the world up vector. Once you have the right vector you do a cross product to get the proper up vector. If we didnt flatten the flow normal we'd end up with a wonky right vector.
doesnt the direction of flattened normal flip when you do full rotation track? like loop track?
Yep, if you wanna do looping tracks it has to be taken into account. Can do it with a sweep node and an attribute transfer node.
@@IndiePixel3D thank you!
@@IndiePixel3D any clue how you'd go about that? Currently facing that same issue, and I have no clue what you mean by using the attribute transfer? I'm assuming you mean transfering the right vector from other bits in the spline, but how would you even go about detecting if it messed up, and getting those points over?
Much appreciated
I have a problem, when I put the subdivision curve nothing happens, it does not smooth.
I've notice that happen in Houdini 19...is that what you are using? If so delete the resample nide and make a,new one...that worked for me
@@IndiePixel3D yes i have houdini 19
@@IndiePixel3D I tried again to delete the resample and put it back but nothing changes... :/
@@hoprem. huh, weird...I have seen that before...might want to bug it with side fx.
@@IndiePixel3D i find the problem, it's the mode. You must change mode on CVs on your curve
Why not just use a polyframe node? It does all this for you. Don't get me wrong - understanding the cross product is super helpful, but for curves polyframe is quick and easy.
You can do sho...though it doesn't work in all situations.
@@IndiePixel3D Oh, now I see - you do that so that the up vector is pointing towards the center of the geo, to prevent flipping. But that also doesn't always work...
@@christianbohm6118 in this case the up vector is derived from the flow normal and the right vector which produces a vector pointing up from the curve. If you need an up vector to support looping then you need to do it a bit differently which I'll show next week.
@@IndiePixel3D Ah, i mixed that up with your angular sort, nevermind. I know how to do that, I just tried to find a reason why a polyframe wouldn't be enough for this...
@@christianbohm6118 no prob at all...so whenever I place a polyframe on a raw curve I hardly ever get the direction vectors I want....it works well for the flow normal, but not for up and right vectors...so i always have to assign my own vectors. Polyframe is a good node fo sho...but I always end up doing custom vectors anyways
yeah this tutorial is broken! I don't think this method is working in Houdini 20. All I get is errors and weird situations where nothing is actually happening in the viewport.
They might have updated the way curves work in the api. Check the attributes are the same names for curves since the updates
Also I do know curves now have a orientation handle for rotating the curves now in Houdini 19 and above