Search Unity

► Curved World ◄

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

  1. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Curved World is a shader. Use it on all objects you want to be bent.
    For controlling curvature use CurvedWorld_Controller script (one script per-scene).



    VacuumShaders - Facebook Twitter YouTube
     
  2. E_T_

    E_T_

    Joined:
    May 14, 2018
    Posts:
    19
    Thank you for the reply. Being so new to this, I really do need more specific help. If I create a terrain in Gaia, what would I need to do to achieve the small world look when moving around the terrain?
     
  3. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    From Curved World's settings window import Unity Terrain and Nature shaders. Create new material with Curved Worl/Terrain shader and inside Unity Terrain settings change material type from Built-in to custom, use new created material.



    VacuumShaders - Facebook Twitter YouTube
     
  4. raycool

    raycool

    Joined:
    Mar 21, 2015
    Posts:
    2
    Hi, i purchased Curved World last year and i love it, i am using it in one of my projects since then (its a mobile game), yersterday i updated Unity to 2018.1 and updated Curved World to the last version too, and i had problems when compiling to Android, the console shows those errors:
    --------------------------------------------------------------------------------------------------------------------------------------------------------
    Shader error in 'VacuumShaders/Curved World/U5 Standard/Standard': '_LightCoord' : no such field in structure at Assets/VacuumShaders/Curved World/Shaders/cginc/CurvedWorld_UnityStandardCore.cginc(419) (on gles)

    Compiling Vertex program with UNITY_PASS_FORWARDADD SPOT
    Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_MOBILE UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING
    ---------------------------------------------------------------------------------------------------------------------------------------------------------
    Shader error in 'VacuumShaders/Curved World/U5 Standard/Standard': '_LightCoord' : no such field in structure at Assets/VacuumShaders/Curved World/Shaders/cginc/CurvedWorld_UnityStandardCore.cginc(510) (on gles)

    Compiling Vertex program with UNITY_PASS_FORWARDADD SPOT
    Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_MOBILE UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING
    ----------------------------------------------------------------------------------------------------------------------------------------------------------
    Shader error in 'VacuumShaders/Curved World/U5 Standard/Standard': '' : 'UNITY_PASS_META' already defined at Assets/VacuumShaders/Curved World/Shaders/cginc/CurvedWorld_UnityStandardMeta.cginc(10) (on gles)

    Compiling Vertex program with UNITY_PASS_META
    Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_MOBILE UNITY_HARDWARE_TIER2 UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING
    -----------------------------------------------------------------------------------------------------------------------------------------------------------

    I fixed it excluding the standard shader package from Curved World Settings, it was solved for me because i am using only Unlit and Particle shader in my game (and Universal bend type if it helps), i don't know if is only a problem with my project or more people are getting this problem too.
     
  5. JordiApp

    JordiApp

    Joined:
    Apr 23, 2018
    Posts:
    2
    Hi. I am trying to use this asset with Unity 2018, using the latest render pipeline.

    Now the problem is that I’m unable to use this asset,
    Because when I use, for example, the lightweight render pipeline(LWRP), it forces me to use its new standard materials, or else it won’t render.

    Is there a way to “port” this shader to be used with the new render pipelines?
    Is there a way to kindoff fallback to different shaders with curved world ones or do you have any suggestion in making this work?

    My second question is, are there plans to support those new shaders?

    Thank you very much, our studio love your asset and we all think it’s great!

    It would be great if we could integrate curved work to our latest titles, which render much more nicely because of the new LWRP.

    Thanks! ;)
     
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Working on fix.



    VacuumShaders - Facebook Twitter YouTube
     
  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    SRP is still in preview without enough documentation. Releasing fully functional polished asset and provide support for it currently is not possible.



    VacuumShaders - Facebook Twitter YouTube
     
  8. Erikoinen

    Erikoinen

    Joined:
    Nov 10, 2014
    Posts:
    68
    Hi, I'd like to know if there is a shortcut to disable/enable Curved World Controller in Editor?

    And if not, would it be easy to do it myself (how)?
     
  9. Erikoinen

    Erikoinen

    Joined:
    Nov 10, 2014
    Posts:
    68
    I also want to manipulate the Controller’s values on runtime. How can I do that?
     
  10. ErayT

    ErayT

    Joined:
    Dec 13, 2013
    Posts:
    20
    Is this a shader that we attach to the camera or I have to assign it to each GameObject in the scene?
     
  11. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    There is no key shortcut, but in editor Curved World can be disabled from controller script
    upload_2018-5-24_18-25-25.png

    For manipulating curve values from script (run-time) check API.pdf file in Doc folder.



    VacuumShaders - Facebook Twitter YouTube
     
  12. JordiApp

    JordiApp

    Joined:
    Apr 23, 2018
    Posts:
    2
    Is there a way that I can do this myself?
    Correct me if im wrong wouldn't porting CurvedWorld for SRP is just a matter of changing a few lines in the shader? since its just have to fallback to a different shader?
    Or am I wrong?
    Id be glad if you could give me a suggestion for implementing this myself.
    I will also share the results here so people can use a temp solution for that.

    To clarify: the current problem i am having is that the render pipeline does not support the unity standard shaders.. isn't curvedworld just a layer above unity standard shaders? there is not way to easily change curvedworld shader to use the render pipeline shaders?

    Thanks.
     
  13. ababab5

    ababab5

    Joined:
    Apr 15, 2014
    Posts:
    508
    Hello,

    Thanks for this awesome asset.

    I have a question: how can I work with TextMeshPro (in 3D of course) ?

    Thanks!
     
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Yes, implementing Curved World into shaders is very simple, just adding one vertex transform method inside vertex shader.
    Problem with SRP is that it's shaders are not Unity built-in resources yet, you will have to download entire SRP shader library from Unity github and modify all required files there. Also they are frequently updated and modified, you will have to overwrite your shaders too to keep them up-to-date.


    Currently there are no TextMeshPro shaders included, you will have to modify them manually.
    Bookmarked for the next update.



    VacuumShaders - Facebook Twitter YouTube
     
  15. E_T_

    E_T_

    Joined:
    May 14, 2018
    Posts:
    19
    Making progress now but there seems to be a bug in 2018.1 When you import the Curved World shader into the project, there is no link to Vacuum Shaders under the Window menu and so you cannot bring up the settings controller. I have to save the project, exit, then reload the project, then it appears.
     
  16. gfaraj

    gfaraj

    Joined:
    Jul 11, 2016
    Posts:
    35
    Hi there, this asset is awesome!

    The description says that it works with Toon Colors Pro 2. How can I apply the Curved World shader to materials that are using the Toon shader?

    Thanks!
     
  17. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Check Toon Colors Pro 2 documentation or ask publisher, he knows it better.



    VacuumShaders - Facebook Twitter YouTube
     
  18. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    gfaraj and hopeful like this.
  19. gfaraj

    gfaraj

    Joined:
    Jul 11, 2016
    Posts:
    35
    That looks great!!! Awesome job.

    I have a question about the models/assets that come with this plugin. Are they free to use in a commercial game? (I'm mostly referring to the road/cars in the Classic Runner sample.

    Thanks.
     
  20. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    There are here.



    VacuumShaders - Facebook Twitter YouTube
     
  21. gfaraj

    gfaraj

    Joined:
    Jul 11, 2016
    Posts:
    35
  22. jay_ploss

    jay_ploss

    Joined:
    Nov 25, 2013
    Posts:
    12
    @Arkhivrag, wow that spiral shader is nuts! Amazing. Also, I've noticed the link to your "readme" from the asset store blurb is returning a 404 at the moment.
     
  23. gfaraj

    gfaraj

    Joined:
    Jul 11, 2016
    Posts:
    35
    @Arkhivrag does Curved World work with Line Renderer? I can't seem to get it to render correctly. Any tips?
     
  24. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Modify LineRenderer's points position using Curved World's API:
    Code (CSharp):
    1. public Vector3 TransformPoint(Vector3 _transformPoint, BEND_TYPE _bendType)
    Check API.pdf file inside Doc folder.

    BTW, 2. Little Planet (Nightmare) example scene uses LineRenderer for bullet trace, check it too.



    VacuumShaders - Facebook Twitter YouTube
     
  25. gfaraj

    gfaraj

    Joined:
    Jul 11, 2016
    Posts:
    35
    Awesome, thank you, I'll try that out.
     
  26. cj31387

    cj31387

    Joined:
    May 23, 2012
    Posts:
    143
    Could this be used on voxel terrain like https://www.assetstore.unity3d.com/en/?stay#!/content/9180 so that when you fly up you start seeing a planet? Then you can fly around it and end up at another point back at the terrain and the closer you get the less bent it is, the further you get the more it looks like a planet?
     
  27. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    What you are asking for (converting plane into sphere) mathematically is not possible.



    VacuumShaders - Facebook Twitter YouTube
     
  28. Erikoinen

    Erikoinen

    Joined:
    Nov 10, 2014
    Posts:
    68
    Could someone help me add the Curved World inlines in my shader? This is the guide by Curved World: http://www.parttimemonkey.com/private/curved_world_guide.jpg

    This is an unlit shader that has shadows on it, which I'd like the Curved Worldedness be applied to:
    Code (CSharp):
    1. Shader "Custom/Unlit-Texture-Shadows"
    2. {
    3.     Properties
    4.     {
    5.         _MainTex("Base (RGB)", 2D) = "white" {}
    6.     }
    7.  
    8.     SubShader
    9.     {
    10.         Pass
    11.         {
    12.             Tags { "LightMode" = "ForwardBase" }
    13.  
    14.             CGPROGRAM
    15.  
    16.             #pragma vertex vert
    17.             #pragma fragment frag
    18.  
    19.             #pragma multi_compile_fwdbase
    20.             #pragma multi_compile_fwdadd
    21.             #pragma multi_compile_fwdadd_fullshadows
    22.             #pragma multi_compile_fog
    23.  
    24.             #include "UnityCG.cginc"
    25.             #include "AutoLight.cginc"
    26.  
    27.             sampler2D _MainTex;
    28.             float4 _MainTex_ST;
    29.  
    30.             struct v2f
    31.             {
    32.                 float4 pos : SV_POSITION;
    33.                 LIGHTING_COORDS(0,1)
    34.                 float2 uv : TEXCOORD2;
    35.                 UNITY_FOG_COORDS(1)
    36.             };
    37.  
    38.             v2f vert(appdata_base v)
    39.             {
    40.                 v2f o;
    41.                 o.pos = UnityObjectToClipPos(v.vertex);
    42.                 o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
    43.                 TRANSFER_VERTEX_TO_FRAGMENT(o);
    44.                 UNITY_TRANSFER_FOG(o, o.pos);
    45.                 return o;
    46.             }
    47.  
    48.             fixed4 frag(v2f i) : COLOR
    49.             {
    50.                 float attenuation = LIGHT_ATTENUATION(i);
    51.                 fixed4 matColor = tex2D(_MainTex, i.uv);
    52.                 matColor *= attenuation;
    53.                 UNITY_APPLY_FOG(i.fogCoord, matColor);
    54.                 return matColor;
    55.             }
    56.  
    57.             ENDCG
    58.         }
    59.     }
    60.     Fallback "VertexLit"
    61. }
     
  29. SiloniGhora

    SiloniGhora

    Joined:
    Jul 24, 2015
    Posts:
    4
    Hi All,
    I am trying to use the universal bend type. When the camera faces in the Z direction, then I can change the Y bend values to bend around the Y axis. But when the camera faces in other direction, lets say -90 degrees, then I cannot get this effect. Can someone please help?
     
  30. SiloniGhora

    SiloniGhora

    Joined:
    Jul 24, 2015
    Posts:
    4
    Hi,
    Can someone please help

    Hi,
    Can someone please help!!
     
  31. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Package includes Unlit example shader, check it. As for fallback use "Hidden/VacuumShaders/Curved World/VertexLit/Diffuse".


    Curved World bends mesh along world axis, it is camera position/rotation independent.



    VacuumShaders - Facebook Twitter YouTube
     
  32. SiloniGhora

    SiloniGhora

    Joined:
    Jul 24, 2015
    Posts:
    4
    @Arhivrag, thanks for your time and reply.
    If I take the endless runner example from this package, currently its building the world in the Z direction. Then it uses the Y bend type to bend the word around Y axis. So, now if I form this world along -X axis, I should be able to get the same effect in -X direction by changing the Y bend type values right?
     
  33. mkg2w

    mkg2w

    Joined:
    Aug 19, 2013
    Posts:
    54
  34. CursedDragon

    CursedDragon

    Joined:
    Jul 12, 2017
    Posts:
    1
  35. Dangy

    Dangy

    Joined:
    Aug 26, 2013
    Posts:
    7
    Hi,

    Great asset.

    I was wondering if it was possible to have either multiple cameras or pivot points? I'm experimenting whether its possible to 'fake' a complete little planet using the little planet effect.

    Basically will just be teleporting or wrapping the camera when it goes past the edges of a plane as well as having additional cameras show the 'other side' of the planet.

    Currently the second or additional cameras located at the other side or edge of the plane just appears distorted as the pivot point was set back at the original camera.

    Cheers
     
  36. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    No, mesh still will have the curvature along world Z axis.


    PC demo.


    If that asset uses some custom shaders, you will have to modify them to make Curved World compatible.



    Curvature effect created by Curved World shaders are oriented to the world space and are camera position/rotation independent.
    Each bend effect is correctly visible only from specific point, for example:
    Classic Runner


    Little Planet


    Cylindrical Tower




    VacuumShaders - Facebook Twitter YouTube
     
  37. Blackbox514

    Blackbox514

    Joined:
    Apr 8, 2016
    Posts:
    22
    Hi,

    Anybody else getting this error in 2018.2 using a clean project?
    Shader error in 'VacuumShaders/Curved World/U5 Standard/Standard (Specular setup)': invalid subscript '_LightCoord' at Assets/VacuumShaders/Curved World/Shaders/cginc/CurvedWorld_UnityStandardCore.cginc(420) (on metal)

    Compiling Vertex program with UNITY_PASS_FORWARDADD POINT
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR​

    Repro steps,
    1. Create a new project in 2018.2
    2. Install Curved World
     
  38. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Unity 2018.2 update will be available later this week.



    VacuumShaders - Facebook Twitter YouTube
     
  39. AntonQvarfordt

    AntonQvarfordt

    Joined:
    Mar 14, 2013
    Posts:
    27
    When building this for iOS the curve is flat, as it would be if it wern't using the shader. It works on Android and PC. Any ideas?
     
  40. Blackbox514

    Blackbox514

    Joined:
    Apr 8, 2016
    Posts:
    22
    Awesome! Thanks!
     
  41. spakment

    spakment

    Joined:
    Dec 19, 2017
    Posts:
    96
    Hi, is there any support for occlusion culling due to the curvature?

    I assume all the occlusion checks are done outside of the shader so everything is still being sent to the GPU even if it would be occluded due to the curvature. I'm sure I can tweak my far settings to handle this though so not a deal breaker, just curious.
     
  42. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Occlusion culling is controller per-object or from camera with included scripts.
    Note, you still need objects to be rendered even if there are outside of camera view frustum, otherwise curved objects will disappear unexpectedly.



    VacuumShaders - Facebook Twitter YouTube
     
  43. raycool

    raycool

    Joined:
    Mar 21, 2015
    Posts:
    2
    Hi, i found another bug, objects using Unlit or Outline-Unlit shader on Android devices renders with Rim Bias activated regardless they have that option turned off on the project (it behaves normally when running the game from unity), i don't know if it happens on other platforms. For the moment turning on Cutout rendering solves the problem but Outline-Unlit shader doesn't have that option.
     
  44. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Seems Unity has not removed keyword from materiel.
    Try: Switch Inspector window to Debug mode and from materials Shader Keywords array remove "V_CW_RIM" string.
    upload_2018-7-31_15-56-13.png



    VacuumShaders - Facebook Twitter YouTube
     
  45. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    515
    has anyone had any luck with cts?
     
  46. GeorgeCH

    GeorgeCH

    Joined:
    Oct 5, 2016
    Posts:
    222
    Bought it, works great, but is there a way to also apply the curved effect to text meshes (either Unity's own or TMP?)
     
  47. Rensoburro_Taki

    Rensoburro_Taki

    Joined:
    Sep 2, 2011
    Posts:
    274
    deleted......solved!
    thanks & sorry xD
     
    Last edited: Aug 10, 2018
  48. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Maybe to TMP, but only those shaders that calculate text position in world space, most UI shaders do it in screen space.



    VacuumShaders - Facebook Twitter YouTube
     
  49. GeorgeCH

    GeorgeCH

    Joined:
    Oct 5, 2016
    Posts:
    222
    Yep, I meant 3D text, not UI.
     
  50. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Bookmarked for the next update. Planed for September.



    VacuumShaders - Facebook Twitter YouTube