Jump to content
Sign in to follow this  
Masoud

How could I align several geometries (Vertically/Horizontally to Center/Top/Bottom/...)?

Recommended Posts

Hello;

I would like to align several geometries ( Vertically/Horizontally to Center/Top/Bottom/...) in view port like other 3d packages, but I can't find any useful tool. The only things I found are:

"Align Geometry node " which aligns a group of primitives to each other (in SOP context) : https://www.sidefx.com/docs/houdini/nodes/sop/align.html

and "Align Components shelf tool " which transforms an object, or inserts a Transform node in a geometry network, to align two faces on separate models. :  http://www.sidefx.com/docs/houdini/shelf/aligncomponents.html

But these are not what I want.

 

 

Thanks for helping.

Share this post


Link to post
Share on other sites

Hi Masoud, you could build a custom shelf tool for aligning objects. Accessing the bounding box values for each selected geometry might be a good start:

for node in hou.selectedNodes():
    for child in node.children():
        if(child.isDisplayFlagSet()):
            bbox = child.geometry().boundingBox()

 

Share this post


Link to post
Share on other sites

Thanks guys, but:

"WHY" THEY DON'T ADD AN ALIGN  TOOL TO HOUDINI !!!!????? :wacko:

Share this post


Link to post
Share on other sites

I guess historically Houdini was not used much for assembling scenes. Also everyone is asking for different tools, so I am quite happy the developers are focusing on the big picture.

Houdini is rather about building your own tools: Right click on the shelf bar, 'New Tool' and put something like this under the 'script' tab to get started:

// aligns all selected geometry nodes to the bottom
min_height = 100000.0
for node in hou.selectedNodes():
    for child in node.children():
        if(child.isDisplayFlagSet()):
            bb_min = child.geometry().boundingBox().minvec()
            if(bb_min[1] < min_height):
                min_height = bb_min[1]

for node in hou.selectedNodes():
    for child in node.children():
        if(child.isDisplayFlagSet()):
            bb_min = child.geometry().boundingBox().minvec()
            offset = min_height - bb_min[1]
    node.parm('ty').set(offset)

The first mayor loop is finding the lowest minimal height within all immediate child nodes and the second one is applying the offset on object level.

Edited by konstantin magnus

Share this post


Link to post
Share on other sites

Hi Konstantin, and thank you very much.

You know, I like to develop my tools, but I haven't enough time to ...

Is Houdini a fully 3D software, or just a FX package ?

Share this post


Link to post
Share on other sites

It's the most versatile 3D package I know and I don't even use it for effects. I guess it's just Houdini's entirely different philosophy and scope that can be overwhelming (and sometimes disappointing) in the beginning. 

I see Houdini rather as a system for building procedures. But some users don't embrace this and keep requesting to turn it into another Cinema 4D with better simulation abilities.

Edited by konstantin magnus
  • Like 2

Share this post


Link to post
Share on other sites
23 hours ago, konstantin magnus said:

It's the most versatile 3D package I know and I don't even use it for effects. I guess it's just Houdini's entirely different philosophy and scope that can be overwhelming (and sometimes disappointing) in the beginning. 

I see Houdini rather as a system for building procedures. But some users don't embrace this and keep requesting to turn it into another Cinema 4D with better simulation abilities.

Hi Konstantin, I agree that Houdini is a very good  3D DCC, and I'm not trying to turn it to another 3d software.
But some features are essential and it's important how easy you can access them.
Why they add a "Rotation" tab to nodes in Houdini 17 (as I recall correctly)?!  Have they changed their philosophy? I think No, it was a missing feature (same as Align Objects that I need).

Edited by Masoud

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×