What is the fastest way to instance a large set of 'File' nodes manually many thousands of times?

   2690   49   4
User Avatar
Member
46 posts
Joined: Feb. 2017
Offline
I'm trying to copy ~500 ‘File’ nodes easily, which needs to be done on the geometry level so the packed disk primitives are utilised. The problem with creating a ‘Copy and Transform’ node for each individual ‘File’ node is it becomes quite difficult to find and increment one when there are ~500, especially considering these copies need to be created hundreds-of-thousands of times.

I'm considering incrementing the ‘Copy and Transform’ nodes in batches and creating a sort of palette of objects to drag the instances from, but even that would take a relatively long time.

Is there a faster way to create instances that are to be placed manually?
Edited by KalciferKandari - April 9, 2017 09:14:47
User Avatar
Member
2797 posts
Joined: July 2007
Offline
just copy it as many times as you want and using transforms you want, you can use copy to points or whatever
then use AttribVOP/Wrangle to change unexpandedfilename intrinsic per primitive to make it load whichever file you want

KalciferKandari
which needs to be done on the geometry level so the packed disk primitives
nothing is stopping you from using object level and still having file in packed disk mode inside of each object if you prefer such workflow
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
46 posts
Joined: Feb. 2017
Offline
I placed a ‘File’ node in a ‘Geometry’ node where the geometry itself was loaded as a packed disk primitive, then I copied the ‘Geometry’ node on the scene level. In this way Houdini could only handle about 2000 objects. Either way, on the scene level copying a node hundreds-of-thousands of times is not practical because that would result in hundreds-of-thousands of nodes.

As much as it can handle many primitives, I'm starting to think Houdini can't handle many objects.

Anyway, I have decided Houdini is not suited to this sort of thing. I should be doing this in Unreal, otherwise I won't be getting performance increases from Unreal's instancing when I break large objects apart into their respective instances for simulations.
User Avatar
Member
2797 posts
Joined: July 2007
Offline
not sure what you mean, you can keep all as a geometry of thousands of differently transformed packed disk primitives

the many objects option was just if you prefer to do that way, I'd never use thousand of objects personally as it has all the disadvantages you've mentioned
but what is the problem with doing it at geometry level?
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Staff
101 posts
Joined: Nov. 2012
Offline
Hey KalciferKandari

Maybe the easier question is, what are you trying to do

Houdini should be able to handle a few million polygons without sweating, specially if they are packed primitives. Are the 500 files different files? or the same file 500 times?
Luiz Kruel
Senior Technical Artist
SideFX
User Avatar
Member
786 posts
Joined: Sept. 2015
Offline
I was wondering how big are those obj files?

I was just playing around with jet plane model and was able to copy and lay out 20k of them no problem.

Also, I am wondering if the Instance Node might be able to work.
Edited by BabaJ - April 10, 2017 17:08:50
User Avatar
Member
46 posts
Joined: Feb. 2017
Offline
lkruel
Are the 500 files different files?

Yes.

lkruel
Maybe the easier question is, what are you trying to do

I have ~500 different objects imported with ‘File’ nodes. I'm creating larger objects out of the imported ones, which will involve instancing the imported objects hundreds-of-thousands of times. The question is, what is the easiest way to do this is Houdini? As I explained in the original post ‘Copy and Transform’ nodes make for a slow workflow.

And for the record, you're not answering this for me anymore but for other people, because for the reasons I said previously, I will be using Unreal.

BabaJ
Also, I am wondering if the Instance Node might be able to work.

Tried it. It is just as painstaking as the ‘Copy and Transform’ node, but even worse, when it comes to moving the instances around you can't see the full geometry in the ‘Geometry’ mode of the ‘Insstance’ node.
User Avatar
Member
6532 posts
Joined: July 2005
Offline
I'm not really clear on how you're trying to do the instancing but have you looked at Copy Stamp? It allows you to do procedural copying. I've attached a simple example that copies geometry from 3 files using a single Copy Stamp. If you've got the files in sequence (eg. g1.obj, g2.obj, g3.obj, etc…), then you just need a single File SOP instead of what I've done in the attached that makes no assumptions about the convention of your filenames.

The stamping mechanism is extremely flexible so much more complicated scenarios are possible.

