Search Unity

Curved World (OLD) - Screen Space Curvature Shader

Discussion in 'Assets and Asset Store' started by Arkhivrag, Nov 20, 2014.

Thread Status:
Not open for further replies.
  1. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Curved World - Screen Space Curvature Shader




    Curved World offers effect known as
    • Horizon bending
    • Exaggerated horizon curve
    • Cylindrical rolloff
    This effect is used in games such as Subway Surfers, Minion Rush, Animal Crossing.

    Curved World is not Image Effect and does not require Unity Pro. It's a simple, but powerful! per mesh material shader.

    Screen Space Curvature means - objects rendering as being bended only in camera view, while their world space parameters: position, rotation, scale and local mesh data: vertex, normals, tangents, uvs are not changed or modified. Because of this Curved World does not disturb any of game elements like: physics, animation, AI, path finding and other mesh transformations.

    Mesh bending quality depends on mesh vertex count along bend axis..

    Package contains only mobile optimized shaders: Unlit, One Directional Light, Mobile Terrain (similar as T4M), Particle and Projector shaders.
    Specular is calculated using lookup texture, without using heavy math.
    Shaders have optional parameters (can be turned on/off):
    • Image Based Lighting
    • Fog (per vertex)
    • Rim effect (per vertex)
    • Fresnel reflection (per vertex)
    • Using mesh vertex color
    • Point lights calculation in the same single pass as Directional Light (per vertex)
    Turned off parameters are also excluded from shader calculations.

    Documentation and example scenes inside package.
    Download ReadMe.pdf file



    Current Version Limits:
    No Forward Add pass (no point and spot lights per pixel), Deferred rendering, Lens Flare and Unity terrain support.


    Curved World 2 for Unity 5 WIP: http://forum.unity3d.com/threads/curved-world-2-wip.335331/#post-2178939


    v1.25
    • Fixed lightmap calculation for Unity 4.6

    v1.24
    • Global Controller contains function for calculating point's bend position according to Global Controller parameters. Function can be used for finding bended colliders in scene and detection pickup/touch objects.

    v 1.23
    • Improved shaders (reduced instruction count)
    • Fixed lightmaping problem with mobile terrain shaders.
    • Particle fog improved

    v1.22
    • Fixed - Particle shaders did not display global switch button inside material editor.

    v 1.21
    • Scene Material Baker replaced with improved Scene Material Manager

    v 1.2
    • Added Scene Material Baker.
    • Added UV Scroll shaders.
    • Added FX/Flare shader.
    • Improved shader baking (unlit shaders are 2x smaller).

    v1.12
    • Fixed realtime shadows for bumped and terrain shaders

    v1.11
    • Added editor API to work with Curved World shaders from custom user scripts. (Info in Readme file)

    v1.1
    • Added Image Effects support (restart Unity after importing package)
    • Added mobile terrain shaders (T4M)
    • Added bumped shaders
    • All unlit shaders support IBL, Emission and Lightmapping
    • Baked shaders are about 5x smaller
    • Shaders can be baked on multi-material meshes
    • Fixed mesh bending on iOS
    • Several micro improvements and optimizations

    v1.03
    • Added custom shaders support
    • Added shaders to blend two textures

    v1.02
    Fixed Mesh Bounds Corrector script. Did not update and stayed equal to 1

    v1.01
    Improved IBL and Point Lights rendering










    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Jun 28, 2015
    pmaloo, rakkarage, nuverian and 2 others like this.
  2. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Wow! This looks stunning, looking forward to seeing this in an actual demo. The effect is brilliant, very well done!
     
  3. GiantGrey

    GiantGrey

    Joined:
    Jul 2, 2012
    Posts:
    266
    this is super awesome!! Seems to be a much better solution to use your shader instead of building the world and all assets in a spherical way!
    Could you provide more informations?
     
  4. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    occulus rift compatible?
     
  5. Hesham

    Hesham

    Joined:
    May 29, 2008
    Posts:
    147
    Instant Buy
     
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Last edited: Nov 20, 2014
  7. b4c5p4c3

    b4c5p4c3

    Joined:
    Jan 4, 2013
    Posts:
    537
    amazing
     
  8. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Does the camera have to stay level with the ground in order to get that whole inception effect.. or can u look up while its happening
     
  9. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    @kurylo3d
    Curved World bends meshes in screen space, after they have been placed/transformed in world space.
    Bend effect depends on camera position and orientation.



    Vacuum Shaders
     
    Last edited: Nov 20, 2014
  10. lorenalexm

    lorenalexm

    Joined:
    Dec 14, 2012
    Posts:
    307
    Do you happen to have any speculation on the pricing at this time?
     
  11. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Price will be about 20$



    Vacuum Shaders
     
    Last edited: Dec 3, 2014
    Hesham and wetcircuit like this.
  12. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287
    Cool. Bookmarked. ;)
     
  13. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    575
    when do you will be able to release it
     
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    In two weeks, may be earlier.



    Vacuum Shaders
     
    Last edited: Nov 26, 2014
  15. sathya

    sathya

    Joined:
    Jul 30, 2012
    Posts:
    297
    @Arkhivrag
    Looks interesting. Does this work with colliders as well ? Does Colliders deform when world deforms.
    I have tried other methods but could not use them because of not having ability to deform the collider meshes.
     
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Physics, path finding, animations, particles, light maps, shadows and other game features work without problem.



    Vacuum Shaders
     
    Last edited: Nov 26, 2014
  17. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    I have updated web demo with additional physics scene.

    Poster_3.png
     
    Last edited: Feb 14, 2015
  18. alonsoGarrote

    alonsoGarrote

    Joined:
    Jun 23, 2012
    Posts:
    25
    Will this work on Mobile? if so, Does it have an aditional impact on performance?
     
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    @alonsoGarrote
    Curved World will contain two groups of shaders (volumes): Mobile and SM3(HD).
    Volume 1: Mobile will be released first. It is almost finished, just polishing them.
    Volume 2: HD will be released later.

    Shaders used in demo video and web player are from Mobile group.



    Vacuum Shaders
     
  20. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Last edited: Dec 9, 2014
    Hesham likes this.
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
  22. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,349
    This is trully amazing, very nice work
     
  23. Hesham

    Hesham

    Joined:
    May 29, 2008
    Posts:
    147
    bought
     
  24. tanoshimi

    tanoshimi

    Joined:
    May 21, 2013
    Posts:
    297
  25. MinhDao

    MinhDao

    Joined:
    Oct 28, 2013
    Posts:
    155
  26. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    @tanoshimi
    Effect may be the same, but my package offers much more then that:
    • Mobile optimization
    • Unlit, One Directional Light, Particle and Projector shaders
    • Image Based Lighting
    • Fast per vertex Fog, Rim and Fresnel reflection effects
    • Using vertex color
    • Solution to solve object disappearing.
    • Solution to control multiple materials simultaneously (using Globla Controller)
    Currently missing Unity Terrain and Image effects, but they will be added soon.
    So I'm trying to offer complete solution pack.
    (It was a big surprise for me to see that we have used the same shader name and cartoon scene :eek:).

    @MinhDao
    I do not have that package but I am sure it will work. Curved World has support of vertex colors and image based lighting, that's all polyworld needs.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Apr 16, 2015
  27. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    575
    do the shaders work on deferred light as well
     
  28. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    It works in deferred rendering mode, but will use only one directional light (point lights per vertex optional).
    Multiple light types per pixel - currently no. It is still in developing process.



    VacuumShaders - Facebook Twitter YouTube
     
  29. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    575
    soo either a person uses the baked shader with point lights, or the directional shader with just one directional light then
     
  30. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Point light calculation is optional. It can be calculated only per vertex in the same single pass as directional light.
    What shader baking does is described in "ReadMe" file.



    VacuumShaders - Facebook Twitter YouTube
     
  31. Wavinator

    Wavinator

    Joined:
    Dec 24, 2013
    Posts:
    79
    Hi. This looks fantastic. Am I right in thinking, though, that because the operation is in screen space things like raycasting (say for hit detection) would act as if the world was flat? That is, just because you can see behind a building if the world was curving upward doesn't mean you can hit what you see.

    This seems perfect for a sci-fi game. Would it support something like depicting an O'neil Colony (city inside a huge tube, basically) or Bernal Sphere (city inside a huge ball) where you can look up and see the world curving above you?

    Do you know if there are any issues with LOD and occlusion culling for worlds that would effectively curve upwards?
     
  32. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    @Wavinator
    Hi,
    Curved World doesn't disturb raycasting, LOD and occlusion culling.
    As for O'Neil Colony and Bernal Sphere you can not achieve such effect, as it is camera orientation independent effect, while Curved World is camera orientation dependent.

    You can try web demo



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Apr 16, 2015
  33. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    575
    i have a doubt, when i apply the shader to a floor tiled, the floor shows empty spaces between the tiles...
     
  34. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Meshes which go beyond camera frustum will not be rendered, to fix that use script "Mesh Bounds Corrector" to scale objects render bounds.
    "ReadMe" file inside package contains more detail info.



    VacuumShaders - Facebook Twitter YouTube
     
  35. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Please, can I see the PDF docs before purchasing?
    Thanks.
     
  36. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Sure. See attached ReadMe.pdf, it's the only doc inside package.
     

    Attached Files:

  37. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Thanks. In my project I have a mesh terrain with an splatmap added (T4M shader). Can be used your curved shader here?
    I assume I have to add your shader to every object in my scene, is that correct?
    Thanks.
     
  38. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    How is this shader not gaining more attraction? Its amazing.
     
  39. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    @angel_m
    As described in doc file Curved World is per object shader, you should apply it to every object.
    Unity Terrain is not currently supported.
    Third party terrain shaders will not be supported. It will be wise if their publishers support Curved World.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Dec 15, 2014
  40. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    New update available (v1.02)
    Fixed Mesh Bounds Corrector script. In some situations it didn't update and always stayed equal to 1.
    Now it updates correctly.



    VacuumShaders - Facebook Twitter YouTube
     
  41. realworld666

    realworld666

    Joined:
    Nov 2, 2012
    Posts:
    24
    We have some custom shaders for glowing objects that would also need the curved world shader applying to them. Is there a good way to approach writing a shader that uses the curved world effect then applies our vertex shader as an offset of that?
     
  42. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    @realworld666
    Non of my shaders are precompiled. You can inspect shader files and see how they work.
    Adding new ones will not be the problem.

    Edit: But I think I will have to add one simple shader without cginc as an example. It will be the start point for such custom shaders.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Dec 16, 2014
    realworld666 likes this.
  43. nukeD

    nukeD

    Joined:
    Feb 12, 2009
    Posts:
    411
    This is awesome! I'm half way through a mobile game with a similar mechanic, but i modeled all the environments already curved.
    Anyway, its too late to rework them, but i'm already outlining my next 2 games (similar to this one) and will get Curved World for sure (later today)!
    - How is the performance on mobile? Do you have a demo scene to test on my target devices?
    - Can i dynamically deform the model to simulate curves? at what cost for mobile?
    - Do you have any idea if Curved World plays well with PlayMaker (conflicts and such)? any PlayMaker interaction planned?

    Thanks for your time and great work!
     
    Last edited: Feb 24, 2015
  44. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    @nukeD
    Hi,

    - How is the performance on mobile?
    - Excellent

    - Do you have a demo scene to test on my target devices?
    - Package has the same scenes as in web demo. They are not optimized for mobile, I've just used Unity assets to build them. But even most heavier of them(620k triangles) gives more then 40fps on my kindle fire (android 2.1).

    - Can i dynamically deform the model to simulate curves?
    - Yes, any time

    - at what cost for mobile?
    - At no cost. Curved World is per vertex shader and it does not matter are you bending mesh or not.

    - Do you have any idea if Curved World plays well with PlayMaker (conflicts and such)?
    - Curved World is shader, so I do not know why it shouldn't work with PlayMaker.

    - any PlayMaker interaction planned?
    - No.




    VacuumShaders - Facebook Twitter YouTube
     
  45. nukeD

    nukeD

    Joined:
    Feb 12, 2009
    Posts:
    411
    Thanks man!
    Went to purchase but it requires 4.5.5, i'm still with 4.5.2 until i finish this project (the purchase button isn't showing).
    Is it simple for you lo lower the version requirement in the asset store? If not, dont worry i'll get it in a couple of weeks!
     
  46. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Update 1.03 available
    • Added custom shaders support (info in doc file CustomShaders.pdf)
    • Added shaders to blend two textures by vertex color



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Dec 20, 2014
  47. MonkeyCrime

    MonkeyCrime

    Joined:
    Jun 13, 2013
    Posts:
    32
    Can anyone confirm whether Curved World will work with procedurally generated meshes? I have an "infinite scroller" project that uses two procedural terrain meshes, one behind the other. They have about 4 submeshes so I can use different materials (for road, river etc). As I scroll the meshes past the camera, I regenerate the heightmap and then reposition it in front of the next one.

    I'd like to try this but don't want to waste my money if it doesn't work. I've already tried a couple of other custom shaders that didn't work so I'm a bit cautious.
     
  48. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    @PinMan
    Curved World works with procedurally generated meshes.
    Terrain shaders currently are not ready.
    For adding custom features to the Curved World, like heightmaps, you can use included custom shader support.



    VacuumShaders - Facebook Twitter YouTube
     
  49. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Some info about terrain shader.
    As my current target is making Curved World max mobile optimized I refused using Unity terrain shader for mobile.
    Curved World will include its own mobile terrain shaders similar as T4M (blending splat textures based on control texture).



    VacuumShaders - Facebook Twitter YouTube
     
  50. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Merry Christmas for everyone!

    Free voucher code: Redeemed!
    To redeem this code go to Asset Store - User Account page - Redeem Voucher.

    Be the first one to grab your free copy!



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Dec 24, 2014
Thread Status:
Not open for further replies.