Search Unity

► Curved World 2 ◄

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

  1. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,140
    Check CustomShaders.pdf file inside Doc folder.
    Copy HLSL shader from ShaderGraph into .shader file. Integrate Curved World inside this .shader with one click.



    VacuumShaders - Facebook Twitter YouTube
     
  2. Nixellion

    Nixellion

    Joined:
    Jun 17, 2015
    Posts:
    4
    Thanks for quick reply!

    It would be great to have a one-click option to generate HLSL .shader file with integrated Curved World after clicking on the shadergraph source code file. This would make iterations a lot faster.
     
  3. 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:

  4. Arkhivrag

    Arkhivrag

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



    VacuumShaders - Facebook Twitter YouTube
     
  5. thund3rmonk3y

    thund3rmonk3y

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

    Allen0012

    Joined:
    Sep 5, 2009
    Posts:
    88
    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.

     
  7. Arkhivrag

    Arkhivrag

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



    VacuumShaders - Facebook Twitter YouTube
     
  8. Valera981

    Valera981

    Joined:
    Apr 22, 2014
    Posts:
    5
    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.
     
  9. Arkhivrag

    Arkhivrag

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

    AxonGenesis

    Joined:
    Jun 24, 2016
    Posts:
    6
    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?
     
  11. Arkhivrag

    Arkhivrag

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

    AxonGenesis

    Joined:
    Jun 24, 2016
    Posts:
    6
    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.
     
  13. Valera981

    Valera981

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

    josephsaade

    Joined:
    Apr 18, 2016
    Posts:
    41
    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
  15. Arkhivrag

    Arkhivrag

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

    josephsaade

    Joined:
    Apr 18, 2016
    Posts:
    41
    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
     
  17. Fyrburn

    Fyrburn

    Joined:
    Aug 30, 2013
    Posts:
    6
    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.
     
  18. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    413
    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
     
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,140
    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
  20. 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.
     
  21. Arkhivrag

    Arkhivrag

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



    VacuumShaders - Facebook Twitter YouTube
     
  22. 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. }
     
  23. Arkhivrag

    Arkhivrag

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

    JamesThornton

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

    Thanks

    Edit: Works great! (runner version) Good asset
     
    Last edited: Aug 31, 2019
  25. 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?
     
  26. Arkhivrag

    Arkhivrag

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

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    651
    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 at 10:35 AM