Attachments:
copyStamp.hip (62.9 KB)

User Avatar
Member
786 posts
Joined: Sept. 2015
Offline
Tried it. It is just as painstaking as the ‘Copy and Transform’ node, but even worse, when it comes to moving the instances around you can't see the full geometry in the ‘Geometry’ mode of the ‘Insstance’ node.

I don't understand why you think Copy and Transform is painstaking….you really can't get any more simple than that.

If you have 500+ copied or instanced objects, and you want some slight variation on each one of them in some way ( color, position, etc. ) you have to tell the “Computer” what to do.

At some point no matter what software you are using, if there is going to be a difference between two objects…it has to be specified “manually” somewhere along the chain of code.

With the Copy Stamp like edward suggested or the Copy and Transform, Houdini makes it easy because all it requires is some simple expression.

The only reason I mentioned the Instancing Node is because I am assuming there was a need to save on memory use;

Of course that's assuming using the Instance Node does in fact save on memory/processing. A more experienced user could perhaps chime in on that point.

I assumed you had system resource issues because you say Houdini was having trouble handling 2k objects - But again what are your objects? as I can handle 10 times the amount you are saying with no problems.

And also, not sure what you mean about
can't see the full geometry in the ‘Geometry’ mode of the ‘Insstance’ node.

Because I certainly can when I use it.

Maybe it may be worth you while to spend some time and do a ‘mock’ file on a smaller scale that reflects what you intend to do and post it.

That way, I think you may well get feedback that might prove usefull.
Edited by BabaJ - April 13, 2017 18:55:25
User Avatar
Member
178 posts
Joined: Jan. 2015
Offline
Hi KalciferKandari,
i second BabaJ for the request of a scene mockup that shows what you want to do. It might be clrea and obvious to you, but i dont understand your request/question too.

regards

Olaf
User Avatar
Member
46 posts
Joined: Feb. 2017
Offline
BabaJ
I don't understand why you think Copy and Transform is painstaking….you really can't get any more simple than that.

~500 ‘File’ nodes, each one has a ‘Copy and Transform’ node. Every time I want a new instance I need to increment the specific ‘Copy and Transform’ node, so it take quite a long time to find it, that's why it's painstaking. That is opposed to hypothetically just clicking on an instance that has already been placed and using a keyboard shortcut to duplicate it.

BabaJ
I assumed you had system resource issues because you say Houdini was having trouble handling 2k objects - But again what are your objects? as I can handle 10 times the amount you are saying with no problems.

The actually geometry is very simple, around 15 polygons.

When I said 2K objects, I was specifically referring copying ‘Geometry’ nodes that had a single ‘File’ node inside that imported an object as a packed disk primitive, in response to this:

tamte
nothing is stopping you from using object level and still having file in packed disk mode inside of each object if you prefer such workflow

My point was using that method the pack disk primitives did not work, because if they did, ~400,000 objects would be possible. Instancing only works on the scene level, which is what they are referring to, using the ‘Instance’ node, and I have already explained why the ‘Instance’ node is not a faster workflow that the ‘Copy and Transform’ node.

BabaJ
With the Copy Stamp like edward suggested or the Copy and Transform, Houdini makes it easy because all it requires is some simple expression.

From the documentation [sidefx.com]:
Because stamping lets you modify the source geometry for each copy, it is not available when you are instancing (see copying vs. instancing).

I need to use instancing.

I'm not convinced there is a faster way that the ‘Copy and Transform’ nodes, Houdini just doesn't seem to have an efficient workflow for manually placing instances of a large amount of objects.
Edited by KalciferKandari - April 14, 2017 04:12:04
User Avatar
Member
6532 posts
Joined: July 2005
Offline
KalciferKandari
Because stamping lets you modify the source geometry for each copy, it is not available when you are instancing (see copying vs. instancing).

I need to use instancing.

I'm not convinced there is a faster way that the ‘Copy and Transform’ nodes, Houdini just doesn't seem to have an efficient workflow for manually placing instances of a large amount of objects.

