IRCSS / Compute-Shaders-Fluid-Dynamic-

Fluid Simulation Implementation in Compute Shaders using Unity3D
MIT License
537 stars 59 forks source link

Obstacles not working correctly? #2

Open WolvenBard opened 2 months ago

WolvenBard commented 2 months ago

Hi there!

First off, thank you so very much @IRCSS for all your work on this project. As a complete shader noob, I'm trying to learn a lot from your work (and have gone down a rabbit hole of all your other VFX stuff...incredible!).

Onto the problem: I pulled down the project and tried running the vast land scene. I wanted to play around a bit more with obstacles, so I created a new primitive cube object in the scene, attached the FluidObstacles tag and ran the scene. Unfortunately, it seems like the fog just passes right through and doesn't get blocked by the obstacle as I would have expected.

Investigation / Observations:

Heres a gif that shows the fog interacting (or rather not) with the hills and the cube object (i've adjusted it's scale): obstacles_not_working_cmprsd

WolvenBard commented 2 months ago

Ok so some updates.

It looks like sometimes the render texture being generated for the obstacle is turning out black. I can't tell what the repro for this is. Sometimes the render texture looks normal (like whats shown in your blog post), other times it looks like this:

image