Announcement

Collapse
No announcement yet.

[Community Project] WIP Weather & Ocean Water Shader

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Just saw this @ twitter. This fellow posted a simple project with simple buoyancy. I still didn't check it, but in the video was nice. http://ue4resources.com/3d-projects

    Leave a comment:


  • replied
    Originally posted by OptionalSteve View Post
    Hey guys, be careful with using VaOcean as a base for a new project. The original creator adapted his code from NVidia's OceanCS example, whole functions are directly copy/pasted. He neglected to mention this, which violates the EULA that comes with the code (It mentions NVidia must be credited). There may be other licensing implications that I'm not aware of, so you may want to look into that further if you're going to spend a lot of time improving on that code base.

    Additionally, a lot of the code was written with DX10 as a target, which is a leftover limitation from OceanCS. UE4 uses DX11, and there are several improvements in DX11 that will help you write a more efficient FFT. It may even be more desirable to start from scratch...

    You can find Microsoft's adaptation of OceanCS in this old blog post: https://blogs.msdn.microsoft.com/nat...mple-in-c-amp/

    In OceanCS.zip you'll find NVidia's EULA and some of the code that was copy/pasted into VaOcean. If you want to see OceanCS directly, you'll have to download Nvidia's GPU Computing SDK 4.0.

    I'll add their EULA too. Thank you for the tip.
    Last edited by EvoPulseGaming; 03-12-2018, 01:39 PM.

    Leave a comment:


  • replied
    From my personal understanding, the code is really replicated there, and the NVidias Eula are not even distributed, which is wrong. My understanding is that NVidia's code can be used inside a product as binary form and be even sold, but in source format it can't be sold, meaning it cannot appear inside Unreal Engine Marketplace as a plugin format.

    I am consulting with other people about this, that are more competent in copyright than me. As soon more info comes, I will post later.
    Last edited by NilsonLima; 03-12-2018, 07:04 AM.

    Leave a comment:


  • replied
    Originally posted by OptionalSteve View Post
    Hey guys, be careful with using VaOcean as a base for a new project. The original creator adapted his code from NVidia's OceanCS example, whole functions are directly copy/pasted. He neglected to mention this, which violates the EULA that comes with the code (It mentions NVidia must be credited). There may be other licensing implications that I'm not aware of, so you may want to look into that further if you're going to spend a lot of time improving on that code base.

    Additionally, a lot of the code was written with DX10 as a target, which is a leftover limitation from OceanCS. UE4 uses DX11, and there are several improvements in DX11 that will help you write a more efficient FFT. It may even be more desirable to start from scratch...

    You can find Microsoft's adaptation of OceanCS in this old blog post: https://blogs.msdn.microsoft.com/nat...mple-in-c-amp/

    In OceanCS.zip you'll find NVidia's EULA and some of the code that was copy/pasted into VaOcean. If you want to see OceanCS directly, you'll have to download Nvidia's GPU Computing SDK 4.0.
    Thanks for mentioning this. I will study the material (VaOcean) and the NVidia's EULA to decide the outcome and make it public in this thread. There are plenty of works on Tessendorf FFT which we can switch over and that are trully MIT license, and we might replace as seen fit if we can't reuse VaOcean code. I will share the best implementation with EvoPulseGaming so both will have same implementation.
    Last edited by NilsonLima; 03-11-2018, 06:59 PM.

    Leave a comment:


  • replied
    Hey guys, be careful with using VaOcean as a base for a new project. The original creator adapted his code from NVidia's OceanCS example, whole functions are directly copy/pasted. He neglected to mention this, which violates the EULA that comes with the code (It mentions NVidia must be credited). There may be other licensing implications that I'm not aware of, so you may want to look into that further if you're going to spend a lot of time improving on that code base.

    Additionally, a lot of the code was written with DX10 as a target, which is a leftover limitation from OceanCS. UE4 uses DX11, and there are several improvements in DX11 that will help you write a more efficient FFT. It may even be more desirable to start from scratch...

    You can find Microsoft's adaptation of OceanCS in this old blog post: https://blogs.msdn.microsoft.com/nat...mple-in-c-amp/

    In OceanCS.zip you'll find NVidia's EULA and some of the code that was copy/pasted into VaOcean. If you want to see OceanCS directly, you'll have to download Nvidia's GPU Computing SDK 4.0.

    Leave a comment:


  • replied
    Originally posted by EvoPulseGaming View Post

    A. You were going in the same direction.
    B. LensDistortion only helped with 1 of like 10 different problems
    C: This solved more issues than LensDistortion:
    http://rcaloca.blogspot.com/2017/05/...rs-to-ue4.html (up to 4.17)
    http://rcaloca.blogspot.com/2018/01/...o-ue4-v20.html (4.18,19)
    D: There were more issues with missing functions/values that no longer were allowed to be implied
    E: 4.18 didn't require an update
    F: 4.19 didn't really require an update, they just got picky about a missing implied function
    I have got it 4.17 aswell, was missing some includes and there was a mispelled function. About C, I have read RCaloca blog since when it came out and I have figured C from it too, but the issue is that besides him being Epic's employee, relying on a blog instead of a more accurate documentation is a shame. While long term professionals might know what to look for, the keywords for searching and so, novices at some degree with the engine, that already have exhausted the current material pipeline and are looking for something beyond that, would find a hard way to get into shader development.

    I have also followed this article series when it came out too, usefull in some cases (not updated on few changes thou): https://medium.com/@lordned/unreal-e...1-c47f2da65346

    Leave a comment:


  • replied
    Originally posted by NilsonLima View Post

    I felt asleep while reanding all the posts from the original thread yesterday, saw the videos for buoyancy but didn't see any comments on how to make it work. Will continue reading today and I will take a look on the 4.17 you uploaded, before touching anything, so I can at leat see if I was going to the same direction. I really want to try doing myself thou, since I want to be able to support future API changes, because as you saw it is a hard task to find information about the changes. The only quick guidance is the LensDistortion plugin Epic provides and that might not be 100% with all the things you might need.
    A. You were going in the same direction.
    B. LensDistortion only helped with 1 of like 10 different problems
    C: This solved more issues than LensDistortion:
    http://rcaloca.blogspot.com/2017/05/...rs-to-ue4.html (up to 4.17)
    http://rcaloca.blogspot.com/2018/01/...o-ue4-v20.html (4.18,19)
    D: There were more issues with missing functions/values that no longer were allowed to be implied
    E: 4.18 didn't require an update
    F: 4.19 didn't really require an update, they just got picky about a missing implied function

    Leave a comment:


  • replied
    Originally posted by EvoPulseGaming View Post
    NilsonLima I've uploaded VaOcean 4.17/18, and uploaded a 4.19 branch.

    I'm working on re-inserting the buoyancy component, so I can compare to the buoyancy component from the ocean project for speed vs accuracy
    I felt asleep while reanding all the posts from the original thread yesterday, saw the videos for buoyancy but didn't see any comments on how to make it work. Will continue reading today and I will take a look on the 4.17 you uploaded, before touching anything, so I can at leat see if I was going to the same direction. I really want to try doing myself thou, since I want to be able to support future API changes, because as you saw it is a hard task to find information about the changes. The only quick guidance is the LensDistortion plugin Epic provides and that might not be 100% with all the things you might need.

    Leave a comment:


  • replied
    NilsonLima I've uploaded VaOcean 4.17/18, and uploaded a 4.19 branch.

    I'm working on re-inserting the buoyancy component, so I can compare to the buoyancy component from the ocean project for speed vs accuracy
    Last edited by EvoPulseGaming; 03-11-2018, 03:51 AM.

    Leave a comment:


  • replied
    Anybody know where I can find full documentation? Settings guide etc?

    All I could find was the "How to add to your project" wiki page. Yet it's quite old... 2015

    Leave a comment:


  • replied
    Well, just figured I have left my video card operating at lower clock speeds on core and memory to simulate a GTX 1070, so I changed back to stock speeds, and comparing with Ocean Ultra now it is running minimum 25 FPS and max 35 FPS faster, so average 30 FPS which is good. There main material on the FFT ocean still not doing much, I have added some lerp for coloring, some SSS direct into material pin (not simulated), depth fade and got 347ps/136 vs, not shabby.

    Im using for now a disc shaped plane large enough to hit the horizon, with high triangle density in the middle and lower density as the radius increase, total 31K triangles. Idea is to put the plane to follow the camera next, but so far it is good.

    The visual from above is quite pleasant, even very far, so visually I like it. The Tessendorf technique for the middle ocean is great but I still don't like for the shore. I am following up the latest work released notes from Tessendorf and other techniques applied to it, particularly to the shore, so I might have a taste of what it looks like soon.

    Leave a comment:


  • replied
    Considering I am running it on a 6 year old mid/high range LAPTOP, it runs great. Also, 4.18 and 4.19 had rendering improvements. Particularly 4.19 with landscape tesselation lod. I haven't tested that part actually. (Setting the material for a landscape to ocean, I was just using the floor mesh)

    Also, mixing in the infinite plane feature should be considered for large bodies of water

    Leave a comment:


  • replied
    Im so tired I just want to die. Got only 4.16 working and I think I will just take a break and do something less terrible. I will take a look again in a week, enough time to reset my mind.

    EvoPulseGaming what did you think about the performance? Im not that satisfied still.

    Leave a comment:


  • replied
    VaOcean has been updated to 4.19

    So at this point I'll be focusing on cleaning up, and uploading to the github in my signature
    Last edited by EvoPulseGaming; 03-11-2018, 03:44 AM.

    Leave a comment:


  • replied
    Originally posted by EvoPulseGaming View Post

    Im at work, and likely won't be home or I'd just link you my reference, but SetGlobalBoundShaderState is depreciated. I believe this was a warning when you compiled 4.16. if you google that with POSInitializer you should find the git hub link that gives you an idea what needs to be changed (I removed 4 lines and added 6 or so)
    That piece of code and surroundings must be like:

    RHISetRenderTarget(TextureRenderTarget->GetRenderTargetTexture(), NULL); // this was the Clear, replaced like this

    // Be sure we're blending right without any alpha influence on Color blending
    ///////////////////////////////////////////////////////////////////////
    // pre 4.17: RHICmdList.SetBlendState(TStaticBlendState<>::GetRHI());
    TShaderMapRef<FQuadVS> QuadVS(GetGlobalShaderMap(GMaxRHIFeatureLevel));
    TShaderMapRef<FUpdateDisplacementPS> UpdateDisplacementPS(GetGlobalShaderMap(GMaxRHIFeatureLevel));

    FGraphicsPipelineStateInitializer GraphicsPSOInit;
    RHICmdList.ApplyCachedRenderTargets(GraphicsPSOInit);
    GraphicsPSOInit.DepthStencilState = TStaticDepthStencilState<false, CF_Always>::GetRHI();
    GraphicsPSOInit.BlendState = TStaticBlendState<>::GetRHI();
    GraphicsPSOInit.RasterizerState = TStaticRasterizerState<>::GetRHI();
    GraphicsPSOInit.PrimitiveType = PT_TriangleList;
    GraphicsPSOInit.BoundShaderState.VertexDeclarationRHI = GQuadVertexDeclaration.VertexDeclarationRHI;
    GraphicsPSOInit.BoundShaderState.VertexShaderRHI = GETSAFERHISHADER_VERTEX(*QuadVS);
    GraphicsPSOInit.BoundShaderState.PixelShaderRHI = GETSAFERHISHADER_PIXEL(*UpdateDisplacementPS);
    SetGraphicsPipelineState(RHICmdList, GraphicsPSOInit);
    // pre 4.17: static FGlobalBoundShaderState UpdateDisplacementBoundShaderState;
    // pre 4.17: SetGlobalBoundShaderState(RHICmdList, GMaxRHIFeatureLevel, UpdateDisplacementBoundShaderState, GQuadVertexDeclaration.VertexDeclarationRHI, *QuadVS, *UpdateDisplacementPS);
    ///////////////////////////////////////////////////////////////////////


    Now there is an issue with the ENQUEUE_UNIQUE_RENDER_COMMAND_THREEPARAMETER, but Im going to look at it tomorrow, Im tired.

    Leave a comment:

Working...
X