Akabane Posted May 29, 2013 Share Posted May 29, 2013 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! Quote Link to comment Share on other sites More sharing options...
tricecold Posted May 30, 2013 Share Posted May 30, 2013 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 Quote Link to comment Share on other sites More sharing options...
dark_cry Posted May 31, 2013 Share Posted May 31, 2013 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 Quote Link to comment Share on other sites More sharing options...
old school Posted June 3, 2013 Share Posted June 3, 2013 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... 7 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.