Code Monkey home page Code Monkey logo

Comments (6)

huwb avatar huwb commented on May 31, 2024

Hey there, i didn't intentionally change anything here but its probably some of the recent changes related to how layers are managed thats making something wonky. I should be able to look into this in the next day or two.

from crest.

huwb avatar huwb commented on May 31, 2024

Hi there, sorry it took me a while to get onto this.

It has not changed, but circumstances around it have. The OceanDepthCache takes as input a layer name (set to Terrain in the main scene in the example content), and should render anything in that layer into a cache. I changed the way layers are handled, because previously it was storing the index of the Terrain layer, which when imported into another project could be any random layer :(, so I reference this layer by name - on the aforementioned script, and on the object that im rendering into the cache - Island0 in the main scene. There is a ApplyLayers script on Island0 - again i'm circumventing the unity setting because it will index to something random when importing into another project :/. In your own project you could assign the layer in the inspector instead of using the ApplyLayers script, if you dont need to worry about importing this content to a new project.

I've just realised that there was a race condition between the two scripts a i mention above - the cache could be populated before the Terrain layer is applied. I've just pushed a fix for this in the referenced commit.

Does this make sense, and answer your question?

from crest.

holdingjason avatar holdingjason commented on May 31, 2024

Don't worry about it. Your super responsive and we all really appreciate the hard work.

Hmm I see how that works and that does make sense. However the bigger issue would be allowing multiple layers (names) on the OceanDepthCache so I can include multiple layers to act as "terrain". So I might have rocks in a obstacle layer, terrain meshes in a terrain layer, boat in a objects layer and I want to apply the depth cache to all of them. Granted I could have made them all terrain but that would cause issues elsewhere. I can also create multiple similar depth cache objects for each layer but not sure if that is adding additional overhead etc.

Does that make sense?

Also not sure if you got a chance to check out the last few questions on #33

Just was curious what your thoughts where my two videos as far as if what I am seeing makes sense and is normal or if I should maybe be doing something a bit different. But again no rush and thanks for everything.

from crest.

huwb avatar huwb commented on May 31, 2024

Ah ok, yeah multiple layers should hopefully be a fairly straightforward extension - i'll report back when i've made an attempt.

Yeah its on my list to reply to #33. I'm on hols at the moment so expect a little more latency than usual but i'll see if i can jump in there in the next day or two.

Btw 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.

holdingjason avatar holdingjason commented on May 31, 2024

Not a huge deal. Please do not spend time away from your holiday on our account. I am just shooting you stuff as I find them so no rush just want to make sure you know about it. I need to dig into some of this stuff myself so I can solve it without bugging you about every little thing and pass along the changes. So much to do so few hours. Our team completely loves the water in the game btw always raving about it and they have pretty much seen every water implemention I could find and come up with before that.

from crest.

huwb avatar huwb commented on May 31, 2024

Should be sorted on latest - let me know/reopen if not!

from crest.

Related Issues (20)

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.