GithubHelp home page GithubHelp logo

wave-harmonic / crest Goto Github PK

View Code? Open in Web Editor NEW
3.3K 102.0 464.0 270.95 MB

A class-leading water system implemented in Unity

License: MIT License

C# 78.72% ShaderLab 12.10% HLSL 9.18%
unity ocean ocean-geometry sampling-methods water displacement-texture

crest's Introduction

Header


CREST OCEAN SYSTEM


An advanced water system implemented in Unity
DocumentationDiscordYouTubeTwitterSponsorship

This repository targets the built-in renderer. For other render pipelines, see the following:

Crest Ocean System BIRP Asset Crest Ocean System HDRP Asset Crest Ocean System URP Asset
Crest Ocean System Crest Ocean System HDRP Crest Ocean System URP


SHOWCASE


FAR: Changing Tides | Announcement Trailer Windbound - Brave the Storm Announce Trailer [Official] Wavetale | Accolades Trailer Critter Cove | Official Announcement Trailer Vertigo 2 - Launch Trailer Blade and Sorcery | Official Update 10 Trailer - The Dungeons Update Out of Reach: Treasure Royale - Trailer BUCKO • Announcement Trailer Of Ships & Scoundrels - Crest Demo De Leon Legends VR Game Kredolis | Announcement Trailer Morild Navigator


Handful of nice scenes:


Tug Symphony Unity Beach - Crest Ocean Shader Test [Looped 60FPS] Irval the Dragon in Crest Ocean and Lordenfel Ruins Crest Ocean Unity 3d Submarine Scene 2 Nautilus Mixed Reality Ship Ahoy! with Rift + ZED Mini ShoreWavesCrest


And many more…



DOCUMENTATION


Full documentation is available online. There is also a Wiki with community contributions.



REQUIREMENTS




INSTALLATION


Grab the latest stable release from the top of the tags page.

Extract the files and copy anything under crest/Assets/Crest into an existing project.

Note
crest/Assets/Crest/Crest-Examples contains example content that is useful for first time users but not required for the core Crest functionality. Furthermore, the crest/Assets/Crest/Development folder is not needed as it is only for Crest development.

Older Unity Versions

If you are using any of the following Unity versions, then use the provided Crest version:



DONATIONS


With your support we aim to increase our development bandwidth significantly. Please see our sponsor page for sponsor tiers:

🩷 Sponsor

Sponsors

🥇 @holdingjason 🚀 @ipthgil

crest's People

Contributors

ajweeks avatar baranpirincal avatar cowhunt avatar daleeidd avatar dependabot[bot] avatar eligould avatar emaber avatar furkandinc avatar hellokitty avatar huwb avatar kpietraszko avatar moosichu avatar rbn3d avatar sagron avatar shadowteolog avatar skaughtx0r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crest's Issues

Foam fade shore vs waves.

Probably want to give us two different settings for this. In our project we want to control shore foam separate from the waves. We like a little foam near the shore but always showing where the waves might have a bit more or less going on depending.

I think maybe there is away to do this with two different foam sims but so far no luck on that. Though to be honest I dont think I fully understand what the res elements totally do. Are they related to distance from the camera? Wave Spectrums? Maybe a little more info on how those work. Will look through the rest of this and see if I can find the details.

Thanks

Reflections and Refractions

Hi, you mention that the dynamics branch features reflections and refraction, but I don't see either. Is there something specific which needs to be done to enable these?

Thanks.

How to tweak the amount of foam on waves

(I need to update the readme with all the latest changes, apologies its lagging)

@fatboxSoftware asked on twitter if there is an easy way to adjust the amount of foam on the ocean and wave crests.

Yes there is - on the ocean prefab, there is an OceanBuilder script. This has a field called SimSettingsFoam where an asset can be plugged in to tweak the settings (if none is provided, it will create default settings).

To define your own settings, select Asset -> Create -> Crest -> Foam Sim Settings, which will generate an asset with a number of settings which have tooltips. I think Wave Foam Strength and Wave Foam Coverage are most relevant to your question, but its worth playing with the others too. Let me know if you have any questions, or if that gets you what you need?

Cheers!

Generate displacements from wave sim

