Search Unity

► Curved World ◄

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

  1. seejay3061

    seejay3061

    Joined:
    Oct 21, 2013
    Posts:
    12
    Ok, so far so good. Thank you again for the help. I ended up using the Legacy Shader since my shadows weren't appearing with the One Directional Light Shaders and my framerate is a pretty steady 60 FPS.

    My new question is if there is a known way to fix misaligned projected blob shadows. These seem to be the only element that does not conform to the curvature even when using one of the curved world shaders (Curved World/Projector/Multiply). In the attached image, the shadow to the right of the red vehicle is supposed to always be just below the vehicle. In that screenshot the world is only curving slightly on the Y Axis.

    Thank You!!
     
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Unity projector consists of two parts:
    1. Unity projector script, all projector calculations are done here. Curved World has no access to it, it's build inside Unity engine.
    2. Shader itself.

    Because of these projects are not fully supported as common shaders.
    To update projector gameobject position as Curved World bend, gameobject position must be modified from script as all non shader objects (for example colliders) using TransformPoint() function, described in API.pdf file in Doc folder.
    Check Little Planet - Projector and LensFlare - example scene. Flare objects position there are updated using TransformPoint() function, same method can be used on projectors too.
    But as some projector data calculation is done by Unity itself inside Projector script you may encounter in some visual glitches.



    VacuumShaders - Facebook Twitter YouTube
     
  3. ababab5

    ababab5

    Joined:
    Apr 15, 2014
    Posts:
    508
    Hi,

    I would like to use the ToonBasicOutline (who is not the same effect as your standard asset / outline / unlit)

    How can I change the shader to use it with your AMAZING asset ?

    Code (CSharp):
    1. Shader "Toon/Basic Outline" {
    2.     Properties {
    3.         _Color ("Main Color", Color) = (.5,.5,.5,1)
    4.         _OutlineColor ("Outline Color", Color) = (0,0,0,1)
    5.         _Outline ("Outline width", Range (.002, 0.03)) = .005
    6.         _MainTex ("Base (RGB)", 2D) = "white" { }
    7.         _ToonShade ("ToonShader Cubemap(RGB)", CUBE) = "" { }
    8.     }
    9.  
    10.     CGINCLUDE
    11.     #include "UnityCG.cginc"
    12.  
    13.     struct appdata {
    14.         float4 vertex : POSITION;
    15.         float3 normal : NORMAL;
    16.     };
    17.  
    18.     struct v2f {
    19.         float4 pos : SV_POSITION;
    20.         UNITY_FOG_COORDS(0)
    21.         fixed4 color : COLOR;
    22.     };
    23.  
    24.     uniform float _Outline;
    25.     uniform float4 _OutlineColor;
    26.  
    27.     v2f vert(appdata v) {
    28.         v2f o;
    29.         o.pos = mul(UNITY_MATRIX_MVP, v.vertex);
    30.  
    31.         float3 norm   = normalize(mul ((float3x3)UNITY_MATRIX_IT_MV, v.normal));
    32.         float2 offset = TransformViewToProjection(norm.xy);
    33.  
    34.         o.pos.xy += offset * o.pos.z * _Outline;
    35.         o.color = _OutlineColor;
    36.         UNITY_TRANSFER_FOG(o,o.pos);
    37.         return o;
    38.     }
    39.     ENDCG
    40.  
    41.     SubShader {
    42.         Tags { "RenderType"="Opaque" }
    43.         UsePass "Toon/Basic/BASE"
    44.         Pass {
    45.             Name "OUTLINE"
    46.             Tags { "LightMode" = "Always" }
    47.             Cull Front
    48.             ZWrite On
    49.             ColorMask RGB
    50.             Blend SrcAlpha OneMinusSrcAlpha
    51.  
    52.             CGPROGRAM
    53.             #pragma vertex vert
    54.             #pragma fragment frag
    55.             #pragma multi_compile_fog
    56.             fixed4 frag(v2f i) : SV_Target
    57.             {
    58.                 UNITY_APPLY_FOG(i.fogCoord, i.color);
    59.                 return i.color;
    60.             }
    61.             ENDCG
    62.         }
    63.     }
    64.  
    65.     Fallback "Toon/Basic"
    66. }
    67.  
    Thanks a lot.

    (3 days I try to ... I'm totally desperate).


    If I follow your tutorial, I have to do this :

    Code (CSharp):
    1.  
    2. Shader"Toon/BasicOutline2" {
    3. Properties {
    4. _Color ("MainColor", Color) = (.5,.5,.5,1)
    5. _OutlineColor ("OutlineColor", Color) = (0,0,0,1)
    6. _Outline ("Outlinewidth", Range (.002, 0.03)) = .005
    7. _MainTex ("Base(RGB)", 2D) = "white" { }
    8. _ToonShade ("ToonShaderCubemap(RGB)", CUBE) = "" { }
    9. }
    10.  
    11. CGINCLUDE
    12. #include"UnityCG.cginc"
    13. #pragmashader_featureV_CW_FOG_OFFV_CW_FOG
    14. #ifdef V_CW_FOG
    15. #pragma multi_compile_fog
    16. #endif
    17.  
    18.  
    19.  
    20. #include"UnityCG.cginc"
    21.  
    22. #include"Assets/VacuumShaders/CurvedWorld/Shaders/cginc/CurvedWorld_Base.cginc"
    23.  
    24. #pragmavertex vert
    25. #pragmafragment frag
    26. #pragma multi_compile_fog
    27.  
    28. struct appdata {
    29. float4vertex : POSITION;
    30. float3normal : NORMAL;
    31. };
    32.  
    33. struct v2f {
    34. float4 pos : SV_POSITION;
    35. UNITY_FOG_COORDS(0)
    36. fixed4color : COLOR;
    37. };
    38.  
    39. uniformfloat _Outline;
    40. uniformfloat4 _OutlineColor;
    41.  
    42. v2f vert(appdata v) {
    43. v2f o;
    44. UNITY_INITIALIZE_OUTPUT(v2f,o);
    45.  
    46. V_CW_TransformPoint(v.vertex);
    47.  
    48. o.pos = mul(UNITY_MATRIX_MVP, v.vertex);
    49.  
    50.  
    51.  
    52. float3 norm = normalize(mul ((float3x3)UNITY_MATRIX_IT_MV, v.normal));
    53. float2offset = TransformViewToProjection(norm.xy);
    54.  
    55. o.pos.xy += offset * o.pos.z * _Outline;
    56. o.color = _OutlineColor;
    57. UNITY_TRANSFER_FOG(o,o.pos);
    58. return o;
    59. }
    60. ENDCG
    61.  
    62. SubShader {
    63. Tags { "RenderType"="Opaque" }
    64. UsePass"Toon/Basic/BASE"
    65. Pass {
    66.  
    67. Name"OUTLINE"
    68. Tags { "LightMode" = "Always" }
    69. CullFront
    70. ZWriteOn
    71. ColorMaskRGB
    72. BlendSrcAlphaOneMinusSrcAlpha
    73.  
    74. CGPROGRAM
    75.  
    76. fixed4 frag(v2f i) : SV_Target
    77. {
    78. UNITY_APPLY_FOG(i.fogCoord, i.color);
    79. return i.color;
    80. }
    81. ENDCG
    82. }
    83. }
    84.  
    85. }
    86.  

    But the result is not good :



    Thanks x 10000 times!

    Best regards,

    AB
     
    Last edited: Dec 22, 2015
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Step by step guide is described in CustomShaders.pdf file in Doc folder. Package includes example shaders, check them.
    Your shader includes fallback to another shader and you will have to modify it too, you need some shader programming knowledge anyway.



    VacuumShaders - Facebook Twitter YouTube
     
  5. ababab5

    ababab5

    Joined:
    Apr 15, 2014
    Posts:
    508
    I always check the doc before to write a question. I check the exemple too (as mentioned on your pdf).

    It's not an extraordinary shader I am trying to use. Is the Toon Shader Unity provides in all versions. It's used by a ton of users.

    That's why I ask for this, and I'm pretty sure it should be good for you to add it to your package by default.

    Thanks.

    Edit : Fallback is optional in your documentation.
    Edit 2 : and I use the Steps 1 and 2 as you asked for on your documentation.
     
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    I know that many users use Unity Toon shader, that's way I've included it. Why you can not use it?

    Fallback is optional if you do not use it, otherwise it also must be modified.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Dec 22, 2015
  7. ababab5

    ababab5

    Joined:
    Apr 15, 2014
    Posts:
    508
    Thanks for your quick answer.

    Of course I try to use it, but I don't have the same visual result. That's why I want to use the original (a little bit customize to work with your asset).



    With no light, it's simply impossible with your shader.

    As you can see, there's no outline but my custom shader work with your asset.

    But, I didn't get how to put an outline that's why I ask you.

    If you want, here my code for this Toon Shader as Unity provide us, but who works with your asset :

    Code (CSharp):
    1. Shader "VacuumShaders/Curved World/Custom/ToonCurved" {
    2.     Properties {
    3.         _Color ("Main Color", Color) = (.5,.5,.5,1)
    4.         _MainTex ("Base (RGB)", 2D) = "white" {}
    5.         _ToonShade ("ToonShader Cubemap(RGB)", CUBE) = "" { }
    6.  
    7.         _OutlineColor ("Outline Color", Color) = (0,0,0,1)
    8.         _Outline ("Outline width", Range (.002, 0.03)) = .005
    9.  
    10.             _V_CW_OutlineColor ("Outline Color", Color) = (0,0,0,1)
    11.         _V_CW_OutlineWidth ("Outline width", Float) = .005
    12.     }
    13.  
    14.  
    15.     SubShader {
    16.         Tags { "RenderType"="Opaque" }
    17.         Pass {
    18.             Name "BASE"
    19.             Cull Off
    20.             ZWrite On
    21.             ColorMask RGB
    22.             Blend SrcAlpha OneMinusSrcAlpha
    23.            
    24.             CGPROGRAM
    25.             #pragma vertex vert
    26.             #pragma fragment frag
    27.             #pragma multi_compile_fog
    28.  
    29.  
    30.                 #pragma shader_feature V_CW_FOG_OFF V_CW_FOG  
    31.             #ifdef V_CW_FOG
    32.                 #pragma multi_compile_fog
    33.             #endif  
    34.  
    35.  
    36.  
    37.             #include "UnityCG.cginc"
    38.  
    39.             #include "Assets/VacuumShaders/Curved World/Shaders/cginc/CurvedWorld_Base.cginc"
    40.  
    41.             sampler2D _MainTex;
    42.             samplerCUBE _ToonShade;
    43.             float4 _MainTex_ST;
    44.             float4 _Color;
    45.  
    46.             struct vertexInput {
    47.                 float4 vertex : POSITION;
    48.                 float2 texcoord0 : TEXCOORD0;
    49.                 float3 normal : NORMAL;
    50.             };
    51.            
    52.             struct fragmentInput {
    53.                 float4 position : SV_POSITION;
    54.                 float2 uv : TEXCOORD0;
    55.                 float3 cubenormal : TEXCOORD1;
    56.                 UNITY_FOG_COORDS(0)
    57.                 fixed4 color : COLOR;
    58.             };
    59.  
    60.             uniform float _Outline;
    61.             uniform float4 _OutlineColor;
    62.  
    63.  
    64.             fragmentInput vert (vertexInput i)
    65.             {
    66.                 fragmentInput o;
    67.  
    68.  
    69.  
    70.  
    71.  
    72.                 UNITY_INITIALIZE_OUTPUT(fragmentInput,o);
    73.  
    74.  
    75.                 //CurvedWorld vertex transform
    76.                 V_CW_TransformPoint(i.vertex);
    77.  
    78.  
    79.                 o.position = mul (UNITY_MATRIX_MVP, i.vertex);
    80.                 o.uv = i.texcoord0.xy;
    81.  
    82.  
    83.  
    84.  
    85.  
    86.            
    87.                 o.position = mul (UNITY_MATRIX_MVP, i.vertex);
    88.                 o.uv = TRANSFORM_TEX(i.texcoord0, _MainTex);
    89.                 o.cubenormal = mul (UNITY_MATRIX_MV, float4(i.normal,0));
    90.                 UNITY_TRANSFER_FOG(o,o.position);
    91.  
    92.  
    93.                 o.position = mul(UNITY_MATRIX_MVP, i.vertex);
    94.  
    95.  
    96.  
    97.  
    98.  
    99.  
    100.                 float3 norm   = normalize(mul ((float3x3)UNITY_MATRIX_IT_MV, i.normal));
    101.                 float2 offset = TransformViewToProjection(norm.xy);
    102.  
    103.                 o.position.xy += offset * o.position.z * _Outline;
    104.                 o.color = _OutlineColor;
    105.                 UNITY_TRANSFER_FOG(o,o.position);
    106.  
    107.  
    108.  
    109.  
    110.                 return o;
    111.             }
    112.  
    113.             fixed4 frag (fragmentInput i) : SV_Target
    114.             {
    115.                 fixed4 col = _Color * tex2D(_MainTex, i.uv);
    116.                 fixed4 cube = texCUBE(_ToonShade, i.cubenormal);
    117.                 fixed4 c = fixed4(2.0f * cube.rgb * col.rgb, col.a);
    118.                 UNITY_APPLY_FOG(i.fogCoord, c);
    119.                 return c;
    120.             }
    121.             ENDCG          
    122.         }
    123.     }
    124.  
    125.     Fallback "VertexLit"
    126. }
    127.  
    The outline just doesn't work like you can see in this video :

    https://dl.dropboxusercontent.com/u/8289407/Enregistrement de l’écran.mov
     
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Send purchase invoice number to vacuumshaders@gmail.com and you will be sent original Unity toon shader modified for Curved World.



    VacuumShaders - Facebook Twitter YouTube
     
  9. ababab5

    ababab5

    Joined:
    Apr 15, 2014
    Posts:
    508
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
  11. Deleted User

    Deleted User

    Guest

    Couple of questions, if you don't mind..

    Compatible with Time of Day? ( the sky system)

    Did you dump the mobile terrain shaders? (From an earlier post).
    Update v2.12
    • VacuumShaders assets synchronization. Required update for all VacuumShaders assets.
    • Improved CustumShaders.pdf doc file.
    • T4M asset is deprecated by Unity. Same is T4M shaders included in Curved World. They will be removed in the next update.
    is there a replacement?

    I really want to use both...curious.

    Thanks,

    Patrick
     
    Last edited by a moderator: Jan 7, 2016
  12. jeffweber

    jeffweber

    Joined:
    Dec 17, 2009
    Posts:
    616
    If I have a 2d top down game with sprites that move around. Will curved world allow me to wrap this into a sphere with the ability to view it all from the center of the sphere?

    Think of the example below but with the camera inside the sphere... at the center.

    I have a feeling this is not possible but thought I'd ask anyway. :)
     
  13. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    I don't have Time of Day asset and can say nothing.

    T4M shaders are part of package but will be removed in the next update.
    T4M shaders have two replacements Terrain To Mesh and Mesh Materializer.
    But you can save included T4M shaders and continue using them after updating.
     
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Curved World includes sprite shaders too. There work exactly same way as other '3d' shaders.
    There is special 2D bend type for 2D games but it bends only two axis: along camera X axis(horizontal, like below gif) and Z (its camera depth) so below gif can be converted into top-down Little Planet_ish effect too.




    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Jan 7, 2016
  15. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    Did anyone ever determine if Curved World 2 will work with Horizon[ON]?
     
  16. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    I am experimenting with Curved World and Gaia.

    Couple of probably easy things... my terrain trees are not sticking to the terrain and obeying the curve properly.. is there a way to fix this - am using the default SpeedTree's that come with Gaia, and they are being embedded as terrain trees.

    Water is also not curving properly. Its like the terrain is curving - but nothing else is maintaining its relative curve.

    Grab 20160108092729 w1900h1200 x-230y39z410r122.jpg Grab 20160108092831 w1900h1200 x193y184z361r240.jpg
     
  17. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    If it uses custom shaders than I am sure shaders can be modified for Curved World. Check CustomShaders.pdf file inside Doc folder.
    If it generates mesh than it must use Curved World Shaders.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Jan 8, 2016
  18. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Thanks for your response - there are no custom shaders - just standard unity terrain and standard unity water.
     
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    All objects must use Curved World shaders including trees and water.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Jan 8, 2016
  20. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Ok - so sounds like i need to update the speed trees and the standard unity water to use your stuff as well - cool will have a play and post some shots :)
     
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Curved World includes Terrain shaders. Just replace Unity built-in terrain shader from terrain settings on material with CW shader.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Jan 8, 2016
    AdamGoodrich likes this.
  22. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Would like to see how Curwed World bends Gaia :)



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Jan 8, 2016
    AdamGoodrich likes this.
  23. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Bend it like... Curved World - Spent 5 mins creating the scene in Gaia - then the rest of the time playing with Curved World - Very nice!!

    Grab 20160108112413 w1900h1200 x19y45z-54r337.jpg Grab 20160108112508 w1900h1200 x-106y34z17r116.jpg Grab 20160108112841 w1900h1200 x-179y93z114r2.jpg Grab 20160108113129 w1900h1200 x-20y42z500r338.jpg

    Gaia is capable of many more styles and types of environment - just put something quickly together with the random generation capability in the upcoming release :)
     
    davbar9 and Arkhivrag like this.
  24. Gruguir

    Gruguir

    Joined:
    Nov 30, 2010
    Posts:
    340
    I was sure that i read somewhere on the asset store page some time ago that it was compatible with Oculus Rift.
    Maybe i dreamed it or it has changed ? Just bought and tried it and it doesn't seems to work.
    ( btw @AdamGoodrich those pics looks great)

    Edit : Ok maybe i worried too much. It's not working with '2D perpective Scene', but works fine with the classic runner 3D example. I'd be interested on any additional info/advice on vr usage.

    Edit2 : I should have investigated more than two minutes before my initial post. My assumptions are now that eagle eye script is not adapted to VR, and then i should use the mesh bound corrector script or the dead vertex trick ?
     
    Last edited: Jan 8, 2016
    AdamGoodrich likes this.
  25. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    Adam, if I'm seeing this right (it's late) it looks like you are answering for Horizon[ON], when I'm pretty sure you're talking about GAIA.

    So to be clear: Horizon[ON] definitely uses custom shader magic, and users would have to see about adapting it to use it with Curved World 2.

    GAIA is not tied to any particular shaders, it uses standard Unity terrain and water, so you can bring your own shaders to GAIA, including Curved World 2.
     
  26. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Yep - Just talking about Gaia. Gaia uses no custom shaders - it's compatible with anything that uses standard Unity terrain.
     
  27. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Curved World is tested on Oculus Rift and Sumsung Gear and it works.
    2D Projector bend type is exception because it has no full depth control, that's why it is called 2D.
    EagleEye is per-camera script for avoiding mesh disappearing. If game uses several cameras apply script to all of them.



    VacuumShaders - Facebook Twitter YouTube
     
  28. zhuchun

    zhuchun

    Joined:
    Aug 11, 2012
    Posts:
    433
    Hi, I just purchase this and it looks awesome!
    I want to know can it generate a seamless planet? I want to display a few planets in camera and make sure player can't find any weird edge when they orbiting around.
    In those little planet examples, lots of planes has been used to extend planet's terrain. I thought one plane is enough before you know, just like use a paper to wrap a ball, smaller plane means smaller planet, it's a perfect sphere anyway. This idea seems wrong. So is there any guide about how to make that?
    Thanks.
     
  29. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Curved World does not convert plane into sphere (where you can move around on 360 degree and return to starting position), it works like bend modifier but inside shader.
    Bend quality depends on mesh vertex count and you can use one plane for smooth effect. In example scenes are used Unity built-in plane meshes that has only 10x10 vertices that's why it may seem effect needs many meshes.



    VacuumShaders - Facebook Twitter YouTube
     
    zhuchun likes this.
  30. Gruguir

    Gruguir

    Joined:
    Nov 30, 2010
    Posts:
    340
    It's just that Objects keeps disappearing with the eagle eye script attached. I guess it would works with the 'ovr camera rig' provided in oculus utilities, but i don't use it, just native UT VR camera, where you have only one camera visible in your hierarchy view. Result is the script modify the camera FOV on one eye (UT 5.3.1p1).
     
  31. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Seams Unity bug, if script effects only one eye.
    Here is base logic behind EagleEye sript, it overrides camera's FOV to avoid mesh disappearing:
    Code (CSharp):
    1.  
    2. void OnPreCull()
    3. {
    4.     camer.fieldOfView = newValue;
    5. }
    6.  
    7. void OnPreRender()
    8. {
    9.     camer.fieldOfView = originalValue;
    10. }
    You can test it manually on your device instead of EagleEye script.



    VacuumShaders - Facebook Twitter YouTube
     
  32. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Could you please let me know how to handle the issues with large planes? Thanks!
     
    JohnRossitter likes this.
  33. JohnRossitter

    JohnRossitter

    Joined:
    Dec 18, 2013
    Posts:
    1,027
    I think it was really an issue of mesh density on the planes.
    If you are trying to cover a large area with a low poly plane, you will see blocky looking curvature.
    However, if you use a higher density plane, the shader can do more with it to smooth it out.
     
    Maulwurfmann likes this.
  34. Kolgrima

    Kolgrima

    Joined:
    Feb 2, 2009
    Posts:
    40
    First off this is very awesome! Any plans for Shader forge integration, like Marmoset Skyshop dose?
     
  35. steeloblk

    steeloblk

    Joined:
    Dec 27, 2014
    Posts:
    20
    Is KvantLattice and tunnel is the package, I can't seem to find and set it up?
     
  36. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Currently, no plans.

    Check Bonus package.



    VacuumShaders - Facebook Twitter YouTube
     
  37. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    @ Arkhivrag: Curved World is really awesome! Thank you for this!
    But i have a little problem, i want to integrate it in an existing project (endless racer), but this has a different axis setup (dont ask me why i did it this way... i have no idea :oops:)



    Making it bend upside down works if i use the Z axis. But i can not make it bend sidewards (to add curves), if i modify the Y-Axis it will not bend correctly, see below:




    Do you have an idea how Curved World can be modified to work with this different axis setup?
    Because changing our project to the correct axis setup would be really a lot of work...

    Thanks in advance!
     
  38. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    It will be headache to remap bend axis.
    All bend algorithms are described inside CurvedWorld_Base.cginc file.
    Find your definition of your bend type and try modify it for your needs (not sure if just changing X axis with Z will help).
    Note, that there are two bend functions for vertex only and another with normal (lit/shadow shaders rely on it).

    If you succeed in shader part, you will have to modify one CPU part function too :) that handles raycasts/physics update (if you need it of course).



    VacuumShaders - Facebook Twitter YouTube
     
    Maulwurfmann likes this.
  39. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    It was very easy ;)






    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Jan 12, 2016
    Becoming and hopeful like this.
  40. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Hey Arkhivrag!
    I am the creator of Horizon[ON, ]Nathaniel forwarded your mail to me but i didn't have time to answer yet. Great to see that you got it working without my help. Can you send me your modified shaders?

    I am wondering about the terrain transitions though and if it even makes sense to use curved world with Horizon, as it is meant for the distance and the player would never reach it like in an infinite runner scenario for example...

    Although i am sure there are some other creative usecases.

    Cheers,
    Peter
     
  41. davbar9

    davbar9

    Joined:
    May 19, 2014
    Posts:
    62
    Videotutorial creating the scene please ^^
     
  42. Zamoht

    Zamoht

    Joined:
    Nov 23, 2014
    Posts:
    1
    I was wondering, does Curved World work with Ceto: Ocean System or any other ocean system on the Asset Store?
     
  43. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    If it's shader only effect then I see no problems.



    VacuumShaders - Facebook Twitter YouTube
     
  44. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Did you receive my message in PM, sent last week?



    VacuumShaders - Facebook Twitter YouTube
     
  45. alexisrabadan

    alexisrabadan

    Joined:
    Aug 26, 2014
    Posts:
    82
    Hey, is there any highly optimized mobile shaders available? Tried the ones recommended in the description (on directional, unlit) but they still cause a framerate to sit at about 30fps in your demo scene on a mid range android device.

    I want to end up with about 200k tris so would expect this to drop much further once I added the rest of my stuff in. I noticed that the shaders have a lot of extra options, like additive color and such, so I wonder if removing all these would provide enough of a performance boost to be worthwhile? If not, I'll just look into something else
     
  46. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    1. Demo scenes are too heavy for mobile.
    2. All shaders are highly optimized, but for mobiles better use Unlit or One directional lights.
    3. Extra options are 'optional', automatically excluded from calculation if not used.



    VacuumShaders - Facebook Twitter YouTube
     
  47. FrodoProd

    FrodoProd

    Joined:
    Mar 7, 2015
    Posts:
    2
    Is there an easy way of making a camera follow a moving player?
    With the things I tried, the camera follows the 'un-curved world'.

    I'm sure there is an easy solution that I'm just overlooking.
     
  48. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Check example scenes, 'non shadered' objects (rigid bodies, nav agents, flares...) there use Follow script for updating their 'curved world' position.



    VacuumShaders - Facebook Twitter YouTube
     
  49. jazzbearz

    jazzbearz

    Joined:
    Feb 3, 2016
    Posts:
    1
    Is there any precompiled shader program in Curved World? We're using 5.3 version of unity and we're getting messages like:

    02-04 01:29:02.164: W/Unity(25840): GpuProgram creation error: shader program type is unrecognised. You might have a precompiled shader asset from an old Unity version.

    Can you check it and update if necessary?
     
    Last edited: Feb 3, 2016
  50. Farooqui

    Farooqui

    Joined:
    Mar 9, 2014
    Posts:
    23
    Quick question, does anyone know if we can implement tilt movement into the preexisting movement script within Curved world? please help!!! and is there a way to turn off the rotation of the player from that script.