The Houdini Way of Making a Simple Instance

   7753   14   1
User Avatar
Member
22 posts
Joined: 7月 2014
Offline
I am building a simple scene. I want to have two copies of an identical object (in this case, a chest of drawers) that I want to be able to position separately.

What is the best way, in Houdini, for me to do this?
User Avatar
Member
453 posts
Joined: 2月 2013
Offline
Depends a bit on whether you are staying in Houdini and whether you actually need object level objects. Within Houdini, you could just stay inside one object level geometry and use something like a copy SOP or a merge SOP (plus a transform SOP).
If you want object level separation, you could copy paste the drawer, or make a geo node with an object merge SOP inside of it. Then in the Object merge you reference the output from the node where you generate the geometry. That way, you only ever have to change one geometry of the same type.
Another way would be to use the Instance node.

- I'm actually curious to hear about more options.
User Avatar
Member
333 posts
Joined: 10月 2012
Offline
One more would be
- duplicate sop (The Duplicate OP is a simpler but faster version of the Copy node)

If you want real instances use Packed Prims on Copy sop or the Instance Node like DASD mention. Each point in the instance Node will be an instance.
User Avatar
Member
22 posts
Joined: 7月 2014
Offline
I was really looking for object level separation, so pretty much everything on the SOP level is out.

I like the idea of using object merge in a separate geometry node. Very clever. I think I'll give that a try.

I tried using the ‘Instance’ node, but it appears to be setup to create instances of one object based on the placement of points in another object and appears to only work at render time. I suspect that I wasn't using it correctly, but I couldn't find any examples.
User Avatar
スタッフ
3456 posts
Joined: 7月 2005
Offline
make the object an HDA
now you can place as many as you want/need at the object level
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
22 posts
Joined: 7月 2014
Offline
That was my first idea, but I ran into a problem with parenting them. Is there an easy way to parent HDA's? Whenever I make them they don't have a object-level slot for that.
User Avatar
Member
453 posts
Joined: 2月 2013
Offline
On the object level, when you connect one node to another, it is parented. When you change the transform of the node upstream, the nodes connected to it downstream move with it.

On the Instance node, under Instance, set the Point Instancing parameter to “Full point instancing”. Then you see the geo at runtime. With point attributes, you can change scale and rotation of instances and what is instanced on each point. That's great for repetitive stuff.
User Avatar
スタッフ
3456 posts
Joined: 7月 2005
Offline
Zach Hall
That was my first idea, but I ran into a problem with parenting them. Is there an easy way to parent HDA's? Whenever I make them they don't have a object-level slot for that.

on the Type Properties Basic tab there is a section for inputs
change Maximum Inputs to 1
this will give you a slot and a connector thingy inside your asset to wire to whatever you need…

HTH
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
379 posts
Joined: 12月 2006
Offline
The easiest way is to use Instance node.
User Avatar
スタッフ
3456 posts
Joined: 7月 2005
Offline
SreckoM
The easiest way is to use Instance node.

if we consider the actual task:

Zach Hall
I am building a simple scene. I want to have two copies of an identical object (in this case, a chest of drawers) that I want to be able to position separately.

What is the best way, in Houdini, for me to do this?

then instancing IS NOT the easiest way.
this is an asset layout issue - not a rendering one
it's entirely possible that these chest of drawers might need to be placed differently shot to shot, or that a character/FX will need to interact with them in some way.

making an asset of a box (a chest of drawers) will take about 5 minutes, placing it in a scene takes another 30 seconds.
and at the end of the day you have an asset that you can use in other shots/scenes/projects.
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
379 posts
Joined: 12月 2006
Offline
Hmm yeah you have point there. Usually what I associate assets with is to use them in several projects, not to copy them in same scene, hmm not sure if I manage to say this right But I guess that is something I bring from other apps, which might be different in Houdini.

What is relation of assets and viewport performances? Or does viewport in Houdini benefits if I use Instances? Or assets? In many apps using Instances helps with viewport too. If I want to copy complex, high poly tree for example.

Also what if I need to do some small changes in master object, like add new part, open drawer or thing like that? Do I need to update asset everytime I do that?

And what is problem with position of instances?
User Avatar
スタッフ
3456 posts
Joined: 7月 2005
Offline
in this example a chest of drawers HDA would be an Object - so if you had 10000 of them things are going to slow down in the viewport just like any other geometry
if you have a forest of trees - sure, instancing is the way to go…BUT - your tree could be (should be IMO) an HDA, that you can then instance.

if you edit the HDA definition - you have control over how those changes propagate to the instances of the HDA in your scenes. In the chest of drawers example you'd rig the HDA to have drawers that could open - then you can just open then individually.

The workflow that exists in most apps of - model something, copy/duplicate it, move the copy, do more modeling, copy, move etc etc ending up with a huge multi part chunk of geometry is a very bad thing. Imagine building a city, you have hundreds of buildings all in big block chunks…and now the director asks for a certain camera angle, but one of the buildings in in the way…if they were assets it would be a simple matter of just moving it.
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
379 posts
Joined: 12月 2006
Offline
Yeah exactly, I would make HDA and than Instance it. You might skip creating HDA process if you like, but it is smarter way of organizing scene. In nutshell creating HDA is one step but if you make HDA you would instance it anyway, correct?

I am confused now with this, if I want 10 same objects in scene, is it same if I add 1 hda and than instance it 10 times or add hda 10 times ?
User Avatar
スタッフ
3456 posts
Joined: 7月 2005
Offline
I am confused now with this, if I want 10 same objects in scene, is it same if I add 1 hda and than instance it 10 times or add hda 10 times ?

if you rendered with both methods you'd get the same image
but memory, time etc would be different

the only reason to load 10 hdas is if you needed each tree to be different in some way - lets say you had a parameter on it that controlled the number of branches..otherwise the better option is to use instancing - but you can instance a hda. so there is no reason not to make your assets into hdas
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
379 posts
Joined: 12月 2006
Offline
That is what I thought, so we agree, make HDA and than instance, win-win
  • Quick Links