Adding Emission to particles - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html) +--- Thread: Adding Emission to particles (/thread-2739.html) |
Adding Emission to particles - Azimuth - 05-02-2021 Hey there everyone. I wanted to add a glowing effect to my liquid, but finding code to add emission via meta pass to random shaders didnt seem to be working. I dont need any blur lighting effect outside, and I dont need any lighting of nearby surfaces. I'm hoping you can give me some help as inserting a few similar versions of an emission pass into the ParticleShader.shader has not seemed to work. Thank you RE: Adding Emission to particles - josemendez - 05-02-2021 (05-02-2021, 03:38 AM)Azimuth Wrote: Hey there everyone. I wanted to add a glowing effect to my liquid, but finding code to add emission via meta pass to random shaders didnt seem to be working. I dont need any blur lighting effect outside, and I dont need any lighting of nearby surfaces. Emission with no blur lighting (bloom) and no lightning on nearby surfaces just reduces to a constant additive term in the lighting equation. You can modify the fluid shader slightly, by adding this line at the end of FluidShader.shader right before the final return: Code: fo.color.rgb += half3(0.5f,0,0); // insert here your emission color. Of course you can get fancy by using a material property instead of a hard-coded variable. cheers! |