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. pmaloo

    pmaloo

    Joined:
    Jan 25, 2015
    Posts:
    35
    What settings did you use to achieve this look? I am trying to achieve a similar effect on a dense plane (100x100) placed but can't replicate anything close to this scene in terms of curvature.
     
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
    Did you check example scenes inside package? If no, then check Toy Runner and NavMesh scenes. All of them have Global Controller script object that controls bending.



    VacuumShaders - Facebook Twitter YouTube
     
  3. pmaloo

    pmaloo

    Joined:
    Jan 25, 2015
    Posts:
    35
    Thanks for a quick response.
    I did check out the examples, and I know about the Global Controller. I am able to bend the terrain but for some reason not able to get the look in the picture I quoted above. That particular scene is not included in the example as it probably contains premium assets so I was wondering if you could just share the Global Controller settings (and probably camera angle?). I have played around with it but mine looks like a flat plan falling off (even at low values and high vert count) instead of a cool curve in your picture.
     
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
    I do not remember settings I've used there. Use negative values for X and Z Bend and just tweak Camera Offset to avoid falling off effect.



    VacuumShaders - Facebook Twitter YouTube
     
  5. PerfectlyInsane

    PerfectlyInsane

    Joined:
    Aug 9, 2013
    Posts:
    74
    oh another thing is the bend method i noticed the part that bends downs appears fixed and close to the camera... as a result you can only see you can see only a short distance ahead. I'm not sure if its possible to have a steep bend down around Y= -5.. at the same time have that bend occur further away from the camera so you can see more of the path.
     
  6. s_lheureux

    s_lheureux

    Joined:
    Sep 20, 2013
    Posts:
    4
    We are about to ship a game to iOS that uses Curved World; what is the status on the support of IL2CPP / 64bit?

    Thanks.
     
  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
    IL2CPP/64bit does nothing with shaders - Curved World is shader. So it just works.



    VacuumShaders - Facebook Twitter YouTube
     
  8. s_lheureux

    s_lheureux

    Joined:
    Sep 20, 2013
    Posts:
    4
    Yeah, sorry about that question, I have misread Unity's documentation and thought all third party DLLs needed an update. It only applies to native code; my bad.
     
  9. Axcell_Hunt

    Axcell_Hunt

    Joined:
    Jun 23, 2014
    Posts:
    7
    Hey, just wondering if there was an ETA on the Unity 5 version? I'm definitely going to buy this product as It fits my current project perfectly, however I'm required to make it work for Web GL so Unity 5 is a must. Does it currently not work at all or is it a case that certain features just don't work. Everything is going to be unlit for my project so if its down to shadows/lighting I may be able to work around that.

    Cheers
     
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
    Hi, I'm currently working on Curved World 2 (includes U5), but there is no ETA.
    You can use Unlit shaders in U5, they should work, but officially I do not support U5 now.



    VacuumShaders - Facebook Twitter YouTube
     
  11. Leuthil

    Leuthil

    Joined:
    Jul 26, 2013
    Posts:
    97
    Is Curved World 2 going to be an additional asset we will have to purchase or will it be a free update to this current one? I'm just about to start a project that will require this asset and I'm planning to start it in U5 for obvious reasons.
     
  12. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
  13. Leuthil

    Leuthil

    Joined:
    Jul 26, 2013
    Posts:
    97
    Great to hear! Looking forward to using this asset :).
     
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
    Just a little update v1.25
    In Unity 4.6 lightmap calculation has been changed for mobiles resulting too bright lightmap. Current update fixes that.



    VacuumShaders - Facebook Twitter YouTube
     
  15. sp360

    sp360

    Joined:
    Dec 4, 2013
    Posts:
    9
    Great shaders. Do you have an ETA for Unity5 support?
     
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
    schmosef likes this.
  17. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    I picked up your Mesh Materializer asset recently and have been having lots of fun with it.

    I was checking out your other assets and I love this one!

    I'll be buying it as soon as you release an update for Unity 5.
     
    Arkhivrag likes this.
  18. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    I couldn't wait. I just picked it up so I could start playing with it.
     
  19. Adinnoh

    Adinnoh

    Joined:
    May 5, 2015
    Posts:
    3
    Hi!

    Your 'Curved World' really looks awesome. I just started working on a runner game and I think I will buy your product, it just looks great I don't even know how you can do this xD but before there is just one thing I would like you to explain because I really don't get how it works.
    Actually I'm new to coding so forgive me if it is a stupid question, I really don't know much about it...

    In your runner demo scene I can change the 'camera offset' and it looks like it can make the bend close or far but I don't understand how it works. Could you please explain it or just give some details on what it does exactly? I just want to know what possibilities I will have with Curved World to decide how I will make my game.

    Thank you, I hope you can answer soon so I can buy it and start my game xD
     
  20. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    I've been playing around with Curved World in Unity 4 and I just ran into an issue with a Windows Store Build.

    I did a test build of the sample "Football" scene. Everything compiles and runs.

    But the shader does not render on my SurfaceRT. Everything is pink and there's no curvature. The SurfaceRT is Tegra3 based.

    Any ideas? Here's a screenshot: http://1drv.ms/1cUNeOm
     
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
    Mesh bending is described by formula inside shader. Mesh can be bended independently along X, Y and Z axis.
    Offset parameter does - bending offsetting from camera. Here is doc file if you need more info.

    I do not have SurfaceRT and can only test Windows Store builds on local machine or simulator. Everything works for me. Football scene uses shaders with 2 subshaders inside: for forward rendering and unlit. Try delete first subshader and leave the last one 'Fallback - Unlit'. Does it work?



    VacuumShaders - Facebook Twitter YouTube
     
  22. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    I just remembered an issue I had with a mobile water shader that was not rendering correctly. That issue was caused because the shader had a line that excluded the renderer used by the Surface RT. Specifically:

    #pragma exclude_renderers d3d11_9x​

    I checked and that line was in your baked diffuse shader. I commented it out and tested the scene on my Surface RT. This time it worked correctly. Here's a screenshot: http://1drv.ms/1GhJG46

    Are there any implications to taking that line out? Does it compromise anything?
     
  23. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
    Glad you fixed it.
    d3d11_9x does not compile correctly on my hardware and that's why I have excluded it from shader. But if it is necessary for particular device of course you may use it.



    VacuumShaders - Facebook Twitter YouTube
     
  24. JohnRossitter

    JohnRossitter

    Joined:
    Dec 18, 2013
    Posts:
    1,027
    How is progress on Curved World for Unity 5 ?
    Will it work in Deferred Rendering?
     
  25. monkeyThunk

    monkeyThunk

    Joined:
    Oct 6, 2011
    Posts:
    13
    I'm currently using shader's from another asset package for many meshes, would I need to replace all of these with the Curved World shader ? (if so, I'm not sure how I'd get the same look with the added curved functionality)
     
  26. DanielVanches

    DanielVanches

    Joined:
    Apr 19, 2012
    Posts:
    38
    Hi. I'm considering using Curved World. From the ReadMe file you posted previously I found there's a "Camera Offset (XY only)" parameter. Is it possible to modify the offset for X and Y separately? Thanks.
     
  27. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
    @monkeyThunk
    You have to use Curved World shaders on all objects that you want to be bended. Package contains scene material manager that helps you manage your materials.

    @DanielVanches
    X and Y bending offset are controlled by one parameter. They will have separate controller in Curved World 2.



    VacuumShaders - Facebook Twitter YouTube
     
  28. DanielVanches

    DanielVanches

    Joined:
    Apr 19, 2012
    Posts:
    38
    Awesome. Thanks!
     
  29. Lurlidon

    Lurlidon

    Joined:
    Feb 18, 2014
    Posts:
    1
    Can anyone confirm or deny that Curved World 1 works in Unity 5 with unlit textures?
     
  30. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
    Officially Curved World does not support Unity 5.
    Some of current shaders work, others no. If you know a little bit of shading you can easily fix them or wait for Curved World 2.



    VacuumShaders - Facebook Twitter YouTube
     
  31. jack021457

    jack021457

    Joined:
    Mar 18, 2015
    Posts:
    22
    Hi,I want to make a bend ground and I put some button on the floor, can I touch them?I use RayCast but is look like doesn't work;
     
  32. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
  33. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    FYI, for anyone having issues with Windows Phone, this fix works on my Lumia 635 Phone as well.
     
    Last edited: May 21, 2015
  34. Leuthil

    Leuthil

    Joined:
    Jul 26, 2013
    Posts:
    97
    @Arkhivrag In Curved Worlds 2 are you still only going to have Unlit, One Directional Light, etc shaders? Will there be any way to use a modified version of the Standard shader or something?
     
  35. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
    I do not want to discuss or talk about new features and improvements now. All info will be available a little bit later and after releasing Curved World 2.
    But if you have any suggestions or 'requests' just write them here, I'll do my best.



    VacuumShaders - Facebook Twitter YouTube
     
  36. realworld666

    realworld666

    Joined:
    Nov 2, 2012
    Posts:
    24
    Would be good if this could be removed from all shaders so I don't have to remove it every time the plugin is updated. We've got a few curved shaders and they all work on Windows Phone with this line removed
     
  37. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
    Currently it will stay, I'll try to remove it in Curved World 2.



    VacuumShaders - Facebook Twitter YouTube
     
  38. jackisgames

    jackisgames

    Joined:
    Jul 3, 2013
    Posts:
    2
    Hello, how do i use mesh materializer shader with curved world shader?
     
  39. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
    Curved World shaders support vertex color, so just check it on inside material editor.



    VacuumShaders - Facebook Twitter YouTube
     
  40. jackisgames

    jackisgames

    Joined:
    Jul 3, 2013
    Posts:
    2
    Thanks dude i'm not sure why i missed the the checkbox! need a new pair of glasses
     
  41. Wai-chuen

    Wai-chuen

    Joined:
    May 28, 2015
    Posts:
    5
    Is there a way to do a ray cast without having to change the collider position every frame?
     
  42. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
    It's up to you how you use provided function. If curve parameters are not change from frame-to-frame you can calculate position only once and use it. Or calculate it just before raycasting.



    VacuumShaders - Facebook Twitter YouTube
     
  43. Wai-chuen

    Wai-chuen

    Joined:
    May 28, 2015
    Posts:
    5
    Thanks for the reply. Could you explain how to use this for an object that has a curved world shader on it already, that I want to raycast from my mouse position? I.e. how to detect clicks on curved world objects?
     
  44. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
    Attaching that example script to the mesh that already has Curved World shader is not wise. Shader will bend it once and then script also will change its position, so result will be wrong. For that particular example it is better to separate mesh and collider (that receives raycast) and attach script only to the collider. After ray casting send message to the mesh or what ever you want.



    VacuumShaders - Facebook Twitter YouTube
     
  45. David-Lindsay

    David-Lindsay

    Joined:
    May 20, 2009
    Posts:
    121
    Hi, the game I'm working on also wanted to have world curvature, which seems to look very similar to yours. However, it wasn't a high priority, and when I found that custom shadow collection/casting and particle solutions would also be needed we dropped the idea.

    Then I saw you had already solved those things in Curved World. So I decided to buy yours and give it a go. You have a lot more features and it works really nicely.

    Earlier, I was going to do it this way in the vertex shader. Obviously a lot less options than yours, and a lot simpler, plus I never got round to fixing the shadows or particles. We decided not to do world curvature because of the development time requirement, and so the code just remained like this:

    float3 worldVertex = mul ( _Object2World, v.vertex ).xyz;
    float xDistance = ( worldVertex.x - _WorldSpaceCameraPos.x );
    float zDistance = ( worldVertex.z - _WorldSpaceCameraPos.z );
    xDistance = xDistance * xDistance;
    zDistance = zDistance * zDistance;
    v.vertex.y += ( xDistance + zDistance ) * _worldBendAmount;

    Seeing as you already succeeded at solving shadow and particle issues, I'm wondering if I can include this in my game with your help. My issue is... I don't need the full suite of options that are available in your game. If I make custom shaders and include your cginc's it will put me over the temporary register limit of SM 2.0, and go beyond the 256 shader instruction limit too.

    My game features some scene bending effects for time travel features, which can change the environment in real time. Plus I have grass that bends when player walks through it, a custom per vertex point light solution and some fancy stuff that the game design needs. The shaders are already quite packed with features, and fairly well optimized too.

    But, if it's possible, I'd love to bring back world curvature to my game. Are you available for paid commission work, to help me integrate the shadow and particle solutions you have made?

    BTW, I PMed you on the forum too. Sorry I don't contact you through facebook -that's way too inconvenient from China and I couldn't find any other way to contact you.
     
  46. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
    Check PM.




    VacuumShaders - Facebook Twitter YouTube
     
  47. AVAN

    AVAN

    Joined:
    Jun 12, 2015
    Posts:
    3
    Hi. your asset is awesome, it bring so much style.

    I'm wondering if i cant control just one material by code, but not with the global controller, 'cause i'm using it with others materials. And also, if i'm using fog, but dont want it in some materials, how i can make it?.
     
  48. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,981
    1. Turn off 'Global Control' inside material editor and you will be able to control curvature of that material.
    Here is how to control material parameters from script: http://docs.unity3d.com/ScriptReference/Material.SetFloat.html
    Curvature parameters are described inside shader file:
    _V_CW_X_Bend_Size("", float) = 0
    _V_CW_Y_Bend_Size("", float) = 0
    _V_CW_Z_Bend_Size("", float) = 0
    _V_CW_X_Bend_Bias("", float) = 0
    _V_CW_Y_Bend_Bias("", float) = 0
    _V_CW_Z_Bend_Bias("", float) = 0

    2. You can disable fog per material if it is not under Global Control, otherwise you will have to manually modify shader.
    • Bake shader with parameters you want, including fog.
    • Open generated shader file.
    • Find lines with text - #define V_CW_GLOBAL_FOG_ON - and delete it.
    • Save file.
    • Now it is under Global Control but without fog.


    VacuumShaders - Facebook Twitter YouTube
     
  49. AVAN

    AVAN

    Joined:
    Jun 12, 2015
    Posts:
    3
    ThankYou Is what i need, and again your asset is the best, looking for updates XD.
     
  50. JohnRossitter

    JohnRossitter

    Joined:
    Dec 18, 2013
    Posts:
    1,027
    How is the version 2.x coming along?
    I have a game that I'm working on, which would be a great fit for this.
     
Thread Status:
Not open for further replies.