User Tag List

Page 2 of 2 FirstFirst 12
Results 41 to 58 of 58

Thread: WaveWorks Infinite Ocean Planes

  1. #41
    0
    N8128, Thank you so much for a more thorough explanation on the issue! This will help greatly and hopefully anyone else that comes after us to save them a load of time tracking down this issue. We where suspecting it had something to do with that new ::NeedsLoadForClient() function but where dumb founded as to why it was happening and its nice to get an explanation on why the cooker is stripping out the assets. It all makes more sense now why it had been happening in the 4.12.5 build and not in the 4.9.2 builds.

    So I'm starting to assume that the ::NeedsLoadForClient() function can't be overwritten just for the MaterialExpressionWaveworks.h because all the other expressions run the same check and fail and strip out on cook as well? So now I also see and understand why you are saying we have to change it on a global scale at the root level for UMaterialExpression.

    Code:
    bool UMaterialExpressionWaveWorks::NeedsLoadForClient() const
    {
        // We need the asset cooked
        return true;
    }

  2. #42
    0
    Supporter
    Join Date
    Dec 2014
    Posts
    3
    Quote Originally Posted by N8128 View Post
    No problem. I know what you're talking about, your WaveWorks expressions get stripped in 4.12.5, I'll just copy/paste my part of the email dialog with NVIDIA in October:

    "First, it took me a while to figure out why WaveWorks is not working in the packaged game, after seeing that there are MaterialExpressions missing in the ocean shader (that's using WaveWorks) when debugging packaged game,
    I searched UE4 release notes and found this: "New: Material expression objects that are not required in cooked build will now be stripped from cooked packages.". Since I clearly needed all stripped expressions in ocean material, there had to be a problem.
    Indeed it was, in the file (UE4 project) "MaterialExpressions.cpp" there are multiple new overriding methods that start with "NeedsLoadFor..." these return true is something (like material expression, material function call etc.) is needed in a certain context (Client, Server) or false if is not.
    My problem was caused by "bool UMaterialExpression::NeedsLoadForClient() const" that stripped my WaveWorks expression because it assumes that "Expressions that reference texture objects need to be cooked" the WaveWorks expression does not DIRECTLY reference texture object and therefore it gets stripped and breaks the material,
    which triggers a series of events that totally disable WaveWorks.

    Quick fix is to just always return true in these functions. I ended up adding "bool NeverStrip;" to UMaterialExpression and then returning true if(expression has texture reference or NeverStrip is true), so that you can check that in the material editor for situations like this."

    Follow the above and it should fix your 4.12.5 problem.
    I have fixed the wave works material expression being cooked out by returning true in NeedsLoadForClient(), but the wave works asset still will not show in a cooked build. The cooked build crashes after a "random" amount of time somewhere in either an nvidia dll, or D3D11 itself. This leads me to believe some wave works RHI or other render resource is not being setup correctly during cooked build execution. Any other tips you can provide?

  3. #43
    0
    Quote Originally Posted by DigiTecK3D View Post
    N8128, Thank you so much for a more thorough explanation on the issue! This will help greatly and hopefully anyone else that comes after us to save them a load of time tracking down this issue. We where suspecting it had something to do with that new ::NeedsLoadForClient() function but where dumb founded as to why it was happening and its nice to get an explanation on why the cooker is stripping out the assets. It all makes more sense now why it had been happening in the 4.12.5 build and not in the 4.9.2 builds.

    So I'm starting to assume that the ::NeedsLoadForClient() function can't be overwritten just for the MaterialExpressionWaveworks.h because all the other expressions run the same check and fail and strip out on cook as well? So now I also see and understand why you are saying we have to change it on a global scale at the root level for UMaterialExpression.

    Code:
    bool UMaterialExpressionWaveWorks::NeedsLoadForClient() const
    {
        // We need the asset cooked
        return true;
    }
    You are correct about doing it only in WaveWorks, it will break other expression because they are not linked to any valid texture reference, so the same check fails as you've said. I've planned on replying to point out the specifics on doing this, but you figured it out before, so glad it helped!

    Quote Originally Posted by Avicr View Post
    I have fixed the wave works material expression being cooked out by returning true in NeedsLoadForClient(), but the wave works asset still will not show in a cooked build. The cooked build crashes after a "random" amount of time somewhere in either an nvidia dll, or D3D11 itself. This leads me to believe some wave works RHI or other render resource is not being setup correctly during cooked build execution. Any other tips you can provide?
    The crash is caused by parallel renderer, here's my solution, taken from another email of mine:

    "The reason was that in UE 4.12, Epic changed randerer to issue draw calls in parallel by default: "New: Changed PC to default to parallel rendering when not in editor.". This change is in "WindowsPlatform.h" the "#define PLATFORM_RHITHREAD_DEFAULT_BYPASS 1" changed to "#define PLATFORM_RHITHREAD_DEFAULT_BYPASS WITH_EDITOR" this propages to console variable "CVarRHICmdBypass" in "RHICommandList.cpp" and undirectly enables parallel algorithms. I just use console command "r.RHICmdBypass" and set it to 1 to disable parallel algorithms as was the default until now. I've encountered this before and that helped me a lot to figure this one out. "

    So to sum it up. Go to "\Engine\Source\Runtime\Core\Public\Windows\WIndowsPlatform.h" and change "#define PLATFORM_RHITHREAD_DEFAULT_BYPASS WITH_EDITOR" to "#define PLATFORM_RHITHREAD_DEFAULT_BYPASS 1" OR probably even better, leave it as it is and change this in the config files or in blueprints with command "r.RHICmdBypass 1", the important thing is that you turn off the parallel renderer before WaveWorks gets initialized and used. Hope it helps!

  4. #44
    0
    Does 4.13_Preview_nvdia_techs contain Waveworks? or 4.12.5_nvdia_techs contain it ?

  5. #45
    0
    N8128 As always thank you for the invaluable information!

    Tx_Loser - 4.13 does not have any of the waveworks tech in it, at the moment it looks to be only in the 4.12.5 branch. But if you extract out only the waveworks integration you should be able to move it up to the 4.13 branch.

  6. #46
    0
    Quote Originally Posted by DigiTecK3D View Post
    N8128 As always thank you for the invaluable information!

    Tx_Loser - 4.13 does not have any of the waveworks tech in it, at the moment it looks to be only in the 4.12.5 branch. But if you extract out only the waveworks integration you should be able to move it up to the 4.13 branch.
    Thanks! But I want to know how use waveworks in the 4.12.5. I did found any project about waveworks,I download waveworks branch and open the project, found the plane and the material is black!

  7. #47
    0
    Tx_Loser, I see what your saying now, it took me a sec to understand how to set it all up since there really is no documentation how on to use it or set it up. Also it is very basic and not a fully setup system, all those aspects have to be on you and what you want to do with it. I.E.. the material shader is there for the ocean rendering etc... But here is a basic setup on how to work with waveworks.

    For the waveworks to work you will need three assets at bare minimum, which includes making the waveworks
    asset that houses all the settings for the ocean settings and the waveworks material with a waveworks node
    referencing the waveworks asset and also a new blueprint with the waveworks infinite ocean system.
    Name:  WaterOceanMaterialAssets.JPG
