Comments (9)
from crest.
Thanks Midda! Thats pretty severe! I have not seen that behaviour before. I tried a few things here to find repro steps but did not get too far.
On clamping, i yesterday found a couple of unclamped bugs which caused bright fireflies and triggered bloom. You said you have latest but thought I'd mention it a I pushed it 12hrs ago. 26a2d7b . This issue looks more severe though.
I assume this is happening in editor - let me know if not though.
Thanks for trying the debug flags. Could you try disable transparency? I've added another debug flag "Debug Disable Multiply by LightColor0" - with this flag, everything involved in computing the ocean colour is disabled.
I've also added another debug flag "Debug Disable Shape Textures" - this will stop it from touching the shape textures, which i suspect are messed up for some reason.
Along that line of thought, it could be useful to enable the debug GUI and see the shape textures. Its not in the core crest files by default (but maybe it should be..) but its in the example content here: https://github.com/huwb/crest-oceanrender/blob/master/src/unity/Assets/Crest-Examples/Scripts/OceanDebugGUI.cs
All of the above would be interesting to see, but there is a more powerful debugging tool which will give me a complete view of the render and should direct me straight to the problem - a renderdoc capture. this would capture some data used in the frame (geometry, textures), so you may not want to post it online. if you are up for going down that route, the steps are:
- install renderdoc (freely available)
- enable shader debug info: "Compile Shader With Debug Info (D3D11)" on material. this will add overhead, be sure to turn this off afterwards.
- in the Game view dropdown menu, select Load Renderdoc
- press play and repro the issue, then click the little Renderdoc icon at the top of the Game view (see tooltip)
- renderdoc should open. right click the capture thumbnail that should appear and select save, and email it to me.
thanks!
from crest.
Emailed that through. Let me know if I can do anything else to help track this down!
from crest.
Thanks for that! Yes that helped a lot, although I'm a bit confused by what I saw:
Unity has passed in a light position instead of a direction into the shader. Are you guys using a light type that is not a directional light? This should be fine normally of course, but my code made the (bad) assumption that it was always a directional light. The issue was i was assuming this would be unit length, and doing some exponentiation on it, which made it blow up to infinity when its a large world position vector. I now detect if unity has given the shader a position instead of a direction and normalize appropriately. Could you please try latest?
I'm a bit surprised by this. I am half-expecting that there is actually a deeper or secondary issue at play here. However the stuff i described above is a legit issue and that is generating the INF values that I'm seeing, so I'm definitely interested to hear what happens with that fix!
from crest.
Our world is lit by a directional light, but we do have other lights in the world (e.g. campfires have point lights on them).
So I just tested this by disabling the objects in my scene that have point lights on them, and yep, the issue disappeared.
I grabbed latest, and it mostly addresses the issue, but I can now see that when the point light sources are in view, the ocean tiles seem to be tinted by the point light colour, even though they are quite far away. It usually affects all the ocean tiles in view, but at some viewpoints, you can see a sharp line where a few tiles remain unaffected by the point lights (like what is seen in the example 3 pic).
from crest.
Yeah, just changing to ForwardBase with no other changes fixed the issue, including the odd tinting of the tiles to the point light colour. It does also mean that point lights have no influence on the ocean surface whatsoever. While that would be nice, I guess that's irrelevant to this bug, and is more something for the Dynamic Lighting issue (is other light types are even in the scope at all).
from crest.
Nice find!! This actually fixes #15 as well in one fell swoop. It looks great to me here so I pushed it.
I kept the previous change i did, which at least would support one big point light in the world. Regarding supporting multiple lights, I would consider it in-scope but I'm not geared up to comment on what it would take/if its possible etc. Do you have requirement for this, such as local lights at night time or such?
Thanks a bunch!
from crest.
from crest.
Ah gotcha. Interesting!
The ocean rendering as tiles is a huge win here as well - as many of the tiles will probably only end up rendering once if there are just a few local point lights.
from crest.
Related Issues (20)
- Updating ShapeFFT parameters runtime, generates a lot of garbage HOT 5
- HDRP underwater volumetric lights not working properly HOT 2
- Local / movable spectrums or crest shapes HOT 3
- Foam / wake vibration when approaching whirlpools HOT 20
- Pressing the Windows Key in the editor disables underwater rendering HOT 3
- Wake / foam artifacts when moving the camera quickly HOT 11
- Delayed LOD / tile enabling when using large clipping areas HOT 5
- Depth Cache not populated - Exported Image is Black HOT 8
- Water interaction is not visible when moving camera away from the sea level HOT 1
- Underwater broken with XR multi-pass rendering HOT 1
- No caustics, no shadow data and/or constant shadowing on iOS
- Error of Does not exist some Classes. HOT 1
- Sporadic gaps / precision errors in tiles. HOT 30
- SphereWaterInteraction and RegisterDynamicWavesInput do not work correctly inside a flow area HOT 11
- Activating flow in the material when oceanrenderer is running does only work in editor HOT 2
- FindObjectsSortMode HOT 3
- Enable Shader API does not function without changing underwater appearance HOT 20
- Enable Shader API causes artifacts HOT 4
- Planar Reflections issue with non-standard shaders using transparency HOT 13
- Premature tile culling during extreme camera maneuvers above the ocean HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crest.