Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

► Curved World ◄

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

  1. subver

    subver

    Joined:
    Feb 22, 2016
    Posts:
    20
    Ahhh I totally overlooked having to change the Bend type for each scene (didn't realize it was by project only) - but that fixed it! Awesome!
    Time to rock some curved worlds now!
     
  2. ncho

    ncho

    Joined:
    Feb 1, 2014
    Posts:
    99
    Is a O'Neill cylinder possible with this?
     
  3. subver

    subver

    Joined:
    Feb 22, 2016
    Posts:
    20
    I have my Curved World setup and looks good but when I build for mobile it doesn't curve at all.. I tried the One Direction Light shader on all the objects as well and still no dice. Is there anything else I have to do to get this running on mobile?
     
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Curved World bends mesh along Parabola not circle:


    You can not achieve closed circle bend effect, but you can achieve 'half closed' by parabola:




    VacuumShaders - Facebook Twitter YouTube
     
  5. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Add Curved World/Shaders/VertexLit shaders into Always Included Shaders array Menu->Edit->Project Settings-> Graphics.



    VacuumShaders - Facebook Twitter YouTube
     
    subver likes this.
  6. subver

    subver

    Joined:
    Feb 22, 2016
    Posts:
    20
    Perfect, thank you! It actually runs very smooth with the standard shaders on there as well! And with fog! Very happy, glad I purchased, can't wait to try more things out!
     
  7. zinGa

    zinGa

    Joined:
    Feb 9, 2016
    Posts:
    3
    Hello,

    I am currently working on a project where we use the Curved World Shader -> U5 Standard / Standard.
    Our Setting is: Classic Runner.

    We saw that our objects where acting strange with the curved world shader.

    First Image (13): Unity 5 Standard 13.png
    Second Image (12): Curved World Shader -> U5 Standard / Standard. 12.png

    On other objects it is acting strange as well, giving the same effect.

    What could be wrong?
     
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    It may be mesh normal and/or tangent problem. They both are required if using 'lit' shaders.



    VacuumShaders - Facebook Twitter YouTube
     
  9. zinGa

    zinGa

    Joined:
    Feb 9, 2016
    Posts:
    3
    Thanks, for your fast response.

    We tried switching left/right handed tangents, but that didn't change anything.

    But we fixed the problem by creating better UVs
     
  10. AlienTheory

    AlienTheory

    Joined:
    Feb 9, 2016
    Posts:
    5
    Hi Arkhivrag,
    I have a issue when i build on windows or android.
    I use VacuumShaders/Curved World/Outline/Legacy Shader, in editor mode everything works well but on windows or Android, everything are in pink color ?
    When i use other shader than Outline, its ok but as soon as use outline, pink color come back:

    upload_2016-3-19_10-52-32.png

    Regards...
     
  11. AlienTheory

    AlienTheory

    Joined:
    Feb 9, 2016
    Posts:
    5
    Solved !

    I read the post there and see:

    I have my Curved World setup and looks good but when I build for mobile it doesn't curve at all.. I tried the One Direction Light shader on all the objects as well and still no dice. Is there anything else I have to do to get this running on mobile?
    Add Curved World/Shaders/VertexLit shaders into Always Included Shaders array Menu->Edit->Project Settings-> Graphics.

    I add the Legacy shader to the graphicsSettings and it works fine.

    Anyway, curvedWorld is amazing...

    Thanks
     
  12. Philosohe

    Philosohe

    Joined:
    Mar 24, 2016
    Posts:
    3
  13. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
  14. Philosohe

    Philosohe

    Joined:
    Mar 24, 2016
    Posts:
    3
    Thank you for your reply!!
    I understand the cause is bend type.
    But I can't change "bend type", Because the menu is disabled.
    Do you know how to be active the menu?
     
  15. Philosohe

    Philosohe

    Joined:
    Mar 24, 2016
    Posts:
    3
    I could change bend type to universal type below way, Thank you!!

    "Changing project bend type is available from:
    Menu / Window / VacuumShaders/ Curved World Settings"
     
  16. Kolgrima

    Kolgrima

    Joined:
    Feb 2, 2009
    Posts:
    40
    I'm attempting to convert Shader Forge shaders (this is something I'll want to do on a regular basis) so I decided to start by creating a simple unlit shader in Shader Forge and add in the needed Curved World calls. I opened the example unlit shader provided with Curved World and converted my simple Shader Forge shader to match as far as I can tell it looked as if it would all work fine but not quite... I'm getting a strange separation as you can see below on the Green spheres. I'm wondering what I'm missing?



    Code (CSharp):
    1. // Shader created with Shader Forge v1.26
    2. // Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/
    3. // Note: Manually altering this data may prevent you from opening it in Shader Forge
    4.  
    5. Shader "Shader Forge/VerySimpleShaderForge" {
    6.     Properties {
    7.         _Color ("Color", Color) = (0.07843138,0.3921569,0.7843137,1)
    8.     }
    9.     SubShader {
    10.         Tags {
    11.             "RenderType"="Opaque"
    12.         }
    13.         Pass {
    14.             Name "FORWARD"
    15.             Tags {
    16.                 "LightMode"="ForwardBase"
    17.             }
    18.          
    19.             CGPROGRAM
    20.             #pragma vertex vert
    21.             #pragma fragment frag
    22.             #define UNITY_PASS_FORWARDBASE
    23.             #include "UnityCG.cginc"
    24.             #include "Assets/VacuumShaders/Curved World/Shaders/cginc/CurvedWorld_Base.cginc"
    25.             #pragma multi_compile_fwdbase_fullshadows
    26.             #pragma exclude_renderers gles3 metal d3d11_9x xbox360 xboxone ps3 ps4 psp2
    27.             #pragma target 3.0
    28.             uniform float4 _Color;
    29.  
    30.             struct VertexInput {
    31.                 float4 vertex : POSITION;
    32.             };
    33.  
    34.             struct VertexOutput {
    35.                 float4 pos : SV_POSITION;
    36.             };
    37.  
    38.             VertexOutput vert (VertexInput v) {
    39.  
    40.                 VertexOutput o = (VertexOutput)0;
    41.  
    42.                 //CurvedWorld vertex transform
    43.                 V_CW_TransformPoint(v.vertex);
    44.  
    45.                 o.pos = mul(UNITY_MATRIX_MVP, v.vertex );
    46.                 return o;
    47.             }
    48.  
    49.             float4 frag(VertexOutput i) : COLOR {
    50. ////// Lighting:
    51. ////// Emissive:
    52.  
    53.                 float3 emissive = _Color.rgb;
    54.                 float3 finalColor = emissive;
    55.                 return fixed4(finalColor,1);
    56.             }
    57.             ENDCG
    58.         }
    59.     }
    60.     FallBack "Diffuse"
    61.     CustomEditor "ShaderForgeMaterialInspector"
    62. }
     

    Attached Files:

  17. Kolgrima

    Kolgrima

    Joined:
    Feb 2, 2009
    Posts:
    40
    And I just figured out what it was I missed if any one else has this happen...

    Code (CSharp):
    1. FallBack "Diffuse"
    needs to be

    Code (CSharp):
    1. FallBack "Hidden/VacuumShaders/Curved World/VertexLit/Diffuse"
    which is right in the docs I'm silly.
     
    hopeful likes this.
  18. djacobson

    djacobson

    Joined:
    Jul 15, 2014
    Posts:
    6
    Hi, I would love to buy this asset but need to know a few things first. The first and most important thing is.... I am trying to make a curved little world. I was reading some of the documentation and you say that it does not change the scale or position just the camera, So how i can make a curved world similar to like a little globe but be able to walk all the way around the world continuously. If i get to a certain point in the world i don't just want there to be a invisible wall i want to be able to continue to walk around and around going in any direction the player wants so its a curved continuous world. Thanks

    I hope you understand. :)
     
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    If by 'world similar to like a little globe' you mean 360° rotation like in real 3d globe then shader does not do it.
    All Curved World does is mesh bending using shaders during rendering - so plane will never be converted to real 3d sphere.
    As for invisible walls and continues(never ending) walks - its up to you and your gameplay, what's the problem?




    VacuumShaders - Facebook Twitter YouTube
     
  20. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    Hi Guys, I'm using JMO's cartoon effects and want to use them with CurvedWorld but they all use a simplified additive8 shader and I can't figure out how to add the bits needed to make it CW friendly as it is so different from the example shaders and very different from the particle shaders that are with CW. Here is the additive8 shader with my only effort to change it's name! can anyone help please?

    Code (CSharp):
    1. // Simplified Additive Particle shader. Differences from regular Additive Particle one:
    2. // - no Tint color
    3. // - no Smooth particle support
    4. // - no AlphaTest
    5. // - no ColorMask
    6.  
    7. // Cartoon FX difference:
    8. // - uses Alpha8 monochrome textures to save up on texture memory size
    9.  
    10. Shader "Cartoon FX/Particles CWAdditive Alpha8"
    11. {
    12. Properties
    13. {
    14.     _MainTex ("Particle Texture (Alpha8)", 2D) = "white" {}
    15. }
    16.  
    17. Category
    18. {
    19.     Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
    20.     Blend SrcAlpha One
    21.     Cull Off Lighting Off ZWrite Off Fog { Color (0,0,0,0) }
    22.    
    23.     BindChannels
    24.     {
    25.         Bind "Color", color
    26.         Bind "Vertex", vertex
    27.         Bind "TexCoord", texcoord
    28.     }
    29.    
    30.     SubShader
    31.     {
    32.         Pass
    33.         {
    34.              SetTexture [_MainTex]
    35.             {
    36.                 combine primary, texture * primary
    37.             }
    38.         }
    39.     }
    40. }
    41. }
     
  21. djacobson

    djacobson

    Joined:
    Jul 15, 2014
    Posts:
    6
    Hi again. Yes i would like to make a world like this. That my player can walk around in and go anywhere they want.



    Thanks
     
  22. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    You have no access to the vertex shader in the fixed function shaders. So you can not implement Curved World there.



    VacuumShaders - Facebook Twitter YouTube
     
  23. Skaltum

    Skaltum

    Joined:
    Nov 1, 2013
    Posts:
    28
    Hello
    I have am working on an architectural visualization project. Would it be possible to use this asset to simulate the natural curvature of the earth? We would like to recreate the effect of windturbines disappearing behind the horizon.
     
  24. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Yes, you can, but remember that in reality that world is flat and just rendered as being curved.



    VacuumShaders - Facebook Twitter YouTube
     
  25. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Yes, you can, simulate is the correct word.



    VacuumShaders - Facebook Twitter YouTube
     
    Skaltum likes this.
  26. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    I'm wondering if curved world works for VR and multiple cameras?
     
  27. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    It's VR ready.
    As for multiple cameras - Curved World shaders rely on pivot point variable and if camera's position is considered to be that pivot point then shaders will need custom modification for supporting multiple pivot points.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Apr 4, 2016
  28. ashiokai

    ashiokai

    Joined:
    Aug 5, 2015
    Posts:
    6
    hey,

    I just downloaded the shader and i'm having problems getting it to work. When i loaded it into my game, The world isn't becoming round its still straight. But when I load it into my other games its fine. Ive checked the example projects and i've applied it correctly. I made a empty Gameobject and applied the script and nothing. Then i tried to apply to a mesh and it still doesn't work. What am i doing wrong?

    Here is my Scene. The scene itself is in parts and its the character and camera travelling through the scene and the sections of the tunnel are being spawned as the character moves through it. No matter what i do, nothing seems to curve.

     
    Last edited: Apr 11, 2016
  29. moffata2

    moffata2

    Joined:
    Jun 17, 2015
    Posts:
    25
    Hi, I just purchased the asset and looking to do a classic runner game and have 2 questions!

    1. How do I create my own chunks to add? ( maybe a simple plane to start with)
    2. The cars are not appearing in my example even though I can see them in the hierarchy being created and destroyed, is this a known issue?

    Thanks,

    Tony
     
  30. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Please, send your help request to vacuumshaders@gmail.com
    Do not forget to include asset purchase invoice.



    VacuumShaders - Facebook Twitter YouTube
     
  31. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Check Scene Manager object inside scene, it instantiates road and car prefabs.



    VacuumShaders - Facebook Twitter YouTube
     
  32. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    Hi, I have some issue with this shader.
    Displacement works fine but there are some 'popping out' in color. The models are just plain Unity default cubes.
    Also the camera culling is a problem. If the model(of original pos) is outside the view frustrum, it just vanishes. I added a mesh bounds generator components to them but no effects.
    How do you solve this problem? Using a wide-angle camera to avoid frustrum culling?
     
  33. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Check ReadMe file (page 7) inside Doc folder.



    VacuumShaders - Facebook Twitter YouTube
     
    NGC6543 likes this.
  34. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    Hi, I also have this shadow issue..
    When in Editor the shadow just works fine,
    but on iOS the shadow isn't correctly rendered.
    Editor.png
    above is editor screenshot, and below is iOS screenshot.

    iOS.PNG

    Every objects use 'One Directional Light' shader. Unity primitive meshes has no problem with the shadow, but other objects have. I don't have any clue what might be the problem..
     
  35. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Send support request to vacuumshaders@gmail.com Purchase invoice is required.



    VacuumShaders - Facebook Twitter YouTube
     
  36. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    I have the exact same problem, All shadows work fine in the editor but no shadows showing on IOS device, if I swap out the vacuum shaders for a standard U5 shader the shadows are now there but now obviously I've lost the curved world effect. I've tried forcing ES2, 3 and metal all on their own but nothing works. Oh the device is an iPad Air2.

    Do I need to ask this question via the support email or as more than one of us is having this problem are you going to post the cure on here?
     
  37. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Yes, send support request to vacuumshaders@gmail.com with purchase invoice included.



    VacuumShaders - Facebook Twitter YouTube
     
  38. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
  39. Cartoon-Mania

    Cartoon-Mania

    Joined:
    Mar 23, 2015
    Posts:
    320
    I can't delete Curved World 2 I mean.. I delete vacuumshaders folder.. but Shortly after.. It install itself.. I can't delete forever?

    and I use CurvedWorld_GlobalController in the 1.x version but I can not use it in the 2.x version?


    CurvedWorld_GlobalController.get._V_CW_X_Bend_Size_GLOBAL = 7;
    CurvedWorld_GlobalController.get._V_CW_Y_Bend_Size_GLOBAL = -7;
    CurvedWorld_GlobalController.get.enableFog = false;


    How can I change?

    and I have camera problem.. I make runner game.. camera follow player.. but Strangely, the camera moves. There are no problem with 1.X.. but 2.x problem.

    I think 1.x example is best. I understand directly curvedworld.. but 2.x example don't help me.
     
    Last edited: May 12, 2016
  40. Antidotenow

    Antidotenow

    Joined:
    Dec 23, 2012
    Posts:
    6
    Hi Davit,

    Is VR Panorama 360 PRO Renderer compatible with Curved world ?
    Regards,
    Patrick
     
  41. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Curved World 1.x is not compatible with Unity 5 and is not supported any more. You must install 2.x



    VacuumShaders - Facebook Twitter YouTube
     
  42. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Tested on Oculus Rift and Samsung Gear.



    VacuumShaders - Facebook Twitter YouTube
     
  43. Cartoon-Mania

    Cartoon-Mania

    Joined:
    Mar 23, 2015
    Posts:
    320
    I know I mean .. How can I change method

    I can't use API CurvedWorld_GlobalController.get._V_CW_X_Bend_Size_GLOBAL ???
     
  44. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Check API.pdf file inside Doc folder.



    VacuumShaders - Facebook Twitter YouTube
     
  45. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Package includes Example shaders, check them.



    VacuumShaders - Facebook Twitter YouTube
     
  46. olgusahin

    olgusahin

    Joined:
    Jun 10, 2013
    Posts:
    7
    I managed to get a custom shader to work with curved world following the documentation and example shaders given. Thanks for that :)

    However I have a small issue that I couldn't figure out. The below picture shows the issue (black and yellow part). I cant get the shadow and the uv position to bend with the vertex. Below the picture is the final state of the shader code. I would appreciate it very much if someone could help me out.

    CW_custom_shader_issue.jpg

    Code (CSharp):
    1. Shader "Custom/LightFillCurvedWorld" {
    2.     Properties {
    3.         _Color ("Color", Color) = (0.07843138,0.3921569,0.7843137,1)
    4.         _height ("height", Float ) = 0
    5.         _thickness ("thickness", Float ) = 0.1
    6.     }
    7.     SubShader {
    8.         Tags {
    9.             "RenderType"="Opaque"
    10.         }
    11.         Pass {
    12.             Name "FORWARD"
    13.             Tags {
    14.                 "LightMode"="ForwardBase"
    15.             }                      
    16.             CGPROGRAM
    17.             #pragma vertex vert
    18.             #pragma fragment frag
    19.             #define UNITY_PASS_FORWARDBASE
    20.             #include "UnityCG.cginc"
    21.             #include "Assets/VacuumShaders/Curved World/Shaders/cginc/CurvedWorld_Base.cginc"
    22.             #pragma multi_compile_fwdbase_fullshadows
    23.             #pragma exclude_renderers gles3 metal d3d11_9x xbox360 xboxone ps3 ps4 psp2
    24.             #pragma target 3.0
    25.             uniform float4 _Color;
    26.             uniform float _height;
    27.             uniform float _thickness;          
    28.             struct VertexInput {
    29.                 float4 vertex : POSITION;
    30.                 float3 normal : NORMAL;
    31.             };          
    32.             struct VertexOutput {
    33.                 float4 pos : SV_POSITION;
    34.                 float4 posWorld : TEXCOORD0;
    35.                 float3 normalDir : TEXCOORD1;
    36.             };
    37.             VertexOutput vert (VertexInput v) {              
    38.                 VertexOutput o = (VertexOutput)0;
    39.                 V_CW_TransformPoint(v.vertex);
    40.                 o.normalDir = UnityObjectToWorldNormal(v.normal);
    41.                 o.posWorld = mul(_Object2World, v.vertex);
    42.                 o.pos = mul(UNITY_MATRIX_MVP, v.vertex );          
    43.                 return o;
    44.             }
    45.             float4 frag(VertexOutput i) : COLOR {
    46.                 i.normalDir = normalize(i.normalDir);
    47.                 float3 normalDirection = i.normalDir;
    48.                 float3 emissive = (_Color.rgb*step(abs((i.posWorld.g-_height)),_thickness)*step(dot(i.normalDir,float3(0,1,0)),0.999));
    49.                 float3 finalColor = emissive;
    50.                 return fixed4(finalColor,1);
    51.             }
    52.             ENDCG
    53.         }
    54.     }
    55. }
    56.  
     
  47. Syntobe

    Syntobe

    Joined:
    Jun 7, 2016
    Posts:
    1
    Hi Guys

    All the work within this Project is just great. Big Up for every commiting person =)

    I was wondering if it is possible for you to bind the camera instance using a tag. Like MainCamera or so.
    My intend is to use a prefab attached camera rather than a scene standalone one.

    What do you think about adding a static Tag for referencing the Camera within the Curved World Controller?

    Best Regards, Tobe
     
  48. Rod-Galvao

    Rod-Galvao

    Joined:
    Dec 12, 2008
    Posts:
    210
    Hi,

    Does it work with multiple cameras? Like one for rendering the space background and other to rendering a curved planet?

    I want to create a game where the player lands his spaceship on a planet.
    I thought using Curved World + Terrain2Mesh + Space Graphics Toolkit to create that effect. Is it feasible?

    Regards,
    Rod
     
  49. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Curved World works with multiple cameras.

    That's camera job (Culling Mask option).



    VacuumShaders - Facebook Twitter YouTube
     
    Rod-Galvao likes this.
  50. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    Hi @Arkhivrag, I've encountered this weird phenomenon in your shader.

    textures are popping and I think lighting might be the problem.
    At first I thought texture mip map setting caused the problem, but non of my textures used mip map.
    I changed the UVs of those quads(uv rect size 0.05). And I increased it to 0.5 but the problem still occurs.
    What do you think?