Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

► Curved World 2 ◄

Discussion in 'Assets and Asset Store' started by Arkhivrag, Jul 28, 2015.

  1. AHFontaine

    AHFontaine

    Joined:
    Aug 3, 2017
    Posts:
    6
    Hi, I'm trying to integrate Curved World to a water asset (Lux Water). I read from the custom API documentation that I should add it in the vert pass. However, going through the core code for it, the only spot I got without getting a compiling issue does absolutely nothing. Maybe it has to do with the fact that water assets usually have vertex displacement for the waves.
    What would be the best course of action? Should I assume it doesn't work?

    Also, don't know if it was already mentioned but the import feature has issues with the namespace when converting (tried with Water from standard assets) and include paths (most particularly with KvantLattice/KvantTunnel). I got it to work after fixing the code but it's a tad annoying.
     
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,191
    I do not use Lux Water, but if shader has per-vertex modifiers (wind, vertex displace), then Curved World transformation must be applied after that, like SpeedTree shader does.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Nov 3, 2019
  3. summerian

    summerian

    Joined:
    Jul 6, 2014
    Posts:
    128
    Does this work with universal rendering pipeline or only standard and lightweight?
     
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,191
  5. Max_Bol

    Max_Bol

    Joined:
    May 12, 2014
    Posts:
    123
    I'm currently working with Curved World and I got to say that it's really useful for what I'm aiming for.
    Here's a preview of what it looks like :
    PreviewGraphics_Dine&Rush.png

    I think that Curved World is the best lightweight solution for my project since most of the game is shown from an angle of view that, normally, would requires a lot of work and assets for the background due to the fact that, in Unity, the world is generally flat. Most of the practices when it comes to managing the background "world" is usually about faking things out, but it's always sort of a waste of memory when it comes to its actual value on gameplay and, since my project is targeting 3.0 mobile devices (can't go below that because of the interpolators limits)

    My 2 biggest difficulties when I implemented the Snow shader-based effect was:
    1) Finding a way to add more onto a shader that is already close to its textures interpolators limit.
    2) Making sure the World Curve + JMO Toony Color Pro Shaders works with my own additions.

    Surprisingly, it took me only about 8 hours of non-stop tests & error to reach an acceptable result.
    I actually completely restarted my attempts 4 times because I couldn't point out what was breaking the shader at some points. (At one point, the outline was destroyed. At another the Curved World failed. At another the snow was pilling up from a wrong angle or the normal map wasn't affecting the snow properly. etc.)

    But, now, things are working properly and I'm finally moving forward. :D

    Thanks a lot for your hard work on Curved World as well as offering such a quality of services & assistance that allowed not only us, "users", but also other tools from the asset store to work properly out-of-the-box with this awesome tool!

    The strangest part of this, for me, will be about handling the physics.
    I understand that the whole Curved World process is all an view illusion, it whenever it's active it does affect the position of the vertex in the editor scene. At one point, I forgot to turn it off and the collision box of the parts I was working on was not right. As I was about to adjust it back, I remembered that it might be related to CW and... it was the case. If I wasn't "me" who worked on the level design alone, someone else could have made a really big mistake of adjusting the collisions while the plugin is active and then, later, wondering how that came to be.
     
    Arkhivrag likes this.
  6. Kiragan

    Kiragan

    Joined:
    Jan 8, 2016
    Posts:
    12
    Assets/VacuumShaders/Curved World/Shaders/Lightweight RP/Editor/ParticlesLitShader.cs(7,44): error CS0246: The type or namespace name 'BaseShaderGUI' could not be found (are you missing a using directive or an assembly reference?) Снимок экрана 2019-11-14 в 22.13.58.png Снимок экрана 2019-11-14 в 22.14.09.png
     
  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,191
    Unity Editor version?
    LWRP version?

    Just tested with Unity 2019.2.9f1 and LWRP 6.9.2, works without errors.

    BaseShaderGUI is part of Unity Editor and I do not understand why it gives error, may be some of your project files over-wrote it.
    Can you try package in a fresh clear project?

    Suggestion: You have selected error that is the last in Console window, instead check the first error, it is in the bottom of that list. If you fix it all errors above it may be fixed too.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Nov 15, 2019
  8. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    149
    Hi,
    I'd like to know state of this reply as HDRP is out of experimental in 7.x
     
  9. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,191
    I need to wait for official release first to know what API I'll have to work with.



    VacuumShaders - Facebook Twitter YouTube
     
  10. deadlycrow

    deadlycrow

    Joined:
    Feb 10, 2014
    Posts:
    122
    Hey, how can i implement the curved world module in ASE (amplify shader editor) ??? i already did it just the way it's in the docs, and is not working at all, it gives an error of "invalid subscript for "normal" at line ......" the thing is the custom expression "V_CW_TransformPointAndNormal(v.vertex, v.normal,v.tangent);" is failing at the "v.normal" part... what can i do?
     
  11. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,191
    If using with SRP try this solution.



    VacuumShaders - Facebook Twitter YouTube
     
  12. deadlycrow

    deadlycrow

    Joined:
    Feb 10, 2014
    Posts:
    122
    i will try and let you know :D
    -------------------------------------------------------EDIT
    I opened the file in VS, also the template, and the #include line was already in the right place but the error is still there :/, right now i'm only working with the "TransformPoint" function, because i can't make "TransformPointAndNormal" to work :/. Could it be perhaps that this code "V_CW_TransformPointAndNormal(v.vertex, v.normal,v.tangent);" is asking for v.normal and v.tangent and i've noticed that for some reason ASE now gives that data with this name v.vertex, v.ase_normal and v.ase_tangent ????? or not? i'm so confused hahaha.

    ALSO, grass is not working with the LWRP terrain shader that comes with CW :/// (not in editor, game view and compilation)

     
    Last edited: Nov 21, 2019
  13. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,191
    V_CW_TransformPointAndNormal method requires vertex, normal and tangent variables. Name of variables does not matter, use those that AE offers.

    As for terrain grass, unfortunately currently in LWRP Unity does not allow changing/over-writing it and I can do nothing. As soon as Unity gives such opportunity it will be implemented in Curved World again.



    VacuumShaders - Facebook Twitter YouTube
     
  14. deadlycrow

    deadlycrow

    Joined:
    Feb 10, 2014
    Posts:
    122
    Awesome! so for the moment i will just go for 3D planes :), regarding the initial problem, i've changed those names for the ones ASE offers, but there is still an error :(


     
  15. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,191
    Compiler error says that there is no variable with ase_tangent name.
    If there is no tangent variable available with AE, then just use V_CW_TransformPoint(v.vertex) method.



    VacuumShaders - Facebook Twitter YouTube
     
  16. deadlycrow

    deadlycrow

    Joined:
    Feb 10, 2014
    Posts:
    122
    Thank you :) !! going for that approach then :D !
     
  17. Elin42

    Elin42

    Joined:
    Oct 21, 2014
    Posts:
    19
    Hi Arkhivrag
    I love your tool. I bought it a couple of years ago and i'm really happy how much it has grown.
    I was thinking about a little VR Project (first just as a small demo for the quest) but I had some problems rendering clear flags on the right eye correctly and maybe you can give me a hint what I need to change to get it rendering correctly?
     
  18. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,191
    Tested on Oculus Rift and found no problems with clear flags.

    Note, Curved World is vertex displace instruction that can be implemented into any shader and in your case problem may be in particular shader (or test device, or something other).
    Try other shaders, package includes Standard and Legacy shaders. Do they have the same problem?



    VacuumShaders - Facebook Twitter YouTube
     
  19. Elin42

    Elin42

    Joined:
    Oct 21, 2014
    Posts:
    19
    Oh
    Looks like it was just with the cylindrical. The tiny planet works without any problems.