Jump to content

DOP Pyro Age Field?


Akabane

Recommended Posts

Hi guys!

I was wondering how could I implement an "age" field to shade and tweak my fluid.

I would start doing it by advecting a bunch of particles and transfer their age attribute to field via the particle to field dop node, but I don't know if that would be the preferred way or if there's a gas microsolver I'm not aware of that might help calculating all of that inside the gas calculation (even if I might end up chewing more data than needed).

Has anyone here already done that? Any pointers?

Thanks!

Link to comment
Share on other sites

Create scalar field like age. match it with density (gas match field). Then advect it (gas advect field). Then in the post solve create gas field vop. It works similar to the vop sop. Just import your age field with parameter add iteger number and export it (again parameter). Back in sops, you can import this field and do anything you gonna do.

Cheers :)

Link to comment
Share on other sites

Create scalar field like age. match it with density (gas match field). Then advect it (gas advect field). Then in the post solve create gas field vop. It works similar to the vop sop. Just import your age field with parameter add iteger number and export it (again parameter). Back in sops, you can import this field and do anything you gonna do.

Yep, kinda like this but devil's always in the details and you have to account for oversampling (timestep) of the sim, especially with age accumulation.

You only need the Gas Field VOP to use increment age by the timestep using density as a mask btw. Everything else can be done with Gas Calculate (tends to be faster than Gas Field VOP for simple stuff).

- initialize age field at sim start channel matching fields from Smoke Object DOP

- increment age by timestep using density as a mask (unless you want to add time to all voxels, up to you).

- Keep source field around (need to remove "source" from clear fields in Source Volume DOP)

- create temporary agetemp field and add source field reset to be constant timestep (you can't count on source always being set to 1)

- Add agetemp to age

- advect age

I haven't really thought about the best order of things:

- when to add agetemp to age. Before or after advection. Open to suggestions/advice.

See the attached hip file for an attempt at this.

age_field.hip

This temp field is pretty hard to read in the viewport when it is visualized as it is kind of like density but counters velocity (to be expected as faster areas should be darker when visualization set to greyscale for age). it looks to be kinda correct.

I hope...

  • Like 7
  • Thanks 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...