Jump to content
Sign in to follow this  
Atom

Creating an instance copy of an object

Recommended Posts

Hi All,

I have a series of objects, which are road tile. I want to write a python script that will arrange the roads into a drivable road. I have a working script for Blender and I want to port it to Houdini.

What code would I use to create an instance of one of the road pieces?

Also, what is the preferred method for storing the pieces? In other software I could store the pieces in another document or scene and then have another scene or document for the generated output. Does Houdini have such a scene/doc mechanism?

Thanks.

Edited by Atom

Share this post


Link to post
Share on other sites

Hi. Not sure you need any scripting for this. Probably all you need is a bunch of SOPs with copy-stamping technique. Watch any tutorial on copy-stamping, there is plenty of them.

 

 

Also, what is the preferred method for storing the pieces? In other software I could store the pieces in another document or scene and then have another scene or document for the generated output. Does Houdini have such a scene/doc mechanism?

Most of the time houdinis bgeo is fine. For efficiency, you can use Packed Primitives or PolySoup. As i can see, you have no houdini experience yet. You need to learn some basics first.

Share this post


Link to post
Share on other sites

Try that :
instancing.hip
I guess it's what you want to do.
An instancer with some python to define the logic and create points, and objects used for instancing.
Up to you to define the logic... :)

edit : for the pieces you can have .obj on your drive and use a file to read from there 
Remember also that the detail view is very very usefull when working with attributes.

Edited by ben

Share this post


Link to post
Share on other sites

Thanks for the HIP file Ben. That is a great start.

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  

×