Comments (12)
I believe this is resolved on master, in the commit referenced above. Let me know if you see issues!
from crest.
Yeah, I've thought about this too. The ocean is always moving in its set direction at a constant speed, as are the scrolling textures. Having some extra control over the speed would be great.
from crest.
Thanks guys. I've had related thoughts but its purely in the realms of RnD at the moment. It would be figure out an approach here.
If we're purely talking wave speeds, i could expose speed control for each octave.
If you mean time-varying wave conditions, that is somewhat possible right now. the GerstnerWaveBatched script has a Weight param that can be driven as desired. one could set up two GerstnerWaveBatched objects and crossfade the weights to transition between them. one could also drive the equalizer values as desired directly - you could lerp small waves in or out using script, or maybe even animate them (i don't think i've tried applying animation curves to ScriptableObject's before..).
If you mean spatially varying wave conditions - different waves in different areas of the world - I havent figured out if this can be done efficiently. my best idea so far is to break world up into a grid and in each grid square mix together the spectra that apply. or, allow the user to author geometry with vertex weights that blend different wave conditions, exactly how multilayered materials work.
What do you guys think?
from crest.
I was talking wave speed. The speed at which the wave moves across the ocean from point A to point B.
Need to think about your other scenarios.
from crest.
Me too, I was mostly just talking about the speed that the wave moves. Essentially just like the time-scale for a given octave. Might need some way to control the speed of the textures too?
I hadn't considered driving the weight with animation curves before. That could be interesting (should be easy to do as-is, Unity is pretty good about letting you animate pretty much any exposed value).
from crest.
Yeah let me know about how animating goes, I want this to be well supported.
Ok that makes sense. I was hesitant to add per octave chop but if we're going to add per octave speed it might make sense to add both.
from crest.
Nothing to show yet, but i spent a couple of hours this evening looking at having chop and wave speed tweakable per octave. Think i've got the groundwork done now so hopefully that stuff can come online in the not too distant future!
from crest.
I've added a per octave speed scale in the referenced commit. I think its pretty cool actually. You can set it to 0 to freeze one or more octaves which is kinda fun.
The new options are tucked away behind the Advanced Settings toggle on the ocean wave spectrum, on the feature/per_octave_settings branch for now. These changes will add a small extra expense so it would be good to confirm this is useful before committing to master.
from crest.
In #18 @Midda-C asked about exposing a global wave speed control.
I've decided to tie everything to gravity (the wave speed is computed in part from gravity - more gravity means faster waves). Doing it this way ensures global consistency in the world, but I've also added overrides at multiple levels:
- The ocean system takes the gravity value from the physics settings
- It has a global gravity multiplier in the OceanRenderer script. This global setting will affect both dynamic wave sims and the gerstner waves.
- There is a gravity multiplier on the wave spectrum that will affect all wave octaves
- There is a per-octave gravity multiplier
So at the highest level you can override the gravity and you'll get consistent behaviour in both dynamic sims and the gerstner waves, but you can override at multiple levels, down to per-octave granulariy.
from crest.
Yeah let me know about how animating goes, I want this to be well supported.
Just thought I'd let you know that I finally remembered to try this out, and as expected, it works fine. All of the exposed parameters are available in the animation editor, and fading the weight in and out works perfectly. :)
from crest.
@Midda-C are you able to animate the wave spectrum - like the power values for each wavelength?
I could not work out how to do it - i can animate params on the ShapeGerstnerBatch script, but not in the spectrum.
from crest.
I just had a quick look, and no, I wasn't able to do it either. I think that may be because those properties aren't actually part of the object, rather they're stored on an asset file.
I suspect that if the ShapeGerstnerBatched script actually replicated the settings from the Spectrum asset on the component itself (i.e. when you dropped in the spectrum file, its settings appeared on the compoenent), they'd be visible from the animation editor. Not 100% sure, that's just a guess.
from crest.
Related Issues (20)
- 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 35
- 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
- Portal feature broken with Unity Recorder 360 View
- Directional lights that are not active on any layer change the color of subsurface scattering 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.