Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
30-03-2022, 09:24 AM
(This post was last modified: 30-03-2022, 09:25 AM by josemendez.)
(30-03-2022, 09:20 AM)canaydiin Wrote: You might be right, my urp project is using linear whereas my non urp project is using gamma
Then that's definitely the reason.
Linear/gamma spaces are also basic graphics stuff, and the workflow for each one differs a bit. Some more info:
https://www.kinematicsoup.com/news/2016/...hey-differ
Posts: 12
Threads: 1
Joined: Mar 2022
Reputation:
0
(30-03-2022, 09:24 AM)josemendez Wrote: Then that's definitely the reason.
Linear/gamma spaces are also basic graphics stuff, and the workflow for each one differs a bit. Some more info:
https://www.kinematicsoup.com/news/2016/...hey-differ
I guess Ill have to play a bit more in urp if not Ill stay with the stand rp, thanks for your help Jose
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(30-03-2022, 09:39 AM)canaydiin Wrote: I guess Ill have to play a bit more in urp if not Ill stay with the stand rp, thanks for your help Jose
You're welcome! let me know if I can be of further help.
Posts: 12
Threads: 1
Joined: Mar 2022
Reputation:
0
(30-03-2022, 09:44 AM)josemendez Wrote: You're welcome! let me know if I can be of further help.
Hey Jose,
I've been able to progress pretty well, however I got a question, and maybe I didnt know the correct wording to see it in the manual, but when I pour 2 liquids inside a glass, they bounce really high up, what variable would I need to change to stop the bounciness of the fluids?
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(04-04-2022, 09:19 AM)canaydiin Wrote: Hey Jose,
I've been able to progress pretty well, however I got a question, and maybe I didnt know the correct wording to see it in the manual, but when I pour 2 liquids inside a glass, they bounce really high up, what variable would I need to change to stop the bounciness of the fluids?
Bounciness is not explicitly modeled in Obi (so there's no bounciness parameter anywhere). However, compressible fluids can bounce due to lack of convergence.
You can increase simulation quality by using more substeps and/or iterations. This will increase simulation quality, making fluid less compressible and hence, less "bouncy". See: http://obi.virtualmethodstudio.com/manua...gence.html
Quote from the very end of that page:
Quote:Takeaway message from this section: If your rope/cloth/softbody/fluid is too stretchy or bouncy, you should try:
Increasing the amount of substeps in the updater.
Increasing the amount of constraint iterations.
Decreasing Unity's fixed timestep.
Posts: 12
Threads: 1
Joined: Aug 2022
Reputation:
0
(29-03-2022, 02:59 PM)josemendez Wrote: Would it be possible for you to share your project with me? Send it to support(at)virtualmethodstudio.com . This way I can take a closer look and hopefully be able to help you.
Diffusion is quite simple: each particle carries a Vector4 (the user data) and these get averaged together when particles go within the vicinity of each other. That’s all there is to it, that’s why I’m surprised it isn’t working correctly for you.
The screenshot in my previous post is from the “FluidMixing” sample scene. Changes to the original scene:
-switch the solver to 3D
-add a FluidRenderer to the camera, increase radius scale on the particle renderers and uncheck “render”.
-remove the components in the emitters that map diffusion data to a gradient and replace them with a simple color=userData script.
-set the user data to (1,0,0,1) and (1,1,0,1) in each fluid.
That should work, let me know how it goes. Anyway, if I can take a look at your project it would be great! I am also trying to mix 2 colors , and i followed the steps mentioned but I am not getting any result at all I am mixing red and yellow but I get red in return
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(23-08-2022, 10:21 AM)khanx078 Wrote: I am also trying to mix 2 colors , and i followed the steps mentioned but I am not getting any result at all I am mixing red and yellow but I get red in return
Have you tried the included "FluidMixing" sample scene? Does that work for you?
If it does, all you need to do is replace the gradient in the ObiFluidPropertyColorizer components with the colors you want to mix. This will work fine for the case of mixing 2 fluids. If you want to mix more than 2 fluids, it's a bit more advanced since you can't use the mixing data to lerp between colors.
let me know if you need further help.
kind regards,
Posts: 12
Threads: 1
Joined: Aug 2022
Reputation:
0
(23-08-2022, 04:56 PM)josemendez Wrote: Have you tried the included "FluidMixing" sample scene? Does that work for you?
If it does, all you need to do is replace the gradient in the ObiFluidPropertyColorizer components with the colors you want to mix. This will work fine for the case of mixing 2 fluids. If you want to mix more than 2 fluids, it's a bit more advanced since you can't use the mixing data to lerp between colors.
let me know if you need further help.
kind regards, so for that scene , when i remove the gradients from the color, like only give one color to emitter A and another color to emitter B they do not mix , I would need to mix 3 colors to get a new color thats my target I can share the project if thats ok?
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
24-08-2022, 07:32 AM
(This post was last modified: 24-08-2022, 07:36 AM by josemendez.)
(24-08-2022, 04:53 AM)khanx078 Wrote: so for that scene , when i remove the gradients from the color, like only give one color to emitter A and another color to emitter B they do not mix ,
That's not how mixing works. The gradients represent the color transition for each fluid when they come in contact with each other: the color at the left of the gradient is one fluid in unmixed state, the color at the other end is the color of the other fluid in unmixed state, and the color in the middle of the gradient is the color of a 50/50 mix.
If you remove the gradients and use flat colors, no mixing will take place at all because you're asking for colors to be the same regardless of mixing percentages.
Note that you don't have to rely on gradients to do mixing, it's just how the sample scene does it. At its core, mixing works by assigning 4 user-defined values to all particles in each fluid blueprint, then averaging these values together when particles get close to each other. This process is called diffusion, and can be used for many things other than color mixing (heat transfer, chemical reactions, etc), see the manual for details: http://obi.virtualmethodstudio.com/manua...usion.html)
You can use these 4 values any way you want: you can store RGB values in them and use the result as a color directly, or you can use them to drive other properties. For instance, the sample scene uses just 1 out of the 4 values, and uses it to sample a color gradient.
If you want to mix 3 colors and use a custom look up table to determine how the different mixes should look like (as opposed to just averaging the 3 colors), you can still use a single user defined value together with barycentric interpolation of colors in a triangle.
kind regards,
Posts: 12
Threads: 1
Joined: Aug 2022
Reputation:
0
(24-08-2022, 07:32 AM)josemendez Wrote: That's not how mixing works. The gradients represent the color transition for each fluid when they come in contact with each other: the color at the left of the gradient is one fluid in unmixed state, the color at the other end is the color of the other fluid in unmixed state, and the color in the middle of the gradient is the color of a 50/50 mix.
If you remove the gradients and use flat colors, no mixing will take place at all because you're asking for colors to be the same regardless of mixing percentages.
Note that you don't have to rely on gradients to do mixing, it's just how the sample scene does it. At its core, mixing works by assigning 4 user-defined values to all particles in each fluid blueprint, then averaging these values together when particles get close to each other. This process is called diffusion, and can be used for many things other than color mixing (heat transfer, chemical reactions, etc), see the manual for details: http://obi.virtualmethodstudio.com/manua...usion.html)
You can use these 4 values any way you want: you can store RGB values in them and use the result as a color directly, or you can use them to drive other properties. For instance, the sample scene uses just 1 out of the 4 values, and uses it to sample a color gradient.
If you want to mix 3 colors and use a custom look up table to determine how the different mixes should look like (as opposed to just averaging the 3 colors), you can still use a single user defined value together with barycentric interpolation of colors in a triangle.
kind regards, got it, one more thing is that the performance is taking a very big hit, I am using the burst renderer as pointed out in the tutorial on youtube and turned vsync of , used late update.... but my frame rate on pc in a very simple scene is around 18 FPS on a gtx 1080... What can i do to improve performance in your youtube video it jumped but in my case it jumped from 6 fps to 18 fps
|