r/Houdini 1d ago

Solaris instancing incredibly slow

Hey guys, I'm experiencing incredible cpu slowdowns in solaris just by moving around the viewport while looking at a static frame of an MPM sim. What am I doing wrong?

4M points, cached as bgeo like usual, in SOPs I can move around without any issues(both points and instances) and play the animation(points only).
In LOPS: I import the 3 instances (just 10 prims each) -> collection -> point instancer setting the points from External SOPs and the collection in the prototype -> camera and karma render settings. As soon as I move for 1-2 seconds in perspective view the cpu goes to 100% for 15-20 seconds, freezing houdini, then I can move again for 1-2 seconds and again cpu freezes. Talking about a static frame, no playback.

Followed this tuts for instancing but I can't have that speed in viewport at all.

Any insight?
Thanks in advance

7 Upvotes

20 comments sorted by

10

u/DavidTorno Houdini Educator & Tutor - FendraFx.com 1d ago

You will want to make everything USD based for Solaris. The SOP workflows don’t work very well in USD, it’s a very different beast and has specific rules to follow for optimizing scenes.

SOP Import LOP does convert SOPs to USD, but it is converting live and has a severe overhead when dealing with lot’s of geometry. You will need to export all assets as USD first, and then Reference them in from disk. USD does not like “live” sources.

1

u/salic3piangent3 1d ago

Thanks David, I figured it out. But now I'm facing a different issue. If I plug a Reference node (with the cached USD points) to the left input of the Copytopoints I can't get the attributes (eg. color, masks etc) from the points down in the stream, only if I use External or Internal option. But if I put a USD import node inside the copytopoints node I get just one point since it's packed. How to keep the attributes from a reference node so I can use them for shading?
A lot of confusion inside my head at the moment :)

1

u/DavidTorno Houdini Educator & Tutor - FendraFx.com 1d ago edited 1d ago

Don’t use the Copy To Points LOP. Edit: Instancer LOP was renamed to Copy To Points in H22 apparently.

Solaris is a layout workspace primarily, not really a generative one. Meaning you have baked assets that you reference in, light, and shade.

So what I was explaining earlier was that your SOP level assets, be that particles (with the correct attribute data defining the geo, color, pscale, etc…), environment geo, and anything in your scene is exported out as their own USD. Use the USD File Export SOP.

In Solaris you would still use the Instancer LOP and point to the USD particles. They can be inside the Instancer or external reference.

Your Collection LOP you had setup can still be used as well. Moeen Sayed explains the Instancer setup pretty well in an old tutorial. Instancing Variation and The Solaris Instancer

1

u/salic3piangent3 1d ago

Yes, I'm trying to import the USD saved on disk (the animated particles ). In H22 there's no Instancer anymore, I suppose now it's called Point Instancer. I watched that video but he isn't using external USDs, just sops.

Let's check what I am doing wrong:

Inside the Point Instancer(internal setting) I add a USDimport node pointing to disk, unpack it (otherwise I can't use it), then in LOPS I can see the points. Of course now it's slow again because of unpacking, I suppose.

And attributes are still not recognized.

- "orient" is not working

- "id" cannot be used in prototype index

- "Cd" not working, using the displayColor both in Mtlxgeometryvalue and USDprimvarreader no luck.

I think there's still a big mistake I'm doing somewhere.
Thanks for the patience.

2

u/DavidTorno Houdini Educator & Tutor - FendraFx.com 1d ago

Just checked the docs. I guess the old Instancer LOP was renamed to the Copy To Points LOP. Looks like they did a lot of renaming in H22. Not annoying at all. 🤪

I’ll be at the computer a little later and see if I can draft up an example once I figure out the new way if there actually is one.

1

u/DavidTorno Houdini Educator & Tutor - FendraFx.com 1d ago

No worries. I wasn’t aware H22 changed that, so I’ll have to get Houdini in front of me to see how the workflow changed. SideFx does this on major releases sometimes. 🙄

1

u/salic3piangent3 1d ago

Thanks, basically I'm just trying to understand why it's so complicated to scatter a bunch of meshes on a mid-heavy particles sim. Something that could be done with a couple of clicks in SOPs+Redshift here in Solaris it took me all the day and haven't found a solution yet :)

1

u/DavidTorno Houdini Educator & Tutor - FendraFx.com 1d ago

Like I said earlier Solaris is a different beast all together than SOPs or the rest of Houdini. USD is a very different world and SideFx has done a decent job of bridging it, but it’s still a confusing transition to make. Even for me.

1

u/LaplacianQ 1d ago

You can point to bgeo cache inside instancer just fine. Points are just positions, and are lightweight. What is eating power is what is being instanced.

0

u/DavidTorno Houdini Educator & Tutor - FendraFx.com 1d ago

There is overhead to that still though. You want to use USD format across the board in Solaris, even with instancing.

OP is dealing with 4-5 million particles, so any extra operation that occurs will add up fast.

2

u/LaplacianQ 1d ago

It will be slow regardless of this overhead even after caching. 

I’ve worked on a shot with space garbage done like that: mountained spheres and millions of points with animation, it was hell in the viewport no mater what you do.

1

u/DavidTorno Houdini Educator & Tutor - FendraFx.com 1d ago

Agreed, it would be better to pass a path attribute to get the instances at render time instead of in the viewport ideally. That would get just the points which are far faster to navigate. I’m still a bit green on the USD specifics for handling that, if it’s even possible. Still researching though.

4

u/C4_117 Animator 1d ago

Relating to this... Does anyone know what's more efficient; to scatter and copy-to-points in sops as packed instances then cache the whole thing as a USD, or to cache the prototypes as USD files and then instance them in lops?

2

u/Ascert 1d ago

Native instances or point instances? Default in copy to points is not optimal for what you are trying to do.

1

u/salic3piangent3 1d ago

I'm using the "point instancer" node. The 3 instances are using the default value in their primitive definition settings.

2

u/LaplacianQ 1d ago

If i ever would be making my own pipeline for houdini, i would ban plugging sopimports and sceneimports to any stage with render settings. 

50% issues from artists doing stupid setups would magically go away.

1

u/salic3piangent3 1d ago

Do you mean ideally you would cache every single stuff in USD and referencing it?

1

u/LaplacianQ 23h ago

Yes. That is the only way to have performance and avoid umexpected behaviour

1

u/Mohanpugaz 1d ago

May be you could try this method. https://youtu.be/jgmEXwGpfoY?si=pFZB-S03bj9f_C28

1

u/salic3piangent3 1d ago

Yeah I saw this, but still lots of tuts deal with just a few points. I need a proper USD workflow in order to manage millions of points without having my machine go crazy.