Jump to content
nuki

Swap packed fragments via intrinsics

Recommended Posts

Posted (edited)

I want to get Houdini to fetch 'piece0' from geoB' instead of 'geoA' by modifying the primintrinsics of the packed fragments. Since its possible to alter the 'fragmentname' attrib I assume this would be possible, but I cant find out how houdini keeps track of the 'root' of the packed fragments. Seems like the 'path' attribute doesnt have any effect and geometryid is read-only.

I was hoping to find an efficient way to swap low-res sim fragments with their respective high-res versions. Any suggestions?

Edited by nuki

Share this post


Link to post
Share on other sites
6 hours ago, nuki said:

I was hoping to find an efficient way to swap low-res sim fragments with their respective high-res versions. Any suggestions?

Why? Is a transform pieces SOP not enough?

Share this post


Link to post
Share on other sites
Posted (edited)
9 hours ago, vicvvsh said:

Why? Is a transform pieces SOP not enough?

It would work, but its not the ideal solution for what I'm after.

To tell a bit more about the setup:

I generate N uniquely fractured walls first. At that stage they just sit at the origin and I generate hi-rez pieces for each wall there.
Afterwards I place the walls, randomly selecting one of the prefractured walls to avoid repetition. Then that goes into the sim.

The problem with transformpieces is that my source geo (the hi rez pieces) only contains a single copy of each fragment of each wall. I could use an instance or copytopoints sop to re-place and re-duplicate the hi-rez fragments to their respective lo-rez fragments.

However, I was hoping to ultimately swap out the fragments only at rendertime (Mantra) using a geometry shader. I dont see how it would be possible to do the copy/swapping inside a procedural geometry shader and I figured doing it via Intrinsics would be the simplest and cleanest way if at all possible.

Edited by nuki

Share this post


Link to post
Share on other sites

You could potentially edit the primitive intrinsic "unexpandedfilename" if all of your high resolution pieces are saved to disk individually.
This can done in vex, but some info can be found here:
https://www.sidefx.com/docs/houdini/nodes/sop/packeddiskedit.html
 

This does not have to be done on packed disks only, but also works fine on packed gometry.

  • Like 1

Share this post


Link to post
Share on other sites

Neat, exactly what I was looking for! I suppose there is no similar workflow to use with Packed Memory Primitives?

Share this post


Link to post
Share on other sites

You could try using the "op:" syntax to point to an operator in the scene. Never tried it though...

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

×