inheriting orentation of object merge

   1689   4   2
User Avatar
Member
13 posts
Joined: Nov. 2019
Offline
Hello. I'm pretty new to Houdini and I'm trying to make a stair generator that works off the volume and orientation of a cube that's fed into the start of the network. The hope is that someone could then specify create a cube in Unity, which Houdini engine would create the stairs from.

My issue currently is that when I orientate the box coming into the network, my stair generator doesn't inherit the rotation of the box. I'm using BBox calculate the bound of the box, which might be where this is all going wrong if that works in world space.



Any ideas what I could do to achieve this? Perhaps, forcing the cube back onto the Z-axis and then reapplying the rotation at the end of the network? I'm not sure how I would get that info from the imported box?

Thanks
Pete
Edited by kypo - Jan. 25, 2021 15:05:00

Attachments:
rotation added.png (971.8 KB)

User Avatar
Member
143 posts
Joined: Oct. 2015
Offline
if you transform your cube with a transform node you can output an xform attribute then do an attribute copy and use transform by attribute to apply the same transformation to your stair :

Attachments:
SharedScreenshot.jpg (260.9 KB)

User Avatar
Member
8539 posts
Joined: July 2007
Offline
if the transform was done by transforming the actual object you are merging from
then you can check Pack Geometry Before Merging and you will get packed primitive with transform intrinsic on it that you can use as you please to transform your stair
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
13 posts
Joined: Nov. 2019
Offline
Hey guys. Thanks for the replies.

I'm not sure how Houdini engine pipes through the objects transform but I assume it's similar to altering a box nodes transform so I tried to recreate the setup in Houdini:



Which then comes through the object merge but this is where I'm not sure how to grab the info in relation to the examples you posted?

Edited by kypo - Jan. 25, 2021 15:04:47

Attachments:
Box.png (81.3 KB)
stair.png (398.9 KB)

User Avatar
Member
143 posts
Joined: Oct. 2015
Offline
Hello I don't know very well the houdini engine but i know there's some tutorial
Is it intended to work with some user input cube ??
I think it all depend for wich program you are doing it ...
i saw something like this working in unreal ...

If you are sure it's a box being plugged
you could try some vex solution like maketransform from one of the bottom point and his neighbours
but i think it would be tricky to have something working for every case

Better try to find some tut in my opinion
  • Quick Links