Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing material on FluidVisocity samle?
#1
Hello there

Thanks for this awesome tool!  Interesante
I'm having SO much fun with Obi Fluid and have made some "jam" running down a cake for a project, using the FluidViscocity sample
scene as foundation. Works like a charm.  Gran sonrisa
However, I was trying to change the same the material to a "chocolate" (basically just a brown non-transparent material), but I can't seem to 
change the whole shader, so when i change the color, it keeps the same shader, but just the color change.
How can I get add a standard shader instead?
As default the emitter has a lifespan as 10 seconds - and then loops again - where is the loop time being set and where can I change it?



Any direction would be much appreciated.

Cheers, 
Dan
Reply
#2
(08-05-2019, 09:05 AM)blogsabout Wrote: Hello there

Thanks for this awesome tool!  Interesante
I'm having SO much fun with Obi Fluid and have made some "jam" running down a cake for a project, using the FluidViscocity sample
scene as foundation. Works like a charm.  Gran sonrisa
However, I was trying to change the same the material to a "chocolate" (basically just a brown non-transparent material), but I can't seem to 
change the whole shader, so when i change the color, it keeps the same shader, but just the color change.
How can I get add a standard shader instead?
As default the emitter has a lifespan as 10 seconds - and then loops again - where is the loop time being set and where can I change it?



Any direction would be much appreciated.

Cheers, 
Dan

Hi Dan,

The fluid renderer uses a technique known as screen-space ellipsoid splatting. It won't work with regular surface shaders (like Unity's standard shader), only shaders that implement this technique will work. You can write your own custom shaders, but the two shaders included (FluidDielectric and FluidOpaque) account for 99% of all real-life fluid materials.

For chocolate, change the renderer's "FluidMaterial" to OpaqueFluid (a sample material that uses the FluidOpaque shader), and its "ColorMaterial" to FluidColorOpaque.

For more info, see:
http://obi.virtualmethodstudio.com/tutor...ering.html
http://obi.virtualmethodstudio.com/tutor...ering.html

Regarding the emitter lifespan, it works just like Unity's particle emitter: there's no "loop" time, as soon as there are pooled particles available, the emitter will start emitting again. You can control both emission and amount of particles emitted using the "speed" variable. See:
http://obi.virtualmethodstudio.com/tutor...tters.html
Reply
#3
Thank you so much for the very helpful reply JoseMentez. I now have chocolate  Gran sonrisa
Playing around with this asset, is like being a kid playing with toys!
Can't wait to see how this asset develop over time!
Best, Dan
Reply