Following on from discussion in #18 with @Midda-C - i have a prototype implementation which generates displacements on top of the dynamic wave sim by offsetting the wave surface horizontally proportionally to the gradient.

The insight here is that gerstner waves displacement has this basic form

X = ...cos(...)
Y = ...sin(...)

The height follows a sinusoid, but the distinctive gerstner shape comes from the horizontal displacement coming from the cos() term, which is the derivative/gradient of the height function.

This prototype introduces horizontal displacement proportional to the gradient of the water heights coming from the dynamic wave sim. For a travelling sinusoidal wave this will produce gerstner waves. For more general shapes it seems to perform gracefully and sharpens the wave shape, and produces plausible horizontal motion.

I have pushed the prototype to the feature/wave_sim_disps branch. The wave sim settings have two new parameters that scale and clamp the generated displacement respectively (see tooltips).

I also turned off the custom foam generation from the dynamic waves - since the dynamic waves now have displacement, the foam is generated directly from the water surface the same as the gerstner waves. This hints at a unified path for foam which would allow me to remove some foam generation code that is currently highly unstable. This would be great!

If anyone has a chance to try it, please let me know if you have thoughts/feedback here.

Shorelines Only Work On Mountains

Shorelines only show up for mountains. Adding other objects doesn't generate any new shorelines, even duplicating mountains model doesn't help. Also, deactivating the mountains doesn't remove the shoreline.

Unity 5.6.5, 2017.3, 2018.1

Realtime planar reflections?

Hi,

First of all, thanks for maintaining such a great project. 👍

It is possible to use dynamic planar reflections on the ocean renderer instead of the static skybox? So dynamic/static objects in the scene can get reflected on the water. I think it can increase the realism of the simulation.

Any ideas on how to do this?

Thank you.

Tweaking chop value per wave spectrum

At the moment, the chop value is a shared value across the whole of the simulation. I'm finding that at some wave frequencies, I'd like to have a different choppiness to others. Is that feasible at all?

Maybe a checkbox next to each level of the wave spectrum to let you override the chop from the global value to a user-defined one? It'd also be nice to set it to values greater than 1 like what your debug GUI allows for.

Also, a sidenote, it seems odd that the chop is currently specified in a different section to the actual wave spectrum. Is that intentional?

Thanks!

Dynamic Waves and time scale

It appears as though the force applied to the ocean continues to accumulate if Unity's timescale is set to zero. We use the numpad for setting the time scale for debug purposes (5 = %50, 1 = 10%, etc), and we noticed that if we're interacting with the water and pause the game by setting the speed to 0, the ocean will explode with tidal waves when we unpause.

A simple way to replicate this is in the threeboats scene, press play, and while running, open the Time Editor (Edit > Project Settings > Time) and set the time scale to 0. Wait a few seconds, then set it back to 1. You should see all the wake from the boats go a bit crazy. The longer it's paused, the crazier it'll be.

On a related note, I have also noticed similar behaviour if there are hitches in the framerate while playing, where the dynamics will suddenly be very strong after a breif (e.g. 0.5 sec) hiccup. I assume this is the same issue?

Shore Foam Edge Blend

While ocean itself blends into shores quite nicely, foam looks a bit sharp on intersection.
Is it possible to soften the edge via blending like in unitywater4? Just thought it may give some extra smoothness to the picture.

2018-05-10 20 58 30

Issues with Azure sky atmospheric scattering/fog

Was testing against azure sky, and the water is blocking it's scattering and fog. Anywhere water is rendered scattering/fog is gone. Any geometry above the water gets scattering/fog applied correctly.

Any educated guess on what might be going on there?

Garbage production

Hi,

first of all, excellent work so far, I'm really liking what I'm seeing. I've been playing around with some of the examples and noticed in the profiler that a lot of garbage is being produced. I'm sure you are already aware of this. I just wanted to know if you plan on optimizing this any time soon?

Keep up the good work!

Best regards

Progress update

Hi! This isn't a post about any specific issue, just been a while since I commented and was curious about what you've been focusing on lately in Crest. I see you've mostly been working on the local_sim3 branch, is this mostly focused on dynamic waves and such? I saw some mentions of changing the foam too, so yeah, keen to hear how it's all going!

