Scatter Sop: output sourceprimuv attrib from Volume?

   1187   4   1
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
Do you have any idea how to interpret the sourceprimuv attribute that the Scatter Sop is able to produce when creating points from a fog volume?

My understanding is that volumes don't have UVs. So I don't really get what those numbers are and how can they be used..

Attachments:
scatter_sourceprimuv.JPG (249.8 KB)

User Avatar
Member
8599 posts
Joined: July 2007
Offline
sourceprimuv is not UVs, but parametric coordinates of the primitive, so curves, polys, tets, hexes, volume prims, ... all return different coordinates that make sense for particular prim type regardless of whether the prim has uv attribue or not

it seems like for Houdini Volume prims they are sort of like normalized coordinates within the volume prim bounding box
you should still be able to use them with primuv() or Attribute Interpolate SOP to get the correct P based in sourceprim and sourceprimuv

in my tests for houdini volume prims this:
v@P = primuv(1, "P", i@sourceprim, v@sourceprimuv);
is the same as this:
matrix xform = getpackedtransform(1, i@sourceprim);
v@P = fit(v@sourceprimuv, 0, 1, -1, 1)*xform;

however for VDB's the numbers seem to be more resolution based, and primuv() don't seem to work with them, which is probably a bug, but this seems to:
matrix xform = primintrinsic(1, "transform", i@sourceprim);
v@P = v@sourceprimuv  * xform;
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
interesting, thanks for testing out!

Do you happen to have ever used this workflow or do you see any use at all?
I mean, scattering points from a Volume and then outputting the sourceprimuv attribute for additional additional work.

Since I'm developing a new Scatter hda, I was wondering if it's necessary to add the output of v@sourceprimuv attrib from Volumes too, or I'd be better spending my time on other features...
User Avatar
Member
4531 posts
Joined: Feb. 2012
Offline
Andr
interesting, thanks for testing out!

Do you happen to have ever used this workflow or do you see any use at all?
I mean, scattering points from a Volume and then outputting the sourceprimuv attribute for additional additional work.

Since I'm developing a new Scatter hda, I was wondering if it's necessary to add the output of v@sourceprimuv attrib from Volumes too, or I'd be better spending my time on other features...

I personally never used the volume prim uv attributes. For meshes it's vital though.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
thanks for the feedback
  • Quick Links