Question about accessing Pyro Output Fields in Volume VOP

   492   4   0
User Avatar
Member
4 posts
Joined: 1月 2025
Offline
Hello,

I am a new houdini user. I apologize if my question is naive.

I am having difficulty figuring out how to gain access to the voxel by voxel data from the output field of a sparse pyro solver in the SOP context. I want to use this data in a Volume Vop. I only can access the position of the density / temperature / vel field overall in the SOP, but not the actual voxel data. Some nodes like VolumeViszualiation or VolumeSlice seem to access the voxel data. I am wondering if anyone can help me understand the customary process for gaining access to the field data. Do I need to sample the data as points first? This seems counterintuitive, since all i want to do is take the divergence, curl, or absolute value of the velocity field data and use this in VolumeVisulization node. Thank you so much.
User Avatar
Member
9064 posts
Joined: 7月 2007
Offline
Volume Wrangle or VOP operates per voxel in parallel

so using f@divergence in wrangle or Bind VOP with divergence name will return the value of divergence per voxel

you can however only assign value to active voxels of an existing volume, so for example
f@speed = length( v@v );
will work only if speed volume exists and only for active voxels in the speed volume, so you need to activate it first using v volume as a reference
or you can likely use
f@density = length( v@v );
and then rename using Name SOP to speed and if you know that density exists wherever v does already, etc

if you need to have access to multiple or all voxels in a serial form (rather than processing them independently in parallel) there are also functions that can access voxel value by index for reading, or you can also use Python SOP if you need to read and write to voxels in this way, like if you are writing your own voxel importer/exporter, but that doesn't sound like something you would need in your case
Edited by tamte - 2025年1月27日 18:07:49
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
4 posts
Joined: 1月 2025
Offline
Thank you so much. This is helpful. I am trying to gain access to the pressure field. I want to simulate airflow and I am more interested in the pressure temperature velocity values over the whole field, rather than smoke or fire. I am not certain which is my best workflow, the legacy pyro solver in the DOP context, the sparse solver in SOPS, or the gas solver from scratch.
User Avatar
Member
9064 posts
Joined: 7月 2007
Offline
cdapolit
I want to simulate airflow and I am more interested in the pressure temperature velocity values over the whole field, rather than smoke or fire. I am not certain which is my best workflow, the legacy pyro solver in the DOP context, the sparse solver in SOPS, or the gas solver from scratch.
Pyro Solver SOP should be good for what you need, it has options for Dense, Sparse and OpenCL solvers so you can experiment

I assume you may want to choose Dense solve in which case you can also try OpenCL, since you are probably interested in the values within the "air" everywhere

But of course if you are observing airflow through same tubing or simply anything that doesn't ever fill most of the bbox, Sparse would be a way to go

as far as the volume outputs from Pyro Solver SOP, temperature and vel are output by default but if you add pressure to the output list it will export it as well since it's internally computed and uncheck the ones you don't need

then you can process them in any way you want after the sim
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
4 posts
Joined: 1月 2025
Offline
Thank you so much. This is very helpful. However, I think I have to trick the sparse solver to have fixed bounds with a tiny temperature always in the background. Is this the customary process?
  • Quick Links