Caustics

I was just skipping through a demo presentation at Unite Berlin on Unity's new Lightweight Render Pipeline, and they had a section (timestamped link here) where they briefly show how they apply some fake caustics on geometry under the water.

Would it be possible to have an option for something like this in Crest? I think it'd work well with the shoreline foam to really sell the effect.

EDIT: I tried to throw the Enhancement label on this, but I assume that's something only you can do?

Some Questions

Hi! First of all, It's so good! But I have some questions about this, could you help me?

  1. Could we render ocean directly by original geometry clipmap technology which is from the paper "Terrain Rendering Using GPU-Based Geometry Clipmaps " by Hugues Hoppe? If so, what problems will arise?
  2. In your source code, I see that you have a new method to build patch which is different from original geometry clipmap. What is the advantage of this approach compared to the original? Is it less complex to build a grid?
  3. From your course in SIGGRAPH 2017, you said that McGuire demonstrated that this stitching is not required as long as there is some overlap between each level of detail, and you provided mcguire's blog post link: http://casual-effects.blogspot.co.uk/2014/04/fast-terrain-rendering-with-continuous.html. I'm confused here. But, I do not seem to see any information about the overlap on this blog. Could you provide me some references about overlap?
    Thank you so much!

Black Sea In Reflection Probe

I really hate posting issues but I just noticed ocean is black in objects with PBR materials. It's no biggie for me but I thought I must notify developer about this. I also tried changing ocean material properties but alas no luck.

2018-05-22 18 23 54

EDIT: Zero fesnel kinda fixes the ocean but it's zero fresnel so... nope, scratch that.

Wave speed or gap

Is there away to control the speed of the waves or frequency between them? Right now I can play with the equalizer but the wave frequency speed stays the same between them. I am talking between generated waves at the same level. I see that I can turn off or lower waves in the equalizer that would create gaps but that only works with larger waves following smaller waves which is not what I want.

Think a shore shot with lazy small waves drifting in slowly with large gaps between them.

Depth Cache on Default Layer

While our terrain is on its own layer, we have many environmental objects in our game which reside on the Default layer. Many of these are in the water, so we'd like to include them in the ocean depth cache, but when the default layer is added, we get this result (replicated in a blank Crest project)

image

It seems as though the entirety of the depth cache region is marked as being below the shorline.

We're already short on layers, so it'd be a challenge to move all of these objects off the default layer, where they are otherwise fine.

Is this a bug, or is the default layer intended to be avoided in this case?

Support for GPU Instancing

Would it be possible to support GPU instancing for the meshes at each LOD level? Or do they each have unique mesh grids? Any thoughts on challenges around this? It would greatly improve the time wasted pushing the verts to the GPU.

Pause bug is back

Pause the game, wait awhile, ocean goes nuts when unpausing (that is not a word). Settles down after a few.

Logo Proposal

Hey! I can contribute on your project in field of graphic. If you need a logo design we can talk about design decisions and I can put here my first experiments. I can show my portfolio if you interested. My main aim is make my portfolio better with supporting open source projects. I am waiting your feedback, have a nice day!

Wave sim intensity is very frame-rate dependent

Hi @huwb !

Looks like Wave sim/Foam sim intensity are very related to framerate.
I have tested this on 3 diferent machines:

  • Machine 1: Core i5, Intel HD 620 (Around 20 fps avg)
  • Machine 2: Core i7 7500, Geforce GTX 950M (Around 35 fps avg) (approx)
  • Machine 3: Core i7 8700, Geforce GTX 1080 (+80 fps)

On machine 1, there is a lot of foam just after starting accelerating the ship a little, and after get some speed, the generated wave is way higher (in height) than desired.

On machine 2, is also noticeable there is a lot more foam than normal, and that waves go too up as well, but not as much as on machine 1.

On machine 3, there is almost no foam (unless you go pretty fast and turning), and wave sim is way smaller, not getting as high as any of the other machines.

I've just double checked this on latest d4d8536 commit from master.

I think that some time-dependent values are not multiplied by Time.deltaTime, or maybe we are mixing fixed time step with regular time steps. I'll try to figure out what is causing this.

