Jump to content

Method to generate Implicit UV on Pyro Objects ?


sebkaine

Recommended Posts

Hi Guys,

I haven't done any fluid sims in H for a while, and was wondering if i haven't miss any new fancy method to generate, implicit UV on a Pyro Object.

The goal is to get a correct P position to displace the volume at rendertime in order to mimic exactly what Igor Kharitonov has done with FLIP object in these 2 scenario :

https://www.gerbertgosch.com/rndtextureflowpt1
https://www.gerbertgosch.com/rndtextureflowpt2

Basically replicate this exact workflow but with Pyro Solver would be cool.

Of course the goal is to stay away from dual rest pose.

At the time i have try to replicate this with a POP sims advected in the Pyro that transmit P to a P rest field , but i never get a 100% good enough solution.

I would be curious to know your pov  and suggestion on wich direction , methods , technics , article that might help to find a proper answer to this problem.

Thanks for your Lights !

Cheers 

E

 

 

 

 

Link to comment
Share on other sites

Hi thanks for your answer Andrii, It looks very interesting. I don't see exactly how you interpret the grad value for displacement ?

you normalize the grad , then input it in @P for noise computation ? but how do you combine it in the shader ? 

Thanks again for your time !

Cheers 

E

 

grad.hiplc

Link to comment
Share on other sites

Ok i have made a stupid mistake , i load restP as a float not a vector, it looks to works on static field.

Now i will have to try your tricks on a moving grid.

gradL02.hiplc

 

EDIT : well i have try on a moving grid , it's not bad, it does follow the fluid without sliding effects, but i get some artefact when i try to push things too much, i need to investigate more with this. But sound like a good tricks.

 

 

gradL03.hiplc

Edited by sebkaine
  • Like 1
Link to comment
Share on other sites

Well i have try to apply your method directly in shop by displacing directly the grid in mantra, i wasn't expecting much, but i must said i find that it work better than expected.

The noise doesn't slide, i just have some unatural pattern that appears, but it's definitly interesting. 

I still can't figure why the grad can be used as restP , it's kinda counter intuitive imo, you might expect to use grad as a vector to push along the normal, not as a restP ...

Here is a comparison with no mantra displace vs mantra displace.

 

 

 

gradL05.hiplc

gradL05.mp4

Edited by sebkaine
Link to comment
Share on other sites

Hi Bunker ! Thanks for your answer. 

You mean that it would be better to generate the restP i input in the noise function, not only base on the gradient but by combining the output of the dual rest solver and the gradient ?

What type of operation do you have in mind to combine the two ? Add / Mix / Mult .... ? 

Are you sure that it will kill that nasty sliding effect that inherently come with dual rest ?

 

I haven't done fluid for a long time, my skill on the subject are quite rusty. But i always find that dual rest was a bad idea to create a restP, because it force you to store 2 more fields and thus add some heaviness / slowness in the process.

I also think that it work with interpolation and my guts tell me that it is either a bad idea / nor the most elegant idea to create implicit UV on a pyro.

 

Andrii advise to use gradient for this, and it's not the first to tell me about this. While it look to work , i think it's more a way to have something that follow your simulation without sliding effects. But the gradient in itself is imo not a way to generate implicit UV.

It's a trick that do work to apply noise without sliding.

 

I feel that the most elegant way , was the mainroadpost way 

https://www.sidefx.com/community/main-road-post-stalingrad/

Quote

They found that each volume texturing technique available had its pros and cons, for example, the default dual rest technique in the Pyro FX solver was easy to texture, but it did not quite provide the desired look required to effectively integrate the CG and practical effects because of stretching and blending artifacts. Ultimately they determined that their best course of action was to run most of their Pyro FX simulations using advected particles inside volumes and then carry over the local coordinates. Taking this route allowed them to find the sweet spot they were looking for.

Because i have always love to mix pop and fluids,  pops are light / fast / very easy to controll / fast to transfer info / light to store.

It's also what i use a lot to inject stuff in the grid like density / temp / div etc ...

It's also useful for tricks like vorticles.

Switching from a fluid grid to particles is exactly what FLIP do. In my mind the best way would be to use the invert process for pyro , you work with a grid but you process each time a point cloud were you can operate things like uv computation and transfer that to the grid.

 

But it's all theory and in practice i never succeed with the POP way ...

( sorry for long / wordy post )

Cheers 

E

 

Edited by sebkaine
Link to comment
Share on other sites

dual rest won't give you sliding artifacts but would might get some pulsing effect when blending between rest and rest2.
I really depends on the speed of your smoke/pyro sim. Using particle is a cool idea but sampling them properly not easy.
How do you sample rest/normal attributes when a lot of particles overlap, and what areas with very few particles?

Link to comment
Share on other sites

Yes sorry for my bad english it's more a pulsing effect, but at the end it's not so good. it works for fast whispy smoke, but you could get the exact same idea with displace and gradient.

So that's why i would classify rest/rest2 tricks to the bad tricks , that can sometime save you. but it remain an awkward method imo.

 

For Pop , you just nail it . while it sound easy at first to advect some points on pyro to store some att. The hard part start when you whant 

- a coherent point cloud with always a correct distance beetween each point to get a proper sampling

- how to reseed and manage the point when density disapear or when some area with high divergence in the previous frame , have very few point to store the data on the current frame

Coherent space beetween each point + reseeding -> that start to sound like a FLIP things ?

 

This concept of blending MAC grid / particles velocities to compute high detail with point is not new , on this  9 years old article , they already talk about that :
  

Quote

We use a dual eulerian/lagrangian representation of the smoke field: sparsely placed particles are used to advect the smoke field, and a high resolution voxel grid is used to couple the smoke field to the fluid simulation. The primary representation is the particles, which is the state that is kept from frame to frame and the conversion of particles to the high resolution voxel representation is done by splatting. Diffusion and other effects are computed on the high resolution voxel grid and changes to the voxel grid representation are applied back to the particles using the FLIP technique (using only the derivate of smoke density).

 

Wrenninge-CapturingThinFeaturesInSmokeSimulations.pdf

Edited by sebkaine
Link to comment
Share on other sites

yes, that seems a bit like doing some of the FLIP solver - could be a cool science project if you have the time:lol:
Things have a changed a bit in 9 years, computers are much fasterand have a lot more RAM too...
just curious, what are you trying to do?
 

Edited by bunker
Link to comment
Share on other sites

well i would like to find a way to create a proper rest pose to be able to post-process the grids in dops then post-process the grids in shops directly.

basically the goal is always the same get the extra detail without having to pay the full price of it at sim time.

i agree with you that now computer are really faster and a brute force approach might now be the best things in 2019 ?

But actually to do upres things in H you basically have by default :

- rest / rest 2 + restsolver -> which is not a convincing method imo for reason describe previously

- upres -> which can be an efficient / convincing way but is also very tedious , setup the proper noise, second solve , lot of disk cache needeed to save the grid.

 

I think it would be possible to replace those 2 methods, (uprez + displace), with a proper rest pose.

Actually many great pyro guys who i ask the question, use the gradient stuff describe by andrii, i was just curious to know if some have other approach. 

The point base technics describe by Mainroad always put my interest cursor to the max, maybe because i still find that their pyro are the best i have ever seen in H.  

 

Edited by sebkaine
Link to comment
Share on other sites

You can apply gradient noise inside solver and you get much more realistic result with higher division size. Post process manipulations working only for certain range, but if you apply it inside solver you will get nice results.

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