Jump to content

Swap packed fragments via intrinsics


nuki

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...