Thank you!

WIP Video - Underwater, Enhanced floating objects, boat, swimming.

Since we are always asking for stuff I figured it would be nice to show you what we are doing with your fantastic system.

You can make the ocean shader work underwater by simply adding

Cull Off

The floating objects use physics force projections based around water density. The boat uses a modified version of https://assetstore.unity.com/packages/tools/physics/dynamic-water-physics-89928

Video
https://drive.google.com/open?id=13MiePsUzK98vzDywiVFXvuXGYZ_jXxOg

Ocean Depth Cache Layer

I believe this used to be a mask setting so we could pick multiple layers to apply this to.

It appears we now would create multiple ocean cache object for each layer we want to apply this to. Seems like the old way made a bit more sense but maybe there is a good reason to do it this way. Just curious.

Thanks

Black ocean from certain viewpoints

This is an odd one, and it's been happening since we first brought Crest into our project. I haven't mentioned it because I thought it was related to the old version of the Unity Post Processing stack we were using, but it turns out that isn't the case.

Basically, the ocean will occasionally go completely black, with powerful bloom around the edges (which is why I thought it was the Post Processing stack). However, it seems to be view dependent, in that if you move the camera to another location, it will pop back to normal. I've attached some screenshots.

Example 1

Example 2 ('Add Directional Light' disabled)

Example 3 ('Add Directional Light' + 'Sub-Surface Scattering' disabled)

Since it makes the bloom go crazy, I wonder if it's some value that isn't being clamped? We're using deferred rendering and have HDR enabled. I'm not exactly sure what other info to give you, but I'll let you know if I can isolate the issue further. We're using what is currently the latest data on GitHub.

Nan's in dynamic sim textures (and a hacky fix) _SimDeltaTimePrev=0

The three boats demo scene worked fine for us, but when we tried the same dynamic sim in our game, the highest detail lods vanished.

After tracking things down it seems _SimDeltaTimePrev is 0 on the first game turn for us

I'm guessing some update order has our scene running a game turn with a zero value

this line float v = (ft - ftm) / _SimDeltaTimePrev;

generate's NAN's and because the sim is a feedback system Nan's propagate forever..

adding
_SimDeltaTimePrev = max(_SimDeltaTimePrev, 0.0001f);

before its used to ShapeSimWave.shader fixed it for us.

Dynamic Lighting

Hi again. I've just been looking at your latest changes with transparency, subsurface scattering and wave attenuation. It looks awesome!

I'm curious about the way you're handling lighting in general. From what I can see, the ocean surface doesn't appear to react to the light colour, intensity or direction. Is this an intentional choice, or just something you haven't gotten to changing yet?

Also, regarding your recent improvements, would it be possible to have some way to adjust these settings in the material? E.g. the transparency depth, subsurface colour, shallow colour, etc.

In our project, the time of day is dynamic (my reason for asking about the lighting), and we also adjust various environmental properties for different biomes (why we might like to change the surface/subsurface colours, etc).

Again, awesome work!

Cpu time in lod read back NativeArray.CopyTo

The CopyTo here seems to be the bulk of the cpu time being used in Update. Not the read back. If you browse the ECS/Job forums at Unity there have been some memcpy based solutions posted there using unsafe code. Or you could just move the copy into a job.

Render Ocean Depth component not working with Terrain objects

Hi, I grabbed the latest data to evaluate, and tried to get it working inside our existing project. Most things were working as expected, but when I added the Render Ocean Depth component to our terrain (which is a Unity Terrain object, rather than a regular mesh), I get the following errors spammed in the log:

ArgumentNullException: Argument cannot be null. Parameter name: renderer UnityEngine.Rendering.CommandBuffer.DrawRenderer (UnityEngine.Renderer renderer, UnityEngine.Material material, Int32 submeshIndex, Int32 shaderPass) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/RenderingCommandBufferBindings.gen.cs:362) UnityEngine.Rendering.CommandBuffer.DrawRenderer (UnityEngine.Renderer renderer, UnityEngine.Material material) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/RenderingCommandBufferBindings.gen.cs:356) Crest.WaveDataCam.UpdateCmdBufOceanFloorDepth () (at Assets/Crest/Scripts/WaveDataCam.cs:168) Crest.WaveDataCam.Update () (at Assets/Crest/Scripts/WaveDataCam.cs:62)