Views: 349
Size:  14.5 KB

    You need to make a new material for your ocean that will have a waveworks node in it and this node will reference
    the waveworks asset and must have a texture coord in the uv's to work.
    Name:  WaterOceanMaterial_00.JPG
Views: 355
Size:  57.8 KB

    Along with the waveworks node and asset, the shader must have the flat tessellation enabled so the material will
    activate the waveworks rendering. If not the material will not work.
    Name:  WaterOceanMaterial_01.JPG
Views: 348
Size:  14.2 KB

    You need to make a new blueprint actor and when you have it created add a new waveworks component. This is
    what is the quadtree system for the infinite ocean plane.
    Name:  WaterOceanBlueprint.JPG
Views: 349
Size:  36.5 KB

    Once you have the blueprint with the new waveworks component then you need to assign the waveworks material
    to the waveworks component so the infinite ocean plane can render the mesh.
    Name:  WaterOceanMaterial.JPG
Views: 344
Size:  31.5 KB
    Last edited by DigiTecK3D; 12-27-2016 at 11:27 AM.

  8. #48
    0
    Thanks so much

  9. #49
    0
    Quote Originally Posted by DigiTecK3D View Post
    Tx_Loser, I see what your saying now, it took me a sec to understand how to set it all up since there really is no documentation how on to use it or set it up. Also it is very basic and not a fully setup system, all those aspects have to be on you and what you want to do with it. I.E.. the material shader is there for the ocean rendering etc... But here is a basic setup on how to work with waveworks.

    For the waveworks to work you will need three assets at bare minimum, which includes making the waveworks
    asset that houses all the settings for the ocean settings and the waveworks material with a waveworks node
    referencing the waveworks asset and also a new blueprint with the waveworks infinite ocean system.
    Name:  WaterOceanMaterialAssets.JPG
