Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

► Curved World ◄

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

  1. CHOPJZL

    CHOPJZL

    Joined:
    Dec 5, 2016
    Posts:
    54
    Maybe this is a dumb question, isn't streching and bending actually the same?
     
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
    Last edited: Apr 1, 2021
  3. CHOPJZL

    CHOPJZL

    Joined:
    Dec 5, 2016
    Posts:
    54
    Is it possible to add a stretching feature by vertex transformation?
     
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
    Such feature is out of the scope of the Curved World.



    Amazing Assets - YouTube Facebook Twitter
     
  5. borbs727

    borbs727

    Joined:
    Jan 9, 2018
    Posts:
    8
    I have some world space shader effects going on in a shader (URP shader graph) that is also bending. Is there a way to bend these effects as well? I've tried replacing my Position (world) node with the CurveWorld node but it doesn't seem to do anything.

    Some more context: This brightness needs to follow the player as they move left and right. So in this image the player is on the right of this object, I'd like this brightness to be on the right of every object even while bending:
    upload_2021-4-7_11-29-23.png upload_2021-4-7_11-31-16.png
     
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
    Try using transformed vertex from Curved World node output.



    Amazing Assets - YouTube Facebook Twitter
     
  7. borbs727

    borbs727

    Joined:
    Jan 9, 2018
    Posts:
    8
    I tried that yesterday but it didn't seem to be working for some reason. After your suggestion I made my objects bigger to see what was going on and it looks like the curve is there, it just needs to be inverted so it follows CurvedWorld's horizontal size value. I'm not sure how to go about doing that, any ideas?

    One thing I should mention is that this line's position in space should follow the player's position left and right on the x-axis. I only need the bend to be inverted, if that makes sense.

    upload_2021-4-8_12-56-46.png

    Current graph:
    upload_2021-4-8_12-59-36.png
     
    Last edited: Apr 8, 2021
  8. toddreinert

    toddreinert

    Joined:
    Aug 10, 2020
    Posts:
    1
    I am sure this has been asked before, but I was not able to find the answer.
    Is it possible to simulate a O'neill cylinder space station?
     
    Last edited: Apr 9, 2021
  9. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
    It is possible using Spiral bend types (no examples included for this effect).
    But note that curvature is pure shader/visual effect and source mesh and scene is not really transformed or modified. If scene is flat before using Curved World vertex transformation, it still will be flat after using CW.
    One of the main problems you may encounter is how you manage objects movement (if you need this) on the edges of your flat scene, that will be connected after CW transformation for creating such cylindrical effect.


    Try, create your world space transformation inside graph, after that change this vertex from world -> to object, and use it as input for CW node. Connect CW output to the master node vertex position.



    Amazing Assets - YouTube Facebook Twitter
     
  10. Aladine

    Aladine

    Joined:
    Jul 31, 2013
    Posts:
    184
    Hi, am trying to create a game similar to Resogun and i wonder if this asset would help me create that sort of "cylindrical" bend similar to this:
     
  11. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
    No.
    In Resogan scene is already modeled in cylindrical shape.



    Amazing Assets - YouTube Facebook Twitter
     
    Aladine likes this.
  12. Aladine

    Aladine

    Joined:
    Jul 31, 2013
    Posts:
    184
    yeah that's what i thought too, was just playing with there Photo Mode, it's definitely modeled to be like that
     
  13. borbs727

    borbs727

    Joined:
    Jan 9, 2018
    Posts:
    8
    I think this is what you suggested?
    upload_2021-4-9_12-15-32.png upload_2021-4-9_12-15-49.png
    This causes the world to move inverse to the player's x position and the bright blue line no longer curves.

    What I'm looking to do is to get the bright blue line to follow the player's position as they move left and right along the bottom of the dark blue area. The curved would shouldn't move (dark blue), but this bright blue line should move left and right while maintaining the curve.

    upload_2021-4-9_12-19-57.png
     
  14. borbs727

    borbs727

    Joined:
    Jan 9, 2018
    Posts:
    8
    I'm getting closer I think. This gives me the correct bend direction and follows the player, but it's flipped along the z-axis haha

    upload_2021-4-9_13-7-41.png
    upload_2021-4-9_13-7-56.png

    EDIT:
    got it! thanks! Used matrix to filp it over the z
    View attachment 831661
    upload_2021-4-9_13-12-29.png
    upload_2021-4-22_18-30-46.png
     

    Attached Files:

    Last edited: Apr 22, 2021
    Arkhivrag likes this.
  15. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    304
    Docs are a bit out of date. Could you explain what "spherical world" is? How is it different from "little planet"?
     
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
    Both are same shader bending effects. It may use other names too. Name just describes bending type it creates.



    Amazing Assets - YouTube Facebook Twitter
     
  17. thegreatmiasma

    thegreatmiasma

    Joined:
    Mar 27, 2016
    Posts:
    21
    Im looking to make a helicopter game, so elevation changes, utilizing raycast. Should this work with this asset. Im assuming the ray cast would "curve" but remain straight because its based on the geometric horizon and not the shader based one. Correct? Would the rising, falling, and rotating of the helicopter mess with this asset at all? Im looking to have just a slightly rounded horizon in a low poly, limited area.
     
  18. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    304
    Thanks. I've picked up the asset now and would like to know what "Curvature Size" means in Little Planet. Is it effective degrees? I have a 180° map segment to put on a hemisphere so I need a 1-to-1 ratio.

    EDIT: Also, do I need to be concerned about performance when running on a 2 million vertex terrain on pc?
     
    Last edited: Apr 15, 2021
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
    As bending effect is calculated only during rendering and scene meshes are not modified, raycast will not hit the pixel you've picked on a screen. However it is possible to calculate bending position of a vertex on the CPU for 'non shader' objects, for example transform colliders position from scene position to Curved World position. In this case Raycast pointing to this collider will hit it.
    CW bending effect is calculated in world space and has its own user controllable pivot point, camera position or rotation does not affect it.


    "Curvature Size" is not equivalent of degrees, but a strength value pushing vertexes up or down for creating spherical effect.
    As for performance, it entirely depends on a shader where Curved World transformation is integrated and not the bending algorithm.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Apr 15, 2021
  20. Noah-Essa24

    Noah-Essa24

    Joined:
    Apr 17, 2013
    Posts:
    9
    I recently purchased this asset and was wondering if there's a simple way to create a spherical planet you can loop around from a terrain?
    I also can't seem to find anything about the Spherical planet that was advertised on the assetstore anywhere in the package or the documentation?
     
    Last edited: Apr 18, 2021
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
    Converting mesh into real 3D sphere and loop around it or making full 360° rotation around it is not possible, neither with Curved World shader nor any other script or mesh manipulator tools.
    As described in documentation if mesh is flat, it still will be flat after using CW shaders, just rendered differently based on used effect (spherical , cylindrical, spiral) and point of observing. Documentation on page 12 explains how various bend types look from different points of view.
    Spherify, Spherical World, Little Planet are names of the same shader bending effect (other similar names may be used too) that gives spherical look to a mesh. Package contains example scene Bend - Little Planet (Y) and Documentation explains several tutorials using this bend type.



    Amazing Assets - YouTube Facebook Twitter
     
  22. borbs727

    borbs727

    Joined:
    Jan 9, 2018
    Posts:
    8
    Hello, this is a continuation from this question: https://forum.unity.com/threads/curved-world.344041/page-25#post-7015120

    I need this dashed line to follow the player's position left and right while maintaining the bend across the mesh. I have it working with only Horizontal and Vertical parameters used. I had to use a matrix to flip the bend, otherwise it was off. Here it is working:
    upload_2021-4-22_18-40-1.png

    I'm running into an issue that causes the dashed line to over bend when I use the `Curvature` parameter. Like this: upload_2021-4-22_18-41-30.png

    It seems to be bend twice as much as the value I'm inputting. Do you have any suggestions for how I could solve this?
     
  23. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
    If it so complicated, why just not use additional plane mesh above road with dashed line texture and use material with Curved World shader to bend it like all other objects in the scene. Instead of calculating bent line inside shader. In this case it will work with all bend types and in all scenarios, and its is much easier.



    Amazing Assets - YouTube Facebook Twitter
     
  24. Patrick_Rainer

    Patrick_Rainer

    Joined:
    Feb 26, 2018
    Posts:
    49
    Dear All

    Is it correct that you have no ready to use shaders for the Universal Render Pipeline?

    Did I make mistake with importing, or do I missunderstand something?

    Do I need to modify the standard URP-Lit shader?

    upload_2021-4-29_7-16-47.png

    br Patrick
     
  25. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
    Curved World is ready for URP 2019.4 - 2020.3 and after importing URP package there should be other shaders too:
    upload_2021-4-29_11-1-47.png


    If they are missing, try to reimport them using Curved World editor window:
    upload_2021-4-29_11-3-30.png

    Make sure latest version of the Unity URP is installed. You can check it and update from Package Manager.



    Amazing Assets - YouTube Facebook Twitter
     
  26. Patrick_Rainer

    Patrick_Rainer

    Joined:
    Feb 26, 2018
    Posts:
    49
    I see when I import the shaders, I am getting the following error:

    The newest Version of URP is installed.



    Amazing Assets - YouTube Facebook Twitter[/QUOTE]
     
  27. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
    What Unity version are you using?
    What is Universal RP version?



    Amazing Assets - YouTube Facebook Twitter
     
  28. Patrick_Rainer

    Patrick_Rainer

    Joined:
    Feb 26, 2018
    Posts:
    49
  29. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
  30. Patrick_Rainer

    Patrick_Rainer

    Joined:
    Feb 26, 2018
    Posts:
    49
    Strange, the package manager says, it is the newest version. Thank you, will try and let you know.
     
  31. Patrick_Rainer

    Patrick_Rainer

    Joined:
    Feb 26, 2018
    Posts:
    49
    Dear all

    I am facing another issue. I use some particle Systems in my scene. I have already changed them to a curved world shader, but some how, they goe now in a totally wrong direction.

    Looks like this with the normal particle shader:
    upload_2021-5-7_15-58-17.png

    Looks like this with the curved world shader:
    upload_2021-5-7_15-58-45.png

    The shader of the particle system:
    upload_2021-5-7_15-59-46.png
     
  32. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
    Quite difficult just from screenshot to guess what is going wrong there.
    Try, isolate particles in an empty or very simple scene and check bend effect there.
    Bending method is only one and it is used by all meshes and materials, it is not possible that everything is working correctly except particles.



    Amazing Assets - YouTube Facebook Twitter
     
  33. oigetinthevan

    oigetinthevan

    Joined:
    Aug 1, 2018
    Posts:
    4
    Hiya, firstly thanks for such a great shader! It's made all the difference in my project.

    Has the projector shader been removed? I had some trouble with blob shadows and read somewhere in this thread that a curved world projector shader is indeed available, however, it doesn't seem to be in my list or in the shader packages Window > Amazing Assets > Curved World > Shader Packages.

    I'm using Version 2021.1.0 - February 15, 2021

    Any help on this would be great! My blob shadows appear above everything when they're off in the distance. Not the end of the world, but I'd do anything to get it fixed.

    Thanks again
    Hiro

    upload_2021-5-9_0-4-40.png
     
  34. Patrick_Rainer

    Patrick_Rainer

    Joined:
    Feb 26, 2018
    Posts:
    49

    Ok. Sorry now I installed a new unity version because I tought may be there is a package to old or so. Now I am getting an error message about your particle shaders:

    Shader error in 'Amazing Assets/Curved World/Particles/Simple Lit': redefinition of 'AttributesParticle' at World/Shaders/Custom/Particles/ParticlesSimpleLitForwardPass.hlsl(7) (on d3d11)

    Compiling Vertex program
    Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHTMAP_DLDR_ENCODING
    Disabled keywords: _NORMALMAP _EMISSION _SPECGLOSSMAP _SPECULAR_COLOR _GLOSSINESS_FROM_BASE_ALPHA _RECEIVE_SHADOWS_OFF _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON _ALPHATEST_ON _COLOROVERLAY_ON _COLORCOLOR_ON _COLORADDSUBDIFF_ON _FLIPBOOKBLENDING_ON _SOFTPARTICLES_ON _FADING_ON _DISTORTION_ON _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS _SHADOWS_SOFT FOG_LINEAR FOG_EXP FOG_EXP2 CURVEDWORLD_DISABLED_ON CURVEDWORLD_NORMAL_TRANSFORMATION_ON UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30


    I installed Unity 2020.3.7f1

    I already tried to reimport your shader package.

    What could here the issue?

    Next step I would try the to make an isolated scene to test the shaders.
     
  35. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
    Will try to add projector shaders in this week update.


    New update for Unity 2020.3.7 and 2021.1.6 is in development. Releasing by the end of this week.



    Amazing Assets - YouTube Facebook Twitter
     
    oigetinthevan likes this.
  36. isaacparsons

    isaacparsons

    Joined:
    Jan 29, 2018
    Posts:
    2
    Hey sorry if this is a dumb question but would these effects work at all for VR? or they can only work with a single camera?
     
  37. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
    Curved World is not a shader, but vertex transformation method integrated into shader and if that shader works with VR then adding CW transformations there will not effect shaders compatibility.
    Package includes overridden version of Unity built-in shaders. If original Unity shaders work with VR, then package included shader will work too.
    If those shaders are not enough, CW transformations can be integrated into shaders created by Unity ShaderGraph and Amplify Shader Editor.



    Amazing Assets - YouTube Facebook Twitter
     
  38. isaacparsons

    isaacparsons

    Joined:
    Jan 29, 2018
    Posts:
    2
    Oh cool, well if I get it working I'll let you know. These are already such awesome effects, but experiencing them in VR would be mind-blowing

    [EDIT]
    Yea so that was actually pretty easy to get working on my Quest 2 which was an awesome surprise! :D
     
    Last edited: May 15, 2021
  39. nickpettit-buck

    nickpettit-buck

    Joined:
    Mar 14, 2020
    Posts:
    2
    Hello,

    We're using the curved world asset in our project with Unity 2020.2.5f1 and URP 10.3.1 and we noticed that the URP's depth of field post processing effect doesn't seem to work properly with the typical "lit" version of the shader. When DOF is applied, the various settings either blur the entire image or leave it as is, rather than "focusing" on a specific area and only blurring parts of the image selectively. We're using the "Classic Runner (Z Positive)" variation in case that matters. Changing the materials back to URP's lit shader makes DOF work correctly again.

    Additionally, we noticed that Unity's current implementation of SSAO (as a render feature) also isn't working.

    I'm not really sure why this might be the case, but any help would be greatly appreciated.
     
  40. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
    Unity 2020.2.5f1 is not supported, minimum required version is 2020.3.8 and URP to 10.5.
    After upgrading Unity, remove Curved World folder from the package and re-download it from the store. Based on the used UnityEditor version will be downloaded appropriate CW package.



    Amazing Assets - YouTube Facebook Twitter
     
  41. Ceciaman

    Ceciaman

    Joined:
    Jul 30, 2013
    Posts:
    31
    Thank's for this beautifull Asset

    Question:
    How can mantained the moon (sphere 3d) always spherize olso if move curved world horizontal o vertical?



    Untitled-2.png
     
  42. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
    If mesh does not use Curved World shader and you need it to follow a curvature, you have to manually adjust such objects position from script.
    Check Non-Shader Bending example scenes and how object's position there are updated using TransformDynamicPosition and TransformStaticPosition scripts.



    Amazing Assets - YouTube Facebook Twitter
     
  43. Ceciaman

    Ceciaman

    Joined:
    Jul 30, 2013
    Posts:
    31
    T's fantastic
     
  44. kocyigityunus

    kocyigityunus

    Joined:
    Sep 19, 2014
    Posts:
    1
    Hello @Arkhivrag , i am trying to curve a box which has individual scale properties like 20 on x, 0.1 on y and 5 on z. I'm getting weird results, seems like it's not bending. but when i try using 1,1,1 scaled objects it's seems to work fine. am i missing a limitation ?
     
    Last edited: Jul 8, 2021
  45. SpiderJones

    SpiderJones

    Joined:
    Mar 29, 2014
    Posts:
    197
    Hi. I've purchased your asset. Great work! I have a question, are there any disadvantages of using non Curve World shaders with TransformDynamicPosition or TransformStaticPosition VS using a Curve World shader and material?
     
  46. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
    Use shader on meshes requiring bending effect.
    Use script for objects that can not use materials (for example: point light, collider, etc) and need to have the same curvature.



    Amazing Assets - YouTube Facebook Twitter
     
  47. SpiderJones

    SpiderJones

    Joined:
    Mar 29, 2014
    Posts:
    197
    Thank you. What about particle emitters? Would the emitter use the script (TransformDynamicPosition or TransformStaticPosition) and the particles use a curve world material?
     
  48. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,716
    Use shader if particles need to follow curvature.
    Use script if emitter needs to follow curvature.



    Amazing Assets - YouTube Facebook Twitter
     
  49. SpiderJones

    SpiderJones

    Joined:
    Mar 29, 2014
    Posts:
    197
  50. SpiderJones

    SpiderJones

    Joined:
    Mar 29, 2014
    Posts:
    197
    How does a pivot point's rotation affect the curve? I've noticed that when I change the rotation it drastically changes the behavior of the curve. Why is that?
     
unityunity