I tried just creating a regular cube mesh, and the component worked on that fine, so I suspect it's something specific with Unity Terrains?

Alpha materials not visible through water surface

From @holdingjason :

Oh not sure if this is something that can really be done since I believe this is just not possible but alpha transparent shaded object under the water will not be rendered if you view them from on top of the water. So think of a semi transparent jellyfish or bottle floating on the surface. Those would not show up or only the parts sticking about the water.

Velocity of interaction objects

I've got a wave interaction object on our character to create waves while running or swimming through water. I'm finding that once I get something which looks pretty good, it can go crazy when something gives the player an uncommonly high velocity (like falling from a high location, getting knocked back, falling from a fast-moving object, etc).

I feel like I need some way to clamp the velocity for the simulation on a per-object basis. Because for small objects, the dynamics is mostly just for aesthetics, so we don't ever want the waves to get big enough to have a significant impact on the simulation.

Thanks!

Cheap cpu approximation

Hello,

what a great library :) I was wondering I was wondering whether there is a way to cheaply approximate the water height on the cpu? Maybe even stateless (like gerstner waves). I would love to use this in a client/server game. Currently I'm using gerstner waves which can be evaluated at discrete points on the server.

Shadowing

So there have been a number of instances where sections of the ocean have been out of direct sight of the sun, and it appears to glow when this is contrasted against some rocks or landmass which is receiving shadows (or just the regular NdL shading). I've attached an example.

image

I understand this is a common issue with transparent objects, so I'm not sure much can really be done, but I thought I may as well see if you could think of any ways to approach this? I suppose screen-space reflections might reduce the issue on the fresnel, but I'm not sure about the subsurface lighting.

Not a pressing issue by any means, but I figured I'd at least get it recorded. :)

Multi frame lag on CPU SampleHeight is causing issues.

We are finding with bigger (steeper) waves the lag on the CPU sample height causes a visual issue with boat physics and objects floating, the bigger issue is objects appearing to hover above the water as the wave goes by rather than the object going underwater as the wave approaches.

Thats when running at 30 fps.

Transparancy bug?

I've just grabbed the latest data, and I'm seeing something strange with the transparency. It sort of looks like the depth mask is inverted or something? I've recorded a clip of the issue here. I've seen this in the scene view in the past, but this is happening in the Game window.

I'm using Unity 2017.3.1p4. I've just downloaded the project from GitHub and opened the Unity folder as a project.

Any ideas what this could be?

Crest requires lots of layers

Number of layers required is a bit much. The demo requires 4 (Terrain is not mentioned that I could find in the docs). This actually used up all remaining layers in my project. Layers tend to be at a premium in large games.

Water Surface Wavelets (SIGGRAPH 2018)

This isn't an issue, or necessarily a feature request, I just thought it might be worth putting here.

You may already be aware of this, but I just came across this cool looking work presented at SIGGRAPH 2018.

https://www.youtube.com/watch?v=6I6BV0-BVxI

I know you've already been experimenting with similar stuff in the local_sim branch, so I thought this might be helpful? Things I found particularly cool were the pre-computed boundaries, wake reflecting, and the ability to paint in flow directions, either for currents or things like whirlpools (which would be very useful in our project).

The video description has links to the project page for the actual papers and whatnot.

Questions about the new foam sim