Views: 349
Size:  14.5 KB

    You need to make a new material for your ocean that will have a waveworks node in it and this node will reference
    the waveworks asset and must have a texture coord in the uv's to work.
    Name:  WaterOceanMaterial_00.JPG
Views: 355
Size:  57.8 KB

    Along with the waveworks node and asset, the shader must have the flat tessellation enabled so the material will
    activate the waveworks rendering. If not the material will not work.
    Name:  WaterOceanMaterial_01.JPG
Views: 348
Size:  14.2 KB

    You need to make a new blueprint actor and when you have it created add a new waveworks component. This is
    what is the quadtree system for the infinite ocean plane.
    Name:  WaterOceanBlueprint.JPG
Views: 349
Size:  36.5 KB

    Once you have the blueprint with the new waveworks component then you need to assign the waveworks material
    to the waveworks component so the infinite ocean plane can render the mesh.
    Name:  WaterOceanMaterial.JPG
Views: 344
Size:  31.5 KB
    Thanks so much!

  10. #50
    0
    Veteran
    Join Date
    Jul 2015
    Posts
    400
    Is this wave geenerator run just by a blueprint ?
    i need waves in my game for some of the planets.

  11. #51
    0
    If you are using a UE4 Build that has the Nvidia waveworks integrated into it, then yes you setup the wave generator in this fashion by using a blueprint setup.

  12. #52
    0
    Could anyone please post minimal working project using WaveWorks.

  13. #53
    0
    Are you using the 4.12 Galaxyman waveworks build?

  14. #54
    0
    Quote Originally Posted by TX_LOSER View Post
    Thanks! But I want to know how use waveworks in the 4.12.5. I did found any project about waveworks,I download waveworks branch and open the project, found the plane and the material is black!
    Excuse me, can you tell me how to extract out only the waveworks?

  15. #55
    0
    Quote Originally Posted by TX_LOSER View Post
    Excuse me, can you tell me how to extract out only the waveworks?
    Tx_Loser, This isn't exactly a very quick and simple thing to do exactly. I had to go back to the Galaxyman engine drop with waveworks,hairworks and the various nvidia tech in it for the 4.12 version and get a blank engine 4.12 and difference the two engines to pull out the difference and then extract out all the waveworks code. Which involved also cleaning out the various other nvidia tech I didn't need since I was only concerned with waveworks code. Then integrating the isolated waveworks code into our blank work engine 4.12 version for the project we needed to have water in.

    Recently one of our lead tech artist took that isolated code and had to integrate it up to 4.14 for us and from talking to him that also had some issue do to with some rendering and file location changes so he had to find those differences and put them in the proper location and adjust for rendering changes. Wasn't a lot of changes, but enough that it was still more work on top to maintain waveworks.

  16. #56
    0
    Thanks a lot !
    Last edited by TX_LOSER; 03-20-2017 at 11:30 AM.

  17. #57
    0
    Quote Originally Posted by DigiTecK3D View Post
    Tx_Loser, This isn't exactly a very quick and simple thing to do exactly. I had to go back to the Galaxyman engine drop with waveworks,hairworks and the various nvidia tech in it for the 4.12 version and get a blank engine 4.12 and difference the two engines to pull out the difference and then extract out all the waveworks code. Which involved also cleaning out the various other nvidia tech I didn't need since I was only concerned with waveworks code. Then integrating the isolated waveworks code into our blank work engine 4.12 version for the project we needed to have water in.

    Recently one of our lead tech artist took that isolated code and had to integrate it up to 4.14 for us and from talking to him that also had some issue do to with some rendering and file location changes so he had to find those differences and put them in the proper location and adjust for rendering changes. Wasn't a lot of changes, but enough that it was still more work on top to maintain waveworks.
    I have saw an update in waveworks, and I compare waveworks branch with UE4.15 , the github display able to merge . So, does it support ue4.15? If i want merge several nvidia branch, can only click creat pull request?

  18. #58
    0
    Update for Unreal 4.15 is pretty sweet.. has interaction and wave action with the coast line.. This was their update for GDC this year

    Co-Chair of the IGDA Virtual, Augmented, and Mixed Realities Special Interest Group
    www.jamietelford.com

Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •