Search Unity

Ocean Renderer

Discussion in 'Works In Progress - Archive' started by scrawk, Feb 24, 2013.

  1. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    Tested new White Caps project with DX9 and did not fixed the White Caps problem. (Im using Macbook Air NVIDIA GeForce 320M 256 MB)
    However, beside the White Caps, everything works fine.

    Just did the quick precompute atmospheric sky test on my iPhone 4S, it actutally show up and works, but it need some optimization for performance. Edit: modified the scatter data that base on 2D lookup texture only, no 3D texture.
     
    Last edited: Aug 30, 2013
  2. MickM

    MickM

    Joined:
    Nov 19, 2012
    Posts:
    166
    I asked a while ago about the sun effects on water (back when it was just cosmetic)
    Improved version with movable sun..... amazing.... GREAT work!!!!

    edit - Just downloaded and ran latest windows build - Awesome and running at 800fps!
     
    Last edited: Aug 30, 2013
  3. Boomsma1995

    Boomsma1995

    Joined:
    Mar 21, 2011
    Posts:
    95
    Hey Scrawk

    I am trying to make bouyancy working with your water, I am able to retrieve the colors from map0 as i assume this one contains all the height information needed. I got some progress but it takes alot of time just to figure out what one color does. I already figured out that the color needs to be divided by the gridsize. And blue is for the wave height. Now this is not always correct so im trying to figure out what the other colors does. Can you maybe help me with this.
     
  4. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Hi Boomsma.

    You are on the right track, map0 does contain the height data but every channel in that texture is height information not just the blue channel. Each channel represents wave heights at various wavelengths, the grid sizes is basically the wave length. Each channel is then added together to get the final wave height. I only end up using the red and green channel. I found the last two channels dont look that good when added to the mesh but I have left them in there in case anyone wants to use them.

    If you have retrieved the height data you can use the same method for reconstructing the wave height for any giving world position thats in the indie project. Its the SampleHeight function in the waveSpectrumCPU script you would want to look at.

    Im not sure what project your using but if its the whiteCap project this method will not work unless you turn the choppyness right down.

    If you have retrieved the heights using read pixels you may not get very good results.

    EDIT - its not the color that gets divided by the gridSizes, its the uv's that gets divided

    Good luck.
     
    Last edited: Sep 18, 2013
  5. Boomsma1995

    Boomsma1995

    Joined:
    Mar 21, 2011
    Posts:
    95
    I am using the first pro project. I will check the indie project later on when im home. What i did to retrieve the colors is by Graphics.Blit the map0 to a temporary rendertexture. In this blit a shader is used. That shader divides the color by 5 and adds 0.5 to it. This makes sure that everything is within the 01 range. After that the rendertexture is applied to a Texture2D and from there i do a GetPixelBilinear. I really hope when i check the indie project i can get position from the texture cause thats what i didn't got working.
     
  6. mickna123

    mickna123

    Joined:
    Sep 18, 2013
    Posts:
    1
    @scrawk:

    Thank you! This is really amazing.
    Unfortunately I am no coder at all so I do not really understand what is going up in the C# scripts.
    I am only missing a reflection and a refraction. I tried to find out a way with the original ocean-script from unity how to do a camera based reflection. But it is a little bit more than a simple copy&paste *lol I gave up.

    Again: thank you. Very impressing.
    mickna
     
  7. ScreenJuice

    ScreenJuice

    Joined:
    Aug 4, 2013
    Posts:
    11
    Wow! Looks really great!
     
  8. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Like your work!
     
  9. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Looks amazing, bookmarked for future reference.
     
  10. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    So far I successfully rewrited the precomputed atmospheric sky to SM 2.0, basically stripped a lot of original codes. For the best result i decided to use the float textures format that using four of the (Encoded) 8bit lookup texture 2D (One table) and converts them to a single float 16bit RenderTexture 2D at start. In this prototype project I didn't use the "transmittance" texture, instead just use the sky scatter as the sun color.

    if just render only a single Sky running, it run 47fps on iPhone 4S,

    if render both Sky and Skymap :
    42fps Tiler 3% Renerer 96%, Device 96% CPU 3ms GPU 18ms (iPhone4S),
    60fps Tiler 0% Renerer 66%, Device 66% CPU 3ms GPU 10ms (iPhone5) ...Awesome!

    I don't have iPhone5C or iPhone5S to test, they both support SM 3.0 and they should run even better.
    following is the iPhones 4S screenshot
     

    Attached Files:

    Last edited: Oct 2, 2013
  11. Boomsma1995

    Boomsma1995

    Joined:
    Mar 21, 2011
    Posts:
    95
    Nice results, Especially for mobile
     
  12. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Nice works. Looks great.
     
  13. Mike4

    Mike4

    Joined:
    Oct 24, 2013
    Posts:
    92
    Great. Now how to make real big waves?
     
  14. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    The wave amp and wave age control how large the waves are but in the Indie version they wont get much larger than what they already are due to precision issue when storing the wave heights in a 8 bit texture.

    You could scale the heights in the shader or use some sort of encoding to fully represent the floating point precision of the heights.

    You could also store the heights in a mesh instead of a texture like in this project but you will have issues with repeating patterns.
     
  15. Mike4

    Mike4

    Joined:
    Oct 24, 2013
    Posts:
    92
    Thanks now I want underwater effects. How to check the waves height compared to the camera?
    I try alike:
    if (m_ocean.SampleHeight(pos) > Camera.main.transform.position.y)

    But no success so far.
    The ocean looks stunning, thanks again.
     
  16. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Sorry Mike I dont think thats going to work. The best way to do this would be to mask of the under water area with a stencil buffer and apply the underwater effect as a image effect. This would be Pro only of course. I honestly have no idea if you can get a decent under water effect in indie.

    Just a small update. For a project I have been working on recently I had to write some scripts that fetch data from the GPU. As this has been a request I decided to add the scripts to the BRDF project.There is a updated project file at the bottom of the BRDF page that has a get heights function that will calculate the wave height for any world position from a script.

    I have only added it to the BRDF project as it uses a computer buffer so is dx11 only. There is some more information about this on the BRDF page.

    Also, if anyone would like to donate a pirate/galley style ship for the next project I would be most appreciative. PM me.

    This is a image of a crate floating on the ocean surface. Its is done via a script, not via a shader as done previously.

    $oceanBRDF4.jpg
     
  17. Ignoble Arts

    Ignoble Arts

    Joined:
    Feb 9, 2013
    Posts:
    34
    Looks absolutely beautiful.
    Apologies if this has already been touched on but are you looking into adaptation for HDR "bloom" support to achieve a sparkle effect like this:
    $sparkle-sea.jpg

    Its something easily noticed in reality but rarely seen in the virtual world. Also most water shaders are a bit heavy on the specular reflection so you get a weird effect that makes it look like a gaggle of paparazzi.
     
  18. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I do perhaps overplug this thing but i've been messing with an asset store thing called FXLab because of wanting to get Unity free working with the oculus rift, it's quite neat and although you take a performance whack (naturally, i think it's using readpixels so you can imagine) and a resolution knock, it will actually do what you just said, or it's easy enough to come up with your own shader for it. While i'm sure you're very keen on keeping things running at a good speed, I just wanted to say that that was there for anyone wishing to get their underwater effect with unity free, no matter the cost. And this is also a great ocean thingy, i've just used the community shader this far because of the bouyancy and reflection/refraction stuff
     
  19. Mike4

    Mike4

    Joined:
    Oct 24, 2013
    Posts:
    92
    Hmm forgot how to jump. What key for jumping? How to integrate move up and down. I'm new to unity sorry.
     
  20. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    is there a way to do this on sm2? I would love to check it on pre dx11 devices and I would pee myself if I see this running on an iPhone 4s :)
     
  21. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Lucky mouse did post a link to some code for the BRDF project in SM3 a few pages back and it will run on a mobile. I thinks that's about as low as it could go. The shaders are quite large so maybe SM2 is not possible. SM3 should be able to run on most mobile devices. Could not say what performance is like though, probably quite slow.
     
  22. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    If this has some signifant speed improvements to the community shader i know it will run on a mali 400 at the very least (samsung galaxy s2) as i've already got it working at a decent clip



    I'll have a go at getting yours working on a HTC One soon if i can get in the mood!

    Out of curiosity are you still developing the shader? I went off on my own lil journey of discovery, partly to see how i could come up with ideas and overcome some problems,

    First thing I thought of was your dark lit faces bug, would it be sensible to break back into using a projected grid rather than sticking with a radial grid? Nvidias water samples *(dx11 examples) I think both used projected grids and your original spectra fft appearance and the philips spectra. While looking up altenative and i dont know if these are more or less the same as what Triton uses but: http://www.wikiwaves.org/Ocean-Wave_Spectra

    Im not sure if if youve got them accounted for and how realistic you find it blending between them, as some are based on coastline models rather than open sea

    Sorry if im repeating information you already knew, i just have all the excitement of the discovery of it all
     
  23. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    That's OK :). I don't think anyones brought any of that up. Video looks great by the way. Nice to see that project running on a mobile device at decent speeds.

    I will be doing more projects with better shaders but everything seems to take way longer than expected. I have wasted this week setting up the new computer and doing a fresh windows install on my laptop and I have the joy of having to do a exam today.

    I will be sticking with the radial grid for now as its a lot simpler but when I finish everything I might do a version with a projected grid as I have found some good code for that recently.

    Im using the JONSWAP spectrum except in the Phillips ocean project. I have only added the choppy wave model in the white cap project though but I will add it into the next project.

    Had a look at Tritons web page. From what I saw they say they use the JONSWAP spectrum.
     
  24. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    I just tried to set it up for iPhone and android with no luck. The editor displays an array of epileptic colors :(
    Btw, how does this look near a coast line? Is it semitransparent? If so it could be nice for my little island games if it has some kind of coast line feeling
     
  25. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Was that the BRDF or white cap project? If so the epileptic colors mean the device does not support dx11. If you are using lucky mouses SM3 port of the BRDF project Im not sure what that issue is.

    There is no refraction at the moment so there will be no transparency. Cost line effects will be in next project, transparency the one after that. All new projects will be in SM3.
     
    Last edited: Nov 27, 2013
  26. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    It was brdf that said it was for dx9. Just switch the platform to android and hit play on the editor, you'll see what I mean.
    Whitecaps and coastlines would be awesome!
     
  27. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Ive never done a dx9 BRDF project so what ever you have found is probably not my code.

    The only links to my projects are on the first post of the first page via my blog.

    If that was from my blog then its not the BRDF project but probably the surface effects project and Im afraid I don't support mobile devices. Its hard enough to support code for dx9 and dx11 PC builds.

    If my code works on a mobile device that's great but if it doesn't then Im afraid your on your own.
     
  28. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    i think it was luckymouse, but i can't find his link.
    @luckymouse where is the link for the sm2 port? i can't see it any where and those screenshots look fantastic
     
  29. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    Lazygunn, what did you use for the sky in there? is this scrawk code or the community shader? i'm amazed it runs so fast on a s2
     
  30. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    It's the community shader and just a skybox with some fake time of day, not really a realistic atmospheric scattering/cloud model

    I've spent the last week or so researching how to do atmosphere and clouds without having to buy a solution, i wish to use a brdf physically based lighting model throughout a demo im doing which should pull everything from water to terrain to atmosphere/clouds and locally lit objects altogether, WHILE making it all quite unreal and fun. It's turning into a LOT of reading and looking at code I dont understand.

    The video above is from unity but funny enough it runs just as quickly on the samsung, if i can find the project i'll make an .apk available just for the fun of it, id like to see how it runs on my new phone anyways. I was intending to make it a Live wallpaper with unity2lwp but the phone runs hot if its on for too long, maybe if this shader can be super optimised it could be viable for the ogles 3 phones - that would make for a very fancy wallpaper!

    I might bug for advice about blending between wave models eventually, it seems the most realistic results when windspeed picks up is a 'confused' ocean with huge waves that seem to be a mix of spectrums, and i JONSWAP is more for the open sea so i read, phillips is more for near-land where wind is apparently less directed, and then very near the coastline the waves lose amplitude anyways

    Not wanting to add too much to think about(!) but Nvidia supplied FFT libraries caught my eye THEN i figured you don't wish to keep it all dx11 but this might be useful compared to slightly older versions of FFT implementations currently maintained open source opencl fft library originally by amd - assuming you still wish to pursue dx11 implementations. anyways good luck with your exam!
     
  31. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    Hi creat327, the project that I shared is only the BRDF DX9 SM3. That project is not mobile ready, it doesn't run properly on mobile.
    Other post that I rewritten the atmospheric shader to SM2, it seems run well on mobile, but still need some more optimization. However, It is not ready to share yet.

    @scrawk, unity 4.3 has a new API for directly loading raw texture . Have you try that for the precomputed float format sky texture?
     
    Last edited: Nov 28, 2013
  32. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
  33. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    272
    @ lazygunn
    That looks great! I'd like to check out the scene file. Will you post a Unity project file?
     
  34. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I'd have to remove paid assets from it all so youd just get the ocean but ill see what i can do
     
  35. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Yeah i cant really make mine do its thing without some paid-for stuff, http://forum.unity3d.com/threads/16540-Wanted-Ocean-shader/page32 creat324 did a great rewrite and the above is based on it (and another project i did)

    The important thing is you give the water something to reflect, and refract, and then you're fine
     
  36. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    I did see that but Im I had some issues with 4.3 so had to roll back. The docs are unclear if the data is loaded into a normal 8 bit texture or if you can load it into a floating point render texture. Looks like its only into a 8 bit texture so may not be of use.

    Thanks. Looks like its openCL so may not be that helpful. The fft gpu code is really quite simple so there is not much room for improvement there.

    So those images you posted, Im guessing that's the Phillips spectrum project with the community shader? Looks nice.
     
    Last edited: Nov 30, 2013
  37. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Well, i'm assuming the phillips yeah, although the waves are way more stretched out than in your example, still hoping to figure out how to do that on the gpu, even losing frames getting heights and such is still a bunch faster than doing everything on the cpu, im miles, miles behind you in understanding how to do this even despite sleepness nights staring at things i dont understand. I'll figure it eventually i guess, im more an artist than a programmer
     
  38. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Your help turned out to be invaluable, i managed to frankenstein your whitecap shader with suimono myself (Many more features need adding) and the effect close up with the whitecaps broiling away with more 'gamey' effects like coastal depth and refraction/shore foam is phenomenal, i couldnt believe my eyes. Need to take a look at being able to change conditions more quickly and i'll be providing it to the person who made suimono for free as they might make use of it, with your blessing of course. Screenshots, naturally:


     
  39. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Very impressed, looks great.

    Im guessing you managed to get the wave heights and pass it to suimono in a format it likes.

    What the frame rate like doing it like that?

    When you say change conditions fast do you mean change the wave conditions, ie from calm to rough? I may know how to do that fast but havnt tried it yet if you want to know.
     
  40. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    is this suimono 1 or 2? some of us are already testing suimono 2
     
  41. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Its actually based on suimono 1, i was going to run it by chingwa and if he's ok with the idea i'd implement it as an alternative approach to tesselation as a free bonusy thing for his version 2 package, so everyone who buys suimono gets it for free. The whole reason I did it was because i dont currently like the suimono 2 betas wave generation, this uses a fine radial mesh for the waves rather than a tesselated grid (An alternative is a projected grid)

    I actually went the other way around and instead of trying to get the heights to play ball with suimono, i adapted the suimono shaders around yours, scrawk, im no shader genius so it was a lot of trial and error but I managed to get it working ok, i seperated out the various elements of the lighting best i could, like 'brdf base', 'whitecap radiance', 'sun radiance', 'sky irradiance', for some artistic control and to keep it possible to dial things down to let other effects show through. Migt be better ways but i didnt really know what I was doing. The whitecap shader hugely benefits from some 'unrealistic' shading though, they get this 3d looking 'broiling foam' look its very nice. Because its based around your shader, no heights looked into, but its ridiculously fast, my demo only ran slow because i had a 1 pixel error terrain in it with 8 layers of POM shading. Just on its own the water was running at 300-400fps on my 580. Faster when i commented out refraction as although it was ostensibly looking ok, too much weirdness was going on cause the reflection and refraction effects in suimono 1 are meant for a plane.

    In terms of changing things more easily, yep thats basically what I meant! I couldnt figure how to change the ocean settings on the fly without it slowing down terribly, made checking for changes very slow, and in terms of other improvements, the 'black bits' problem showed up every so often (when viewing at very low angles) and i really, really love the atmospheric scattering and its integration with the ocean, i couldnt really get your post effect version working to integrate the rest of a scene, so i'm thinking about how that could fit in

    I don't know if you have time or if other justin (suimono creator) is okay with it, but if you'd like to look at the code and it's allowed id hugely appreciate it, you could probably improve it quickly, and maybe a free version could be figured out so everyone can benefit from the work without stepping on toes
     
  42. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    i think justin will be fine with sharing the code among suimono users (i mean, why wouldn't he? we already bought the package and these are your additions). I also shared with him my mobile ocean shader code so he could use it for suimono 2. I'm beta testing suimono 2 and so far i'm not very happy. The thing is slow to crap on b3. Runs at 50 fps on my desktop while any other version runs over 400 fps. Hopefully he can improve it, but honestly your modification looks way better than anything i've seen with raw suimono so far :)
     
  43. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Well i'd be sharing with scrawk who i do not think owns Suimono, and it would be ridiculous to charge him if he wishes to help out. Suimono 2 has some great artistic control, and a really great interface, although it's all very much in beta, and sometimes the wave generation place doesnt work or is too slow. By the way I hope you noticed you can change the speed of your wave generation in the suimono object, that can help a lot! But yes beta3 didnt work out so far

    With scrawks gpu generation, the performance doesnt take the remotest hit with suimono 1's shaders for the depth/refraction/colouration etc, so 300-400fps is the norm, i'm going to try suimono 2's shaders tonight (im hoping chingwa gets back to me before I get too stuck in though), sans-wave generation to see how it runs, i'm hoping for some strong peformance with some very nice arty control. Then the main problem is the heights, which is easier stuff for me to understand with tesselation than these approaches (im not ostensibly a programmer and feel very out of my depth looking at the code to these things), but they do need to be fetchable for all the 'interactive' stuff - boyancy and 2d ripples to underwater effects (i definitely need help there, no doubt something to do with stencil something) to genuine alterations to the wave generation like wakes and shorelines (breakers being some kind of awesome fantasy hah)
     
  44. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    That white cap shader is a beast so well done getting it to work.

    There are some optimization you could make. Lines 198 to 213 can be removed. They are meant to dim the lighting on the foam but in practice they have little effect. Since I wanted to port Erics project to Unity as it is, I made as little changes to the original code as possible so left stuff like this in.

    That also means line 492-493 in the Ocean.cs script can be removed.

    I will be having another look into the black makes issue soon. I have some ideas.

    Adding the atmospheric post effect can be done but may take a little work.

    To change the wave conditions during game play there is InitSpectrum shader in the resource folder. Its this shader the data for the fft is initialized from the spectrum textures (spectrum01, spectrum23). These spectrum texture are init from the wave age, wind speed and wave amp settings. You will need to have two lots, one for calm conditions and one for rough conditions. You can then lerp between them in the initSpectrum shader based on a slider or something. Havnt tried this but it should work as long as it makes mathematical sense to lerp between frequency domain spectrum values (should do).

    I don't own simono but if you send me your project file I can have a look if it fine with the suimon creator. I can add in the atmospheric post effect as well if you like.

    PS You seem to be quite interested in this topic have you been to Erics web site?

    http://www-evasion.imag.fr/Membres/Eric.Bruneton/

    I recommend it. It is quite interesting.
     
    Last edited: Dec 4, 2013
  45. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Cheers! Ahh yeah i investigated his site after having a good root around in your blog, it is very interesting! I was disappointed I couldnt find an implementation of the evasion students' clouds, cause that's next on my list of headaches! But I find it all fascinating (Their general Proland work is amazing, and the Rama video was absolutely brillliant, having read the book many moons ago), researching things like clouds and oceans and how they can be represented in 3D is fascinating and the methods used ingenious. As ive said a million times to people i'm an artist really not a programmer, so i can be a bit thick when it comes to understanding some concepts but when it all works and looking pretty it can all look beautiful

    I love the whitecaps project, i really do love it haha, i dont know if you're expecting the results you'll see from the project but i'll get a video of it as I had it in slightly more 'arty' climes, it looks incredible, the white caps look like broiling foam hissing off the surface, perfectly blended in, i was just amazed something like that could be computed. I cant for the life of me understand the maths behind it but I do know how to composite shaders so getting it to play was fine.

    Cheers for the optimisation hints, ill give them a go but i dont know if i'll notice a difference but! i'll have a go. as soon as i figure out why this reflection wont work. Havent heard back from suimono guy he seems to like the idea but i guess he's rightfully worried about people shooting off with his livelihood, i am naturally going to offer everything I do as something towards suimono as it could end up being a very useful ocean solution and i'm not gonna try make money off the back of other peoples hard work, so i'll get a package together and have him see if hes ok with that being shared and if so i'll get it sent to you. I think the alternative, which is you getting suimono is a bit unfair haha

    I'd definitely appreciate some integration of a 'global' scattering implementation and i could badger you all night and day for things like being able to make wakes and stuff, but I guess i'll just wait for something i can cannibalise as usual. Heavy hint for your next project maybe! It's all part of something i'm doing to investigate physically based lighting/shading, the whitecaps ocean is obviously a good start, since I could recompose elements of it 'artistically', a proper atmosphere that could simulate scattering with a terrain whose shader creator is looking at implementing some level of ibl (thanks to people badgering him) would be great and me just getting to grips with more 'local' IBL shaders would be getting somewhere near where I want to be, which is making very pretty arty things using physically based methods. Clouds are going to be a massive headache.

    I was hoping for some more fine grained control of the ocean but i think it's probably all as you described and i just need to add handles to the shader, i'll definitely have a look at that next, i just want to get this reflection working so i can finish getting the suimono shader onto the ocean fully.

    One of the things, and this goes back to the wakes and suchlike, was that I can understand how to alter a tesselated surface with a texture quite easily, so i'd find things like wakes and heights and shores quite easily in that regard, but the radial grid is very confusing. I think i'd have to talk about implementation in private as its someone elses work in beta but if you have the time i'd ask you in in pm how something similar to that might be applied to a large radial grid rather than a square tesselated one. I'm tempted to find the money to buy you suimono to make it easier, your oceans are really going well with it, and it would be nice to help make an affordable ocean thing that can look exceedingly pretty for everyone, which feels like my goal with this atm
     
  46. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Fairly typically of me I completely underestimated the complexity of getting involved with these fft oceans and am figuring how i'm going to actually do it (set it so i can switch conditions). You definitely assume im cleverer than i am! I'm tired too i guess

    Edit: im going backwards through the code trying to work out how _Spectrum01 was influenced by the script parameters, and then trying to figure out how to put that into a shader. Should I instead do the equiv of a ' blah = new WaveSpectrumGPU' for two sets of figures for the spectrums to tween?

    I was hoping to be able to do it directly by the parameters but it seems like a long way round

    Edit 2: I'm going to see if I can make arrays of spectrums(spectra?) to blend between
     
    Last edited: Dec 4, 2013
  47. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Got it working! Kind of. You can hit a toggle to regenerate three different spectrum textures that you can lerp between, works for now



    Here a pretty
     
  48. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Some interesting news.

    First off I have moved the Ocean BRDF project to dx9/SM3. No compromise was made on quality, its still looks the same. I just had to rewrite the code a bit. The 'Get Heights' version is still dx11 however.

    I have also been in contact with the creators of Proland and they have given there blessing for me to port the whole Proland API to Unity.

    If you like the BRDF ocean project but have never heard of Proland have a look at the website. Its quite impressive.

    I don't know if it will possible but I will give it a shot.
     
  49. quantumsheep

    quantumsheep

    Joined:
    Mar 9, 2013
    Posts:
    37
    Forgive me not reading throughout the entire thread (it's late!) but this looks kinda lovely :)

    Is this available for the Mac version of Unity?

    Cheers!

    QS =D
     
  50. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Re Proland: That is interesting news! It seems to me like quite a massive undertaking, some of that is really out there, specially the orbit to tree filled terrain, but i'll definitely watch out for updates (and stop bugging you to do stuff hah, prolands probably quite enough work in itself)

    Only big question fr now is how close is the cloud implementation in proland to the actual work done by some of the students involved with it, the videos of proland have clouds but not nearly so finely implemented. I'm going to go and check out the site again though. Good luck!