Search Unity

► Curved World ◄

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

  1. unity_onj9TY_tZ93X8Q

    unity_onj9TY_tZ93X8Q

    Joined:
    Nov 30, 2020
    Posts:
    1
    Hello, I am having an issue with shader generator. When I try to combine toony colors pro 2 and curved world, I take errors. I tried to make it manually but I could not find where to put Vertex Transformations in the hybrid shader.
     

    Attached Files:

    • 111.png
      111.png
      File size:
      543.4 KB
      Views:
      195
    • 222.png
      222.png
      File size:
      763.7 KB
      Views:
      197
  2. Harikoah

    Harikoah

    Joined:
    Apr 7, 2022
    Posts:
    19
    Hi, does the Curved World shader work with the built in URP ambient occlusion effect or what way could ou suggest to have ambient occlusion in a curved world scene ? When I use the standard terrain shader, the forward renderer's "New Screen Space Ambient Occlusion" works, as soon as I drag the curved world material on the terrain, the AO effects gone :(
     
  3. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    No problems found in the latest Unity 2020.3.33 and 2021.3.3 versions.
    ao.gif



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: May 21, 2022
  4. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,976
    Hi @Arkhivrag , I have not bought the asset yet but I was wondering if when using curved world, is there a way to do occlusion culling on anything that goes beyond the horizon (the unseen area past the curve)?
     
  5. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Package includes scrip overriding camera's default culling matrix, making objects outside camera's view frustum to be included in the rendering.



    Amazing Assets - YouTube Facebook Twitter
     
  6. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,976
    Some clarification: I assume you mean "excluded" from rendering in that response right rather than "included"? otherwise it means that everything is being drawn whether in view or not?

    If so then Fantastic, in all likeliness will purchase sometime very soon then and integrate.

    Also thanks for the speedy response :)
     
  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Some clarification: Curved World works with Unity's built-in Occlusion Culling system. No changes are required here.

    As for package included script overriding camera's default culling matrix, it is used to make visible those meshes that are outside of camera's view frustum (include meshes back to the rendering pipeline). Explained in the Manual file page 15.



    Amazing Assets - YouTube Facebook Twitter
     
  8. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,976
    Perfect! Will purchase sometime in the next week or two then :) Thanks!

    Final question:

    I see its called Curved World 2020, am I right in understanding it supports latest 2021 LTS release and will continue to? Dont want to buy it if Curved World 2021 will come out as another paid asset sometime soon for example, as in that case would just wait for that to release
     
  9. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Currently asset supports Unity 2019.4, 2020.3 and 2021.3 LTS versions only.

    Today I cannot answer how and if Unity 2022 and other future versions will be supported. Will it be free or paid upgrade, or completely new package. I will decide this only next year, after Unity 2022 is released as LTS version and finding out what is it capable of, what new tools and features are available and what limitations they have.



    Amazing Assets - YouTube Facebook Twitter
     
  10. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,976
    Thats fine, we are using 2021.3 LTS and have no intention to move to 2022 anytime soon (and most likely will not until this project is released).

    Thanks!
     
  11. Harikoah

    Harikoah

    Joined:
    Apr 7, 2022
    Posts:
    19
    But that's not the terrain shader, that's "just" a lit material ?
    In my test it looks like this with ambient occlusion:the terrain has the curved world terrain shader with a grass material layer , the rocks both have a curved world shader, the tree trunk too. The rocks and tree only "cast" global illumination on the standard materials, not on the curved world terrain shader :(
    Bildschirmfoto 2022-05-25 um 16.02.01.png

    If I set the forward renderer AO effect bon Depth Normals, no effect occurs, I even got an error message that something is wrong with "DepthNormalsVertex"in the curved world shader.

    Bildschirmfoto 2022-05-25 um 16.08.21.png
     
  12. Harikoah

    Harikoah

    Joined:
    Apr 7, 2022
    Posts:
    19
    Correction, I got another error message and it also does NOT work if the rock and plane underneath have Botha curved world shader :(
    Bildschirmfoto 2022-05-25 um 16.15.28.png
     
  13. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
  14. Harikoah

    Harikoah

    Joined:
    Apr 7, 2022
    Posts:
    19
    Bildschirmfoto 2022-05-27 um 09.52.49.png
     
  15. yyylny

    yyylny

    Joined:
    Sep 19, 2015
    Posts:
    93
    Does the Curved World Unlit shader in the latest version supports the SRP batcher? Unity claims it doesn't because "Material property is found in another cbuffer than "UnityPerMaterial" (_MainTex_ST)
     
  16. tomworcom

    tomworcom

    Joined:
    Dec 27, 2011
    Posts:
    50
    Hi, since updating to the latest version, I get this error:

    Code (CSharp):
    1. Property CurvedWorld_ClassicRunner_Z_Positive_ID1_BendMinimumRadius already exists in the property sheet with a different type: 2
    I also get it for three more properties, BendAngle, BendSize, BendOffset.
    Everything still works, but the error message always pops up in the console.
    What's it about? How do I get rid of it?
     
  17. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Unity version? Render pipeline version?


    Already fixed in v2022.3



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Jun 2, 2022
  18. yyylny

    yyylny

    Joined:
    Sep 19, 2015
    Posts:
    93
    Unity v. 2021.3.2f1 using URP.
     
  19. SpanielTheFirst

    SpanielTheFirst

    Joined:
    Mar 14, 2022
    Posts:
    2
    Hi, I currently have a problem with the unlit curved world shader. I'm using flat 3D meshes with textures and cutout transparency on it. For some reason if I move one of the meshes that uses the curved world shader, it suddenly renders in opaque. Sometimes it randomly jumps back to cutout again... I think this happened sometimes after we have updated our project to Unity 2021. Could it maybe have something to do with that?
     
  20. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Try new update v2022.4


    Unity version?
    Render pipeline?
    Shader name?
    Video demonstrating problem also will be helpful.



    Amazing Assets - YouTube Facebook Twitter
     
  21. SpanielTheFirst

    SpanielTheFirst

    Joined:
    Mar 14, 2022
    Posts:
    2
    2021.3.1f1
    SRP
    Amazing Assets/Curved World/Shaders/Custom/Unlit

    upload_2022-6-2_18-15-15.gif
     
  22. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
  23. yyylny

    yyylny

    Joined:
    Sep 19, 2015
    Posts:
    93
    It works :) Thanks!
     
  24. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Prebuy question:
    Does it work on mobile and webgl and how is the performance.

    Cheers
     
  25. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Works on all devices with the same performance.
     
  26. silentslack

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    393
    Hi, what's the easiest way to get a simple water shader working? I see on the first page it states there is a water shader but I can't seem to find?
     
  27. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Unity 4.6 and Unity 5 had their own water shader and CW included it too. It was removed after releasing Unity 2017.
     
  28. BlackSilence89

    BlackSilence89

    Joined:
    Mar 24, 2022
    Posts:
    6
    Have you resolved this "serious jitter" ... I am losing a lot of hours trying to figure out that.
    It 'shakes' when there is a curve. The camera is following the player and I am using the script "follow camera".
    The jitter continues to be persistent.

    Thanks
     
  29. yyylny

    yyylny

    Joined:
    Sep 19, 2015
    Posts:
    93
    Unfortunately no. I think it's something in the way the shader works when the camera is being moved while also being the pivot point for the curved world controller. I hope it gets fixed.
     
  30. BlackSilence89

    BlackSilence89

    Joined:
    Mar 24, 2022
    Posts:
    6
    @Arkhivrag can you plese help to resolve this ? This is delaying a lot the work. I am losing a lot of time behind this.

    Below is the description of the issue:

    1) Camera follow script attached to camera. The player is moving along a road.
    2) Classic runner (z positive) configured for Curved World
    3) Using Standard Shader provided by "Curved World" plugin

    Issue: Jitter/shake when there is a curve. I see the walls shake a little bit. On mobile the issue is really annoying.

    You can see the issue here:

    https://drive.google.com/file/d/1z_dVjgirbVuI3wb4eB0KlUfEKbR33OSW/view?usp=sharing

    (in the video seems that the player is not moving, but it is moving)

    Note: I have already tried to tune the smooting of the camera, but nothing. I think there is some problem with the shader itself.

    Thank you
     
    Last edited: Jun 29, 2022
  31. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    All files inside Example Scenes folder are designed specifically for demonstration and tutorial scenes only (including CameraFollow script) and may not be suitable for other cases. That's why there are not inside the main Scripts folder.
    If those example files doesn't work in other project, you have to modify them or adjust for those needs (I can not help here).
    In your case problem may be in the scripts execution order, try changing it (first CWController and after that your camera follow script). Or try modify script using smoothdamp or add additional position smoothing methods. Or even try FixedUpdate instead of used LateUpdate. There may be other solutions.

    As for CW shaders, they are not affected by scripts or cameras.
     
    Last edited: Jun 29, 2022
  32. BlackSilence89

    BlackSilence89

    Joined:
    Mar 24, 2022
    Posts:
    6
    Thanks for the response.

    I tried below things without success:
    1) move the camera as child of the player (so I don't use any camera follow script)
    2) I wrote again the camera follow script using smoothDamp method but also in that case I noticed the shake on walls during curve.
    3) changed the script execution order
    4) unfortunately FixdUpdate, LateUpdate doesn't help

    It is happening with "standard" shader one (the Standard provided in plugin).

    Note: Don't know if it is relant but I noticed that the more the curvature is near the camera\player and the more is the "shaking".
    new video here: https://drive.google.com/file/d/1VErTJqx8X1NxvdLs7irwbSZdjmAO-1ma/view?usp=sharing



    Thank you
     
    Last edited: Jun 29, 2022
  33. Vueltero

    Vueltero

    Joined:
    Jul 22, 2020
    Posts:
    8
    Hi I'm getting this error "Couldn't open include file 'Assets/Plugins/Amazing Assets/Curved World/Shaders/Core/CurvedWorldTransform.cginc'." on a shader I added the curved world. Even tho the path to CurvedWorldTransform.cginc is ok. Any help?
     
  34. Vueltero

    Vueltero

    Joined:
    Jul 22, 2020
    Posts:
    8
    Does the asset support Unity 2021.3.5f1?
     
  35. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Just tested using Unity 2021.3.6. No problems found.
     
  36. zhangguoju1

    zhangguoju1

    Joined:
    Nov 8, 2018
    Posts:
    2
    hello, when i use custom shader, just a simple shader, but nothing happen, please.........
    Code (CSharp):
    1. Shader "Custom/DDSf"
    2. {
    3.     Properties
    4.     {
    5.         [CurvedWorldBendSettings] _CurvedWorldBendSettings("0,1|1|1", Vector) = (0, 0, 0, 0)
    6.     }
    7.     SubShader
    8.     {
    9.         Pass
    10.         {
    11.             Tags
    12.             {
    13.                 "RenderType"="Opaque"
    14.             }
    15.             //Cull Off
    16.  
    17.             CGPROGRAM
    18.             #include "UnityCG.cginc"
    19.  
    20. #pragma shader_feature_local CURVEDWORLD_BEND_TYPE_CLASSICRUNNER_X_POSITIVE CURVEDWORLD_BEND_TYPE_CLASSICRUNNER_X_NEGATIVE
    21. #define CURVEDWORLD_BEND_ID_1
    22.             #pragma shader_feature_local CURVEDWORLD_DISABLED_ON
    23.             #pragma shader_feature_local CURVEDWORLD_NORMAL_TRANSFORMATION_ON
    24.             #include "Assets/Amazing Assets/Curved World/Shaders/Core/CurvedWorldTransform.cginc"
    25.  
    26.             #pragma vertex vert
    27.             #pragma fragment frag
    28.  
    29.             struct appdata
    30.             {
    31.                 float4 vertex : POSITION;
    32.                 float2 uv : TEXCOORD0;
    33.                 float3 normal : NORMAL;
    34.                 float4 tangent : TANGENT;
    35.             };
    36.  
    37.             struct v2f
    38.             {
    39.                 float2 uv : TEXCOORD0;
    40.                 float4 pos : POSITION;
    41.                 float3 normal:TEXCOORD2;
    42.             };
    43.            
    44.             v2f vert(appdata v)
    45.             {
    46.                 v2f o;
    47.  
    48.                 #if defined(CURVEDWORLD_IS_INSTALLED) && !defined(CURVEDWORLD_DISABLED_ON)
    49.                 #ifdef CURVEDWORLD_NORMAL_TRANSFORMATION_ON
    50.       CURVEDWORLD_TRANSFORM_VERTEX_AND_NORMAL(v.vertex, v.normal, v.tangent)
    51.                 #else
    52.       CURVEDWORLD_TRANSFORM_VERTEX(v.vertex)
    53.                 #endif
    54.                 #endif
    55.                 o.pos = UnityObjectToClipPos(v.vertex);
    56.                 o.normal = v.normal;
    57.                 o.uv = v.uv;
    58.                 return o;
    59.             }
    60.  
    61.  
    62.             fixed4 frag(v2f i) : SV_Target
    63.             {
    64.                 return fixed4(1, 1, 1, 1);
    65.             }
    66.             ENDCG
    67.  
    68.         }
    69.     }
    70.     FallBack "Diffuse"
    71. }
    72.  
     
  37. yyylny

    yyylny

    Joined:
    Sep 19, 2015
    Posts:
    93
    Is this feature not available anymore? I'm not seeing it. Is there another way to make Curved World shader support fog?
     
  38. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Shader is correct and it is working. What kind of help you need?


    Fog support is built-in inside CW shader.
    If you are using deferred rendering you have to use post-processing fog to make any Unity shader work with fog.
     
  39. yyylny

    yyylny

    Joined:
    Sep 19, 2015
    Posts:
    93
    @Arkhivrag - Thanks but I have fog in my game and the CW particles/unlit shader seem to ignore it (and so do any other CW shaders I tried). I use forward rendering with URP and I can definitely see objects that use that shader far in the distance while all other objects disappear (because their shaders support the fog). If I create a custom shader that basically uses UNITY_TRANSFER_FOG(OUT, OUT.vertex) and UNITY_APPLY_FOG(IN.fogCoord, c) and integrate the CW shader in it, the fog is supported again (but the custom shader isn't as sophisticated as the CW shaders).
     
  40. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    At my side everything works correctly.
    Contact me using support e-mail (support@amazingassets.world) with more details and I'll check it. Attach asset invoice too.
     
    yyylny likes this.
  41. Vueltero

    Vueltero

    Joined:
    Jul 22, 2020
    Posts:
    8
    I fixed by right clicking the shader and hit reimport, that fixed it. It is a unity bug when moving the asset's folder
     
  42. Vueltero

    Vueltero

    Joined:
    Jul 22, 2020
    Posts:
    8
    yeah, everything is working great!
     
  43. emignacio

    emignacio

    Joined:
    Jul 14, 2022
    Posts:
    1
    Hi, I need help regarding the player movement since my player doesn't stick to the ground, but moves forward floating in the air. I'm using the cylindrical roloff z
     
  44. Harikoah

    Harikoah

    Joined:
    Apr 7, 2022
    Posts:
    19
    Hello, are there any news regarding support for Unity terrain grass (texture) detail ? It doesn't bend correctly with the terrain in our case. Should it by now, shouldn't it ? Thanks for clarifying !
     
  45. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Issues with terrain grass shaders are explained in the Manual file (page 47).
     
  46. garycampbell3690

    garycampbell3690

    Joined:
    Jul 2, 2018
    Posts:
    1
    Maybe a shader newbie issue on my part, but from what I read below and my experimenting with shadergraph I have been having some difficulty implementing a custom shadergraph using the curved world vertex subgraph..
    upload_2022-7-30_19-23-27.png

    upload_2022-7-30_19-26-58.png
    Trying to texture procedurally, based on the height from "sea level", but this changes aa the vertex position is updated and Im not sure if this is a caveat I cannot fix or if its a shadergraph issue?
     
    Last edited: Jul 30, 2022
  47. zhangguoju1

    zhangguoju1

    Joined:
    Nov 8, 2018
    Posts:
    2
    hello , i want use Twisted Spiral (X Positive) on world z axis forward, but it only work on y axis, any resolution? hope get reply
    upload_2022-8-16_11-51-18.png
    upload_2022-8-16_11-51-33.png
     
  48. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Twisted Spiral (X Positive) works only along world X axis.
    If you need it to work along Z axis, you have to use Twisted Spiral (Z Positive).
     
    zhangguoju1 likes this.
  49. Fletcher-Studios

    Fletcher-Studios

    Joined:
    Sep 25, 2014
    Posts:
    11
    Is this only working 2021.3.3? Tried upgrading my project to 2021.3.8 (URP) and its stuck at this error:

    Assets\Amazing Assets\Curved World\Editor\Material Editors\Builtin\LitShader.cs(19,66): error CS0103: The name 'headerStateKey' does not exist in the current context
     
  50. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    It works.
    Remove CW folder from the project, clear Asset Store cache folder and re-download asset using Unity 2021.3.8 package manager.