Get size of bbox of previous copy

   5886   8   2
User Avatar
Member
379 posts
Joined: 12月 2006
Online
I am copying some objects, and to be able to translate current copy correctly I need to get size of bbox of previous copy. I can not for God sake figure out how to do that, any suggestions?
User Avatar
Member
8686 posts
Joined: 7月 2007
Offline
if you need just previous one, you can compute it in the left copy branch as well and then use that info, but if you need all previous ones, it's better to use another solution (like for each, or maybe you can know all the sizes before and just use that info) but that depends on your actual problem
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
696 posts
Joined: 3月 2009
Offline
Agree with Tamte, the best bet is to know your bbox beforehand and use expressions to figure out the current copy based on the previous one…

On the other hand you can use a VOP SOP to go through the points and setup the bounding box sizes (overall scale of the intended copies) as point attributes and then apply those values to the copies as stamping attributes. That's how I solved a similar problem I had, although I was traversing points in a line so it was an easy one-way comparison anyway.

Cheers
Toronto - ON
My Houdini playground [renderfarm.tumblr.com]
“As technology advances, the rendering time remains constant.”
User Avatar
Member
512 posts
Joined: 7月 2009
Offline
you could build simple feedback system using a foreach SOP,
alternatively a Python SOP would be a good way to solve your issue.
Check out the attached file, I couldn't resist

Attachments:
Foreach_stackObjects_feedbackSystem.hipnc (64.9 KB)

http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
379 posts
Joined: 12月 2006
Online
Thanks for response guys!

What I need to do is similar to books on shelf. I need to generate several of them, random sizes and than to place them on by one. I might go with Python SOP just need to learn more about Python in Houdini. This is something I created in Maya with Python, for practice I am transferring scripts to Houdini.
User Avatar
Member
696 posts
Joined: 3月 2009
Offline
If you build the books procedurally then you can specify the size based on the position rather than the opposite. It'll be much more straightforward and indistinguishable for the viewer.
Toronto - ON
My Houdini playground [renderfarm.tumblr.com]
“As technology advances, the rendering time remains constant.”
User Avatar
Member
379 posts
Joined: 12月 2006
Online
Thanks for help.

I manage to do it with copy, distance() and attributes
Here is short video of where I am now. It requires more tuning.
http://screencast.com/t/yWCmmNpx1T9o [screencast.com]
I really need to learn more about Python in Houdini.
User Avatar
Member
696 posts
Joined: 3月 2009
Offline
looks really good, man! congrats!
Toronto - ON
My Houdini playground [renderfarm.tumblr.com]
“As technology advances, the rendering time remains constant.”
User Avatar
Member
379 posts
Joined: 12月 2006
Online
I finished this as book generator. Here is video and some pics, really fast way of generating a content for libraries

http://screencast.com/t/suPXAMeYiY [screencast.com]



  • Quick Links