So we've got things up and running in our project now. to get started, I began getting the foam back on the ocean surface, but I have a few questions.

  1. Could you clarify what exactly the Strength and Coverage settings do? I can see changes when I adjust them, but I'm not entirely sure what their differences are.

  2. What is the intention with the additional Coverage parameter on the material (also, I think it's inverted now? It seems to remove foam the higher you set it, I think it used to be the other way around)

  3. Am I correct to assume that, like the wave shapes, it's okay to run several foam sims with different settings as long as they're not doubling-up on the same wavelengths?

  4. I may be mistaken, but was there previously an overall fade/alpha parameter for the foam on the ocean material? I don't know if I'm imagining that or not, but either way, that would be helpful.

  5. With the old foam, we were able to get some nice stylised (i.e. not realistic, but appropriate for our art-style) foam on the peaks of the higher-frequency waves. I'm having a hard time replicating this with the foam sim, could you give some guidance on how something similar might be achieved? Here's an example of how we had it configured on the previous release.

Thanks!

Skybox in shader vs in lighting.

Right now we are setting the skybox in the shader. This works fine for static skyboxes but curious how this would work with something more dynamic like AzureSky (which we use) that is set and adjust on the fly in the skybox material under lighting. Since the skybox is updates constantly, ie sun moving across the sky, clouds etc would be interesting to have this effect the ocean as well. I will try and do some research into this as I have seen this same type of question pop up in other ocean packages.

Revise lighting model for foam

This issue is to track improvement of lighting on the foam. It currently looks flat right now. Some kind of 3D lighting would probably improve it a lot.

From @Midda-C during conversation on #4 :

I don't know if this is a bit out-of-scope, but I was thinking about why the foam looks too saturated at sunset/sunrise. After just looking at some sunset beach images, I think it might be related to the entire foam surface being uniformly affected. Because real foam has some height, you get a bit of shading on it.

Sunset foam example 1
Sunset foam example 2

You get bright saturated colours on the sides facing the light, but shadows/ambient on the opposite side. Maybe a normal map (and some PBR roughness) for the foam might help give some more believable shading?

Shader error in 'Ocean/Ocean Surface Alpha': undeclared identifier 'ComputeLodAlpha' at line 62 (on d3d11)

Shader error in 'Ocean/Ocean Surface Alpha': undeclared identifier 'ComputeLodAlpha' at line 62 (on d3d11)

Google "ComputeLodAlpha", nothing.... any clues

Find all "ComputeLodAlpha", Find Results 1, Entire Solution, ""
D:\Mirror\Unity-Projects-Folder\Cresty\Assets\Crest\Shaders\OceanSurfaceAlpha.shader(62): float lodAlpha = ComputeLodAlpha(worldPos, _InstanceData.x);
Matching lines: 1 Matching files: 1 Total files searched: 43

So.. what is it? Built-in? I'm using the wrong version? something?

Broken prefabs in example content

@Midda-C @holdingjason

Guys could you give me a bit more detail on what you see? Is it reporting that prefabs are "missing" in the threeboats scene? Which prefabs exactly?

So far i've tried the following to repro without success:

  • Delete library folder and other generated data in my local workspace to trigger reimport - works fine
  • Copy crest and crest-examples from my local workspace to a new unity project - all scenes fine (after layers added)
  • Do a new fresh clone of the repos into a new folder - works fine (warning about extra meta file which i've fixed now)
  • Create another new unity project, copy crest and crest-examples folders in from the new clone - all scenes fine after layers added

Note that i copy the meta files along with the folders - so Crest.meta and Crest-Examples.meta.

I'm on 2018.2.1f1. I'm happy to upgrade forward if you guys are on a new version.

Linear vs Gamma colour space

Are you sick of me yet? ;)

So I was trying to figure out why the foam appeared so different in your project on GitHub compared to the same assets and scene in our own project. Turns out the issue is due to our project using linear colour space, and the Crest project using gamma space. The resulting changes from simply changing the colour space are very pronounced. The following image is the exact same location, on the same frame (I used the 'freeze time' option on the ocean prefab), with the only difference being the colour space.

Gamma Vs Linear Example

As you can see from the image, everything seems to be impacted to some degree—the colour, the foam, the transparency, and possibly the fresnel.

We're using linear space as it is the preferred workflow for PBR assets. Even though Unity themselves recommend a linear space workflow, Unity still, for whatever reason, seems to default to gamma (It's changed in Edit > Project Settings > Player > Other Settings)

At the moment, I don't know how to get the foam to behave correctly in linear colour space, is it seems to mostly just cover the surface of the water in a repeating pattern with little regard to what the wave behaviour is set to.

I think the way the actual assets are authored plays into this as well? It's not something I'm super knowledgeable on. Not sure if the impact on all of the other aspects (colour, opacity, etc) is something that needs to be considered also.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.