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

  • 12 years later...
On 2013/6/3 at PM9点21分, old school said:

是的,有点像这样,但细节总是关键,你必须考虑模拟器的时间步长(过采样),尤其是年龄积累时。

顺便说一句,你只需要用气田VOP来按时间步增量年龄,把密度当作掩码。其他所有作都可以用Gas Cute完成(对于简单作通常比Gas Field VOP快)。

- 初始化模拟启动时的年龄场,从烟雾对象DOP中匹配信道

- 通过使用密度作为掩码按时间步递增年龄(除非你想给所有体素添加时间,随你决定)。

- 保留源字段(需要在源体 DOP 中移除“源”字段)

- 创建临时年龄场,并将源字段重置设置为恒定时间步(你不能指望源总是设为1)

- 将年龄温度加到陈年中

- 平流年龄

我其实没怎么考虑过最合适的顺序:

- 何时将年龄温度加到陈年中。在对流之前或之后。欢迎大家提出建议或建议。

请参见附带的髋部文件,尝试过类似的作。

age_field.hip 1.45 MB · 779次下载

这个温度场在视窗中很难被看清,因为它有点像密度,但会抵消速度(这是可以理解的,因为在视觉化设置为灰度时,速度较快的区域应该会更暗)。看起来差不多是对的。

我希望......

sparse solver not working? Help help

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...