Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Trying to render bubbly foam
#4
(17-07-2024, 09:40 PM)Barliesque Wrote: Ah, okay. I'd missed the Generate button.  However, after increasing the Capacity and clicking Generate, I get the following error, and the Emitter appears unaffected:

NullReferenceException: Object reference not set to an instance of an object
Obi.ObiActorBlueprintEditor.Refresh () (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:416)
Obi.ObiActorBlueprintEditor.Generate () (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:143)
Obi.ObiEmitterBlueprintEditor.OnInspectorGUI () (at Assets/Obi/Editor/Fluid/Blueprints/ObiEmitterBlueprintEditor.cs:32)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass72_0.<CreateInspectorElementUsingIMGUI>b__0 () (at <5d5ebefe97114215928ac1d9cd096522>:0)
UnityEngine.GUIUtilityLenguarocessEvent(Int32, IntPtr, Boolean&)

This is a long standing bug in Unity, when having multiple inspector tabs open the public members of custom editors don't get their initializers called. Resetting the editor's layout (Windows->Layouts->Reset All Layouts)should help.
 

(17-07-2024, 09:40 PM)Barliesque Wrote: In order to soften those (as seen in the video in my original post) I rendered the particles with a separate camera, to a RenderTexture, and then layered that over the scene with an blur effect in a shader I made.  Unfortunately, using that technique means the foam is rendered without regard for other objects in the scene, as you can see above.  So, is there any way to blur/soften/reduce those hard edges?

This is what the fluid renderer does, essentially. However it blurs the particles' depth, then it shades it after the blur: this allows the fluid to correctly intersect with other objects in the scene. You seem to be blurring the final shaded particles, which will cause problems with intersections.

Maybe you could set the fluid renderer transparency setting down, so that it's opaque? See the "Raclette" sample scene settings for reference.

kind regards,
Reply


Messages In This Thread
Trying to render bubbly foam - by Barliesque - 17-07-2024, 12:11 AM
RE: Trying to render bubbly foam - by josemendez - 17-07-2024, 07:40 AM
RE: Trying to render bubbly foam - by Barliesque - 17-07-2024, 09:40 PM
RE: Trying to render bubbly foam - by josemendez - 18-07-2024, 09:10 AM