You can still achieve instancing with the Copy Stamp SOP if you first instance the input geometry. Either tell the File SOP to load the geo as a packed primitive, or use a Pack SOP to instance the geo prior to the Switch SOP in my example.
Edited by edward - April 15, 2017 17:22:41
User Avatar
Member
2797 posts
Joined: July 2007
Offline
to circle back to the beginning
for efficient instancing without stamping
https://sidefx.com/forum/topic/49224/#post-222346 [sidefx.com]

but I guess this thread is more about being able to comfortably and quickly duplicate and move around objects in the viewport than just being able to efficiently instance hundred of thousands of objects procedurally
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
770 posts
Joined: Sept. 2011
Offline
this thread is about making a scene file with hundreds of thousands of manually placed geo nodes with file sops inside.
User Avatar
Member
2797 posts
Joined: July 2007
Offline
no, I mean it sounds like that KalciferKandari is more concerned about the user friendliness of placing the copies and creating the layout than about the pure possibility of having a lot of efficient instanced of the geos from the library
regardless of whether it happens at object or geo level

so while using a lot of objects with filesop with packed geo inside may work for hundreds of objects it clearly will not scale well

and while having hundreds of thousands efficient geometries at sop level is easily doable and all the posts here are about that, it clearly lacks interactive tools to be able to easily manipulate them in the viewport other than just transforming, like copying around and building layout, or drag&drop from library, which I feel like is behind the word “manually”

so that's why I mentioned that while efficient procedural instancing is possible even without stamping, it's probably not really a solution to the problem what this thread is about
Edited by tamte - April 15, 2017 23:19:36
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
149 posts
Joined:
Offline
tamte
it clearly lacks interactive tools to be able to easily manipulate them in the viewport other than just transforming, like copying around and building layout, or drag&drop from library, which I feel like is behind the word “manually”
I agree. It is akin to using 3dsmax/Maya where you mostly instance a lot of objects by hand during layout. Although this method is not procedural by nature, I wonder what kind of workflow one can come up with (in Houdini) to get something close to that.

Something I've done before was try and get the best from both worlds:
1. Hand placed hero/foreground objects.
2. Scattered mid/background objects procedurally.
3. Manually deleted unnecessary ones.
User Avatar
Member
6532 posts
Joined: July 2005
Offline
If the problem is to place ~500 instances with each instance copied hundreds of thousands of times, then I don't see how doing it “manually” is going to scale either. As soon as anyone mentions “hundreds of thousands”, then it only makes sense to do it procedurally in my biased worldview. The OP hasn't really offered any more information for his use case but problems like this sound similar to game level designs like Ghost Recon Wildlands [gdcvault.com] to me.
Edited by edward - April 18, 2017 00:51:57
User Avatar
Member
46 posts
Joined: Feb. 2017
Offline
Everything is made of a set of ~500 objects in a rigid-body world. Hundreds-of-thousands might sound like a lot, but it really isn't if you consider a house is made of ~8000 objects. Of course I can merge things that are not animated, but there are a lot of things that can't be merged. For example, a humanoid is made of ~50 objects that are animated separately. 100 characters on screen is ~5000 objects. Then consider trees that can sway where each branch might be a separate object and so on. It all adds up very quickly.

tamte
and while having hundreds of thousands efficient geometries at sop level is easily doable and all the posts here are about that, it clearly lacks interactive tools to be able to easily manipulate them in the viewport other than just transforming, like copying around and building layout, or drag&drop from library, which I feel like is behind the word “manually”

@tamte is on the right track. Without a user-friendly way of placing a lot of instances, doing something like this is impractical.
User Avatar
Member
178 posts
Joined: Jan. 2015
Offline
Hi,
Have you looked at packed geometry workflow?


Olaf
User Avatar
Member
6532 posts
Joined: July 2005
Offline
KalciferKandari
100 characters on screen is ~5000 objects. Then consider trees that can sway where each branch might be a separate object and so on. It all adds up very quickly.

Then we're hardly manually doing 5000 placements, but more like 100 placements. This is where HDAs come into play.

KalciferKandari
@tamte is on the right track. Without a user-friendly way of placing a lot of instances, doing something like this is impractical.

I'm still trying to understand how using HDAs with embedded Instance objects (or embedded objects that contain packed primitives) are “unfriendly” or “impractical”. This is especially if we're dealing with an RBD world.
  • Quick Links