Newbie expression question

   2007   4   0
User Avatar
Member
3 posts
Joined: April 2015
Offline
Hey Everyone. New Houdini user here that is loving the learning experience so far but I've run into what I'm sure is a very simple problem for any experienced user that is more familiar with expressions then I am. What I'm trying to do is have a box SOP (still getting used to terminology so sorry for newbie mistakes) to use a transform SOP that is giving a fixed translation offset but also have an expression driven rotational offset to keep to bottom face of the box pointed at the origin for now but will probably be replaced with a point or null to target instead once all the modelling work is done and I start rigging. I've been reading through the help files and looking around here on the forums and I'm still not sure were to really start with this expression. Any help is greatly appreciated and here is the HIP file of what working on. Thanks again.

Attachments:
WarpGate_002.hip (114.8 KB)

User Avatar
Member
2540 posts
Joined: June 2008
Offline
Couldn't you just set the box transform X-rotation to 0, instead of 25? Then pre-model the box with the 25 degree face angles where needed and use that as the box copy source instead?
Edited by Enivob - Sept. 4, 2016 10:34:09
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
Hi and welcome.
You should check out this [sidefx.com] section in the docs. And especially this [sidefx.com] chapter.

When building structures like this, it's much easier to first build a template of points (that goes into the second input on the copy node) and then copy your geometry onto those points. As you can see in the second link the copy node reads all the listed attributes by default. It's a lot easier to control attributes on single points in your template and have your copied geometry obey those attributes. Than trying to control N copies of full geo.
Check out that modified version of your file. First I set up the points to copy onto. Then i set the normal to point to the target. The copied geo aligns it self with the normal of the point automatically.
Hope this helps.

-b

Attachments:
WarpGate_003.hipnc (126.8 KB)

http://www.racecar.no [www.racecar.no]
User Avatar
Member
3 posts
Joined: April 2015
Offline
Enivob
Couldn't you just set the box transform X-rotation to 0, instead of 25? Then pre-model the box with the 25 degree face angles where needed and use that as the box copy source instead?
That is what I originally did before I put in the transform but since this is a personal learning project I wanted to find a more procedural way to better learn the software and techniques instead of using my more traditional modelling techniques. If I wanted to I could knock this model out in it's final version in a day in Modo or LightWave or Maya, but I like the challenge of getting out of my comfort zone and learning new things.

bonsak
Hi and welcome.
You should check out this [sidefx.com] section in the docs. And especially this [sidefx.com] chapter.

When building structures like this, it's much easier to first build a template of points (that goes into the second input on the copy node) and then copy your geometry onto those points. As you can see in the second link the copy node reads all the listed attributes by default. It's a lot easier to control attributes on single points in your template and have your copied geometry obey those attributes. Than trying to control N copies of full geo.
Check out that modified version of your file. First I set up the points to copy onto. Then i set the normal to point to the target. The copied geo aligns it self with the normal of the point automatically.
Hope this helps.

-b
Thanks for the links, I'll certainly dive into those chapters when I get home tonight. I kept seeing that copy was really powerful and I just figured I was trying to do a radial array and just stopped there. Bad habit I guess I'm going to need to start breaking but it should be a fun learning experience. And thanks for the edited HIP, it really helps a lot to see it written out but also being able to open it up and see how the data is piping around really helps me make sense of it all. I'll try to jump into it tonight and get a grasp on what's going on as I'm sure I'll be using this technique quite a bit in future projects.
User Avatar
Member
3 posts
Joined: April 2015
Offline
Well I was writing up a follow on question concerning some odd rotations I was getting out of the pointwrangle and copy but I just figured it out. After reading through the chapters that bonsak recommended I figured that the UP vector or OREINT was not being handled properly by the copy so I checked and of course neither attribute existed since I never created them. So I started playing around in the pointwrangle and got nothing that worked. Went back to reading and then remembered the point SOP can create attributes for me and there was the UP vector under particles. Dropped the SOP right after the initial base point and bam, problem solved. Think I'm starting to get a hang of this. Went ahead and attached the updated version if your interested. Thanks again for the help, it's greatly appreciated. Eventually I'll be making the whole truss building section into a digital asset that I can use in Maya with Houdini Engine since that is something I would make a lot of use of for a good majority of my contracts so any tips or pointers concerning that would also be appreciated.
Edited by JHughes3D - Sept. 5, 2016 03:12:47

Attachments:
WarpGate_005.hip (155.0 KB)

  • Quick Links