Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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,620
    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,620
    Such feature is out of the scope of the Curved World.



    Amazing Assets - YouTube Facebook Twitter
     
  5. borbs727

    borbs727

    Joined:
    Jan 9, 2018
    Posts:
    7
    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,620
    Try using transformed vertex from Curved World node output.



    Amazing Assets - YouTube Facebook Twitter
     
  7. borbs727

    borbs727

    Joined:
    Jan 9, 2018
    Posts:
    7
    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,620
    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:
    181
    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,620
    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:
    181
    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:
    7
    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:
    7
    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
    upload_2021-4-9_14-2-29.png
    upload_2021-4-9_13-12-29.png
     

    Attached Files:

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

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    275
    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,620
    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:
    20
    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:
    275
    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 at 7:09 PM
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,620
    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 at 9:57 PM
  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 at 5:58 AM
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,620
    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
     
unityunity