Jump to content

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


Masoud

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.

Link to comment
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()

 

Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...