Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
glowing effect
#1
Hi,

I need to make my fluid glow in yellow/red (as if it is hot), and I read several threads on this subject. This one was the more helping (  http://obi.virtualmethodstudio.com/forum...light=glow  ), but it didn't work and I have problems.

When I use the FluidDielectricShader, I can barely see the liquid. I tried to add a value to represent the emission of the fluid ( in the last equation ->

fo.color.rgb = lerp(transmittance,reflection,fresnel) + spec * atten + foam + 10;

), but since I cannot see the liquid... For a glowing effect, do I need to alter the emitter or the renderer? I tried both, but when I change the color and fluid materials in the renderer, nothing change or I can't see anything, the screen only shows black...

I don't know what I can do.

Thanks in advance !
Reply
#2
Hi there,

Glowing is out of the scope of Obi or the fluid renderer, and must be implemented separately.

A surface is emissive when it emits light. In absence of participating media, an emissive object does not "glow", it simply looks brighter. So one could consider glow as a poor-man's substitute for volumetric light scattering, and it is not the same as emission, but rather a consequence of it under certain conditions.

Glow is generally done by adding a blurred version of the emissive objects on top of the image. So in the case of glowing fluid, you'd have to render the fluid to an off-screen render target (like you would with any emissive object), blur it (downscale + separable gaussian is a good option) and then add the resulting buffer on top of the existing frame. As you see you can't achieve this by modifying the fluid renderer or its shaders, it is a completely separate thing that happens as a post-process.

Regarding not being able to see the fluid, make sure your particle renderer radius scale is high enough for particles to overlap. Also make sure you use the included fluid shaders, they're specifically built to render fluid, any random shader/material combination won't work. See:
http://obi.virtualmethodstudio.com/tutor...ering.html

Quote:Disable the ObiParticleRenderer's "render" checkbox if you want only the fluid surface drawn by the Fluid Renderer to be visible. If you don't, both the fluid surface and the individual particles will be rendered. Using a radius scale between 1.7 and 2 for the particle renderer will ensure good particle coverage, and a fluid surface with no gaps.

kind regards,
Reply