Search Unity

► Curved World ◄

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

  1. thund3rmonk3y

    thund3rmonk3y

    Joined:
    Sep 13, 2015
    Posts:
    2
    I'm having a problem with the Unity Terrain clipping when it extends over the horizon. I've tried tweaking the Curvature size, camera distance, FOV, and Clipping Planes. I've included a gif to demonstrate. You can really see it when a mountain appears or disappears on the horizon. It leaves a gap in the mesh. Any suggestions?
     

    Attached Files:

  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Check ReadMe file in the Doc folder. Last page, describing Mesh disappearing or early culling problem.



    VacuumShaders - Facebook Twitter YouTube
     
  3. thund3rmonk3y

    thund3rmonk3y

    Joined:
    Sep 13, 2015
    Posts:
    2
    Yes! That was the solution! Thank you for your quick response!
     
  4. Allen0012

    Allen0012

    Joined:
    Sep 5, 2009
    Posts:
    93
    I cannot get the point light halo shader working.

    I have tried changing the built-in halo shader to the custom Curved Standard which doesn't work at all, and also manually modifying a copy of the Unity's built-in halo shader with addition of CURVED_WORLD_TRANSFORM_POINT with no luck.

    Here's the result I get by editing the built-in shader based on the CustomShaders.pdf doc.

     
  5. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Update point lights position using Follow script.
    No need to modify halo shaders.



    VacuumShaders - Facebook Twitter YouTube
     
  6. Valera981

    Valera981

    Joined:
    Apr 22, 2014
    Posts:
    12
    Hello. I have problems with Android build. Objects become invisible If I appoint "VacuumShaders\Curved World\Shaders\Standard\Standard.shader" shader to these objects. And Android build gets stuck when I add shader to "Always Include Shaders" list. In PC version and Unity editor everything is ok.
     
  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Standard shader may be too 'heavy' for android and it fails to compile.
    In "Always Include Shaders" array include Fallback shaders, they are defined inside .shader file (check last lines).
    For Standard shader it is VertexLit/Diffuse shader from VacuumShaders\Curved World\Shaders\VertexLit folder.



    VacuumShaders - Facebook Twitter YouTube
     
  8. AxonGenesis

    AxonGenesis

    Joined:
    Jun 24, 2016
    Posts:
    90
    I was wondering if anyone has a version of Unity's Skybox Procedural shader updated to work with Curved World? I've made an attempt but I'm getting weird stretching and anomalies so I must be applying the CW transform functions incorrectly.

    Forum won't let me include the link here, but you can find the shader source code for the unity built-in Skybox Procedural shader on github. I followed the instructions and examples and it runs, but does not curve or change the horizon and introduces gradient artifacts. The shader is fairly complex so maybe not as straightforward to convert as others.

    Alternatively, is there another procedural sky that does work with Curved World?
     
  9. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Curved World is a mesh vertex transformation shader.
    Skybox is not a mesh.
    I even can not imagine what you expect for example from Spiral bending effect applied to a Skybox. Or what must happen with it if using Runner bending with always 'going down'?

    Depending on your game, you have to design your own Skybox shader to reflect world transformation.



    VacuumShaders - Facebook Twitter YouTube
     
  10. AxonGenesis

    AxonGenesis

    Joined:
    Jun 24, 2016
    Posts:
    90
    Thanks for your response. I can get the effect I need by simply using a texture mapped onto a huge sphere, but I'm not finding any procedural sky solutions that work this way. Perhaps there is a gradient shader that will work, otherwise I will probably have to create my own. If I come up with a good solution I'll post it here.
     
  11. Valera981

    Valera981

    Joined:
    Apr 22, 2014
    Posts:
    12
    Thank you for your answer. I will try.
     
  12. josephsaade

    josephsaade

    Joined:
    Apr 18, 2016
    Posts:
    46
    Hello, I just imported the package into my project hat has Lightweight renderer.
    I opened the ReadMe file and there is no mention of "Lightweight" so I tried to open the Runner Scene like ReadMe says but all materials/shaders are messed up. Anything specific I can do?

    Edit: I re-imported all materials as lightweight and I can at least see the textures now in the tutorial scene but bending is not working.

    Edit 2: I do not see any lightweight shader in the project so While your comment say they are fully supported, they do not seem to be supported.
     
    Last edited: Jul 31, 2019
  13. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    LWRP shaders require Unity 2019.1 (or later version).
    Before importing asset make sure project is fully setup and uses Lightweight RP 5.0 (or later).




    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Jul 31, 2019
  14. josephsaade

    josephsaade

    Joined:
    Apr 18, 2016
    Posts:
    46
    As I am using 2018 I decided to go back to standard.

    The game + curvature works fine if in my endless runner the player/camera are static and I am just moving the world around them.

    but I I am moving the player, it seems the camera misbehaves at certain angles (when the player curves with the shader). I am doing this with origin reset so I do can have trail renderer. In any case, I will try to find an alternative. Thanks
     
  15. Fragment1

    Fragment1

    Joined:
    Aug 30, 2013
    Posts:
    67
    Hey folks, I haven't bought this package yet but it looks really promising for my project. My question, is there any dynamic decal package for the standard render pipeline that plays nice with it?

    I want to place a decal on my "flat" world and have it curve with the world.
     
  16. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    Hi, I was wondering, how would one go about having multiple scenes using varying modes of curved shader? Such as one with little planet and anther scene with cylindrical tower? Thx
     
  17. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Bend type is defined in CurvedWorld_Base.cginc file and all shaders use it.

    If you need multiple bend types, you have to declare them inside shader using #pragma multi_compile in all passes and sub-shaders.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Aug 20, 2019
  18. Saul15

    Saul15

    Joined:
    Aug 22, 2019
    Posts:
    2
    hi, how can i access to the curvature size of the Curve World_Controller from another script?
    i´m trying to create a smooth transition in the size parameter of a little planet.
     
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Check API.pdf file inside Doc folder.
    Get scene's current CurvedWorld_Controller.current variable and modify all desired parameters.



    VacuumShaders - Facebook Twitter YouTube
     
  20. Saul15

    Saul15

    Joined:
    Aug 22, 2019
    Posts:
    2
    hi! what im missing here?.
    i get a nullReferenceException.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using VacuumShaders.CurvedWorld;
    5.  
    6.  
    7. public class unvend : MonoBehaviour
    8. {
    9.     static public CurvedWorld_Controller current;
    10.  
    11.     // Start is called before the first frame update
    12.     void Start()
    13.     {
    14.         current = GetComponent<CurvedWorld_Controller>();
    15.     }
    16.  
    17.     // Update is called once per frame
    18.     void Update()
    19.     {
    20.        current.SetCurvature(.2f);
    21.     }
    22.  
    23. }
     
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    No need in making CurvedWorld_Controller variable.
    Just use CurvedWorld_Controller.current in your script anywhere and you will get reference to the scene's active controller (scene must contain one such controller).



    VacuumShaders - Facebook Twitter YouTube
     
  22. JamesThornton

    JamesThornton

    Joined:
    Jun 26, 2015
    Posts:
    52
    Hello! Does this work with VR?

    Thanks

    Edit: Works great! (runner version) Good asset
     
    Last edited: Aug 31, 2019
  23. magic9cube

    magic9cube

    Joined:
    Jan 30, 2014
    Posts:
    58
    Hi,

    I'm plugging this into some procedural mesh using megasplat and seeing the pink ghost mesh as below;

    curved-world-megasplat-issue-1.png

    Ive also noticed this does not apparently work well with triplanar mapping with megasplat. The textures slide across the mesh. Is there any way to fix that?
     
  24. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    May be it is better to ask this question on MegaSplat forum, because I do not see the problem with Curved World asset here.



    VacuumShaders - Facebook Twitter YouTube
     
  25. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    Just bought the Curved world - Classic Runner and it seems there is something very wrong as I'm following the Tutorial Runner but nothing seems to match up.
    I have a working Android LWRP project in which I imported the LWRP unitypackage of the asset. Looking at even step 1 of the readme pfd does show the correct axis setting but all other settings are marked 'excluded'.
    Trying to add the component 'CurvedWorld_Controller' to the gameobject with the same name in the scene isn't possible as there doesn't seem to be any component with that name.

    Please advice on how to proceed. Working with Unity 2019.2.3f1 on Windows.

    Got it working: please state in your documentation you should search for the component 'controller' or use the menu structure of the component button. Or some friendly advice: call the component as they are available this to avoid end-user confusion.
     
    Last edited: Sep 15, 2019
  26. yucolab

    yucolab

    Joined:
    Nov 28, 2018
    Posts:
    1
    Hello this is a presales question, would like to know how the KvantTunnel works, can we predefine a path for it to curve towards the left or right?
     
  27. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    303
    Hi I asked this on the Amplify Shader forum, but they told me to ask here instead.

    I want to use Curved World with LWRP and Amplify Shader... Amplify's guide here doesn't seem to work exaclty with the newest versions of both plugins and LWRP.

    So I made my own template to add the dependency to Curved World ( I couldn't do it with the Canvas Window)



    I also added the custom function but the "V_CW_TransformPointAndNormal()" method doesn't seem to exist anymore, so I looked into the Unlit.shader LWRP example included with Curved World and found this line



    So I added the line 100 to my function "CURVED_WORLD_TRANSFORM_POINT" just replaced the input.positionOS for v.vertex as declared on the struct "GraphVertexInput" by the Amplify Template

    and it "Kinda works" it does in fact bends the vertices but it throws some errors



    This is my Graph



    this is the function



    What could I've been missing? I think I almost got it.
     
  28. summerian

    summerian

    Joined:
    Jul 6, 2014
    Posts:
    140
    Thanks for a great assets!

    I hope this is not a stupid question but:
    I was wondering of there is a way to keep the coordinate system in a flat world and have the view only be curved?
    So if I were to move my camera in a straight line it wouldn't clip through the curved world but instead follow it around the curve.

    Thanks again
     
  29. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    "predefine" is subjective. In KvantTunnel example video is used Classic Runner bend type, it has controls for Up/Down and Left/Right bending.


    What Unity version do you use and LWRP version?


    Try camera as pivot point inside CurvedWorld_Controller script.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Sep 30, 2019
  30. summerian

    summerian

    Joined:
    Jul 6, 2014
    Posts:
    140
    Perfect. Thanks!
     
  31. Damo9000

    Damo9000

    Joined:
    Nov 4, 2015
    Posts:
    7
    Does this plugin support VR?
     
  32. Romaleks360

    Romaleks360

    Joined:
    Sep 9, 2017
    Posts:
    73
    Just to clarify: does Curved World - Classic Runner shader write to the depth buffer, so I can use AO with it? Can it not cast shadows but still write to depth buffer? Which shader do I need exactly for this?
     
  33. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Yes.


    You can use AO.
    If do not need shadows, then disable it from MeshRenderer.



    VacuumShaders - Facebook Twitter YouTube
     
  34. OTD2-CM

    OTD2-CM

    Joined:
    Aug 26, 2019
    Posts:
    2
    Hi there,

    I think I need help with Vertex shader. Vertex shading is getting distorted right after pivot point.
    Is there a way to fix this?

     
    Last edited: Oct 9, 2019
  35. Romaleks360

    Romaleks360

    Joined:
    Sep 9, 2017
    Posts:
    73
    Seems that AO doesn't work with Unlit shader. Is there a way to fix this?
     
  36. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Make sure mesh has tangents.



    Inside GraphicsSettings change Depth Normals shader and use included one from Curved World\Shaders\Internal folder.



    VacuumShaders - Facebook Twitter YouTube
     
  37. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    303
    For that I was Using

    Unity: 2019.2.5f1
    LWRP: 6.9.0


     
  38. taichis

    taichis

    Joined:
    Nov 14, 2014
    Posts:
    1
    Hello.
    I want to adjust the Render Queue with the VacuumShaders/ Curved World/Standard shader.
    Can you adjust with Inspector?
    Thank you.
     
  39. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    If there is such controller in material editor then yes.
    If no, try modify it from script.



    VacuumShaders - Facebook Twitter YouTube
     
  40. CogStudioAdmin

    CogStudioAdmin

    Joined:
    Dec 12, 2016
    Posts:
    2
    Hi is there any progress on curving text mesh pro (tmp)?
     
  41. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Import TextMesh Pro shaders from Curved World settings window.



    VacuumShaders - Facebook Twitter YouTube
     
  42. CogStudioAdmin

    CogStudioAdmin

    Joined:
    Dec 12, 2016
    Posts:
    2
    Thanks!, I missed importing that for some reason.
     
  43. stechmann

    stechmann

    Joined:
    Feb 24, 2012
    Posts:
    34
    Will this work with VR?
     
  44. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
  45. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    I might find solution.
    Problem is not only with Curved World when using within Amplify Shader Editor but with any custom dependent function.

    Solution is to slightly modify Amplify template file.

    Whenever you add additional directives to Amplify Shader Editor, it adds them before core library files and as a result method and variables used in your custom file and depending on core library become unknown to the final generated shader.
    upload_2019-10-23_15-27-13.png

    In the case of Curved World is the same problem, matrices and variables used there require core library files to be included first.
    You just have to move declaration of CurvedWorld_Base.cginc file below default core files.
    upload_2019-10-23_15-25-56.png


    Or modify Amplify Shader template file and avoid hand modifications.
    Check template shader file and move all /*ase_pragma*/ line below core library files declarations:
    upload_2019-10-23_15-36-38.png

    Note, /*ase_pragma*/ is declared in several places inside file, move them all down!


    Now you can call methods from custom directives:
    upload_2019-10-23_15-41-16.png



    VacuumShaders - Facebook Twitter YouTube
     
    daville likes this.
  46. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    303
    Thanks :D
     
  47. ZeroDarkTwenty

    ZeroDarkTwenty

    Joined:
    Dec 10, 2018
    Posts:
    1
    Hi, I just downloaded this asset and from the examples and videos I've seen, it looks like it can accomplish exactly what I'll need for my game. I'm trying to simulate a player moving through a planet that would look similar to the classic runner example. I have several questions that I hope you can answer. I'm almost certain that these are all going to be noob questions but I'm stuck on how to proceed.

    1. When I deploy this game on my iPhone, it seems to be locked in the left direction and I can't change it which I think is because it was designed for the PC. What direction should I be looking in to keep the curve locked center and downwards?

    2. Assuming I'm able to lock the bending to the center and downward, how would I implement a control that stops the scene from moving automatically but only when the user swipes up or down? For example, the curve would move forward if the user swipes upward and backwards if the user swipes downward?

    3. Is there a special way I should design my assets so that they'll bend the right way?

    If none of these questions make sense or are too vague, what I'm trying to do is something like this:


    Does this look like something the asset can do?
     
  48. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Curved World is not designed for PC, it is a shader bending effect designed for all type of devices.
    Effect from example video can be achieved both with Classic Runner and Little Planet bending styles.
    Curvature strength and directions are controller in run-time using CurvedWorld_Controller script. In example scenes you can check how keyboard is used to send events to the CurvedWorld_Controller script to modify curvature.



    VacuumShaders - Facebook Twitter YouTube
     
  49. AHFontaine

    AHFontaine

    Joined:
    Aug 3, 2017
    Posts:
    19
    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.
     
  50. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    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.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020