Jump to content
Akabane

DOP Pyro Age Field?

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!

Share this post


Link to post
Share on other sites

I am not sure, but your way was the first that came to my mind also. Seems very reasonable, unless someone else knows a proper way of doing this

Share this post


Link to post
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 :)

Share this post


Link to post
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

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

×