Right angle curve

Recommended Posts

Good day,

I'm looking for a simple way to convert a line or a curve in a curve composed only with right angle edges.

I have try to use Fuse SOP in Snap/Grid mode but this gave me 45 degrees angle too.

Any idea?

Share on other sites

Is this what you meant?

right_angle_curve.hipnc

Edited by xmetallicx

Share on other sites

Nop,

I would like to be able to transform any curve to a curve that contain only straight lines following one of the 3 axis.

Share on other sites

Is this what you want? (Do you want to convert smooth curve to stepped one?)

I just did quick test in 2 dimensions, hope it helps. Maybe there is more elegant way to do it. I'm just newbie with Houdini.

Curve_to_stepped_Curve.hipnc

Share on other sites

Something like this, yes.

But with fixed step size and in 3D space.

My concern is exactly about finding an elegant way to do this.

All method that i've find until here are totaly crazy and give me a lot of nodes. I really hope that someone can give me a simple method for that!

Share on other sites

There is much more simple solution indeed. Just snap curve points on box mesh points.

Cheers

uniformStepCurve_3d.hipnc

Edited by pezetko

Share on other sites

Very interesting but this is very similar to the Fuse SOP (Snap/Grid) method which gives 45 degrees angles. I'm looking for a method that gives only 90 degrees angles.

Share on other sites

I fixed few parameters and it behaves more stable now. Check the original file.

More you lower the Level of Detail and Length Parameters of Resample SOP, the more stable (90deg) solution it gives. E.g LOD, and Length set to 0,001

Share on other sites

Here is a more simple version of what you've sent.

As i explained at the begining of the post Fuse SOP's grid is not 100% safe.

LineQuantize.hipnc

Share on other sites

It could be much easier for people to help if you provided some images illustrating what you are trying to achieve, even if it's just a sketch on a napkin

Share on other sites

I'm looking to do exactly what the LineQuantize.hip give as result.

But the Fuse SOP in snap mode looks more like a "trick" than a real method for me.

In the LineQuantize2.hip, i've tried to do a different system. I create an axis matrix and start from a point, draw the matrix, create lines from end points of every matrix component to the end point of the line, keep the shortest line point, and repeat this for every step. This gives also interesting(different) results comparing to FuseSOP.

Because there is a multitude of way for going from one point to another passing only by right angles lines, I was just wondering if there is a more reliable/simple way of making such thing.

Interesting informations:

http://en.wikipedia.org/wiki/Taxicab_geometry

LineQuantize2.hipnc

Share on other sites

I think your methods are fine depending on what you want to do.

However, I think you should brainstorm about what features you actually want,

because when you have a better idea of what is needed, it is a lot of easier coming up with a good solution,

a couple examples, note that it is very possible that you are fine with what you have:

-Currently it is grid based, this is a limitation in the sense that all line segments are of equal length, you could try to randomize the length of each segment between 2 values.

-It could be interesting to use a user drawn (poly)curve as an input and actually use the mid points for the output.

-Create a totally different approach, for example, measure the x,y and z distances. Pick one of the axes at random each time

and then move towards the target in one of this directions for a random portion of the total distance in this direction, until the total

amount of distance over each axis has been covered.

Share on other sites

Thank's acey195,

Yes, i'm actualy fine with my last method as it's very modular. But i feel this not very elegant and i was expecting to find out a method which i did not think about.

But, maybe there is not

Share on other sites

Here's a quick attempt. It's only 2d but seems quite stable... No time to dig further for now, but I will do later.

I would be really interested to find in a reliable method too.

taxicab.hipnc

edit : my expression was a total useless mess, new hip does just the same but better.

Edited by ben

Share on other sites

Thank's ben,

Very interesting, this can be a good base for a strairs generator

taxicab-3d.hipnc

• 2

Share on other sites

Very interesting too

Thanks

Share on other sites

I did a little HDA using the 3 methods that we find in this post. It works only on 2 points polyline. Feel free to modify/improve it.

I've made a test on my favorite model Lisa where i made pipes distribution which was my main goal basicaly

Piper.otl