Search Unity

  1. 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
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

[Released] R.A.M River Auto Material.

Discussion in 'Assets and Asset Store' started by NatureManufacture, Oct 13, 2017.

  1. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,754
    Click regenerate at lake polygon.
     
    Hawk0077 likes this.
  2. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    691
    Thanks NM I will give it a go. Much appreciated.
     
  3. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,355
    I have a script that makes an array of points across terrain using simple astar.

    Can I feed this to RAM and use it to carve a road at runtime? I think I read that ram could do roads maybe? But can it take a list of points to do that?
     
  4. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,754
    You can build, roads at runtime via api.
     
    protopop likes this.
  5. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,355
    Thank you.

    I can see there is a RamSpline.cs script with public List<Vector3> points = new List<Vector3>();

    Do I feed my array of points into this list? And then is there a specific function in this script or anther one I need to call to generate the road fro my points?

    Is there an API reference I can look at?
     
  6. hollegar

    hollegar

    Joined:
    Nov 15, 2011
    Posts:
    30
    Hi, for creating spline you can use
    Code (CSharp):
    1. public static RamSpline CreateSpline(Material splineMaterial = null, List<Vector4> positions = null, string name = "RamSpline")
    then to generate:
    Code (CSharp):
    1. public void GenerateSpline(List<RamSpline> generatedSplines = null)
     
    protopop likes this.
  7. SciDechse

    SciDechse

    Joined:
    Jun 19, 2018
    Posts:
    3
    Hello! I'm probably missing something obvious, but I can't even start to create the Spline points, because Ctrl+Left Click only selects/deselects the terrain in addition to the spline GameObject. :confused:

    I made sure that "Basic" was enabled in the "Ram Spline" component, and it clearly states that I should press Ctrl+Left Mouse Button, but apparently this is overridden by the Unity editor's default behavior.
    I'm using Unity 2019.3.0f1 - I just upgraded from 2019.2.9f1 hoping that this would fix the problem, but I'm getting the same result.

    Is there anything I need to switch on/off for this to work?
     
  8. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,355
    Thank you hollegar:)

    I made a script but it says CreateSplien doesn't exist in the following context. Do I need to add some sort of "using naturemanufacturing" or something at the top?

    Screen Shot 2019-12-04 at 10.30.15 AM.png
     
  9. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,355
    I got it:) I am more of an artists than a coder so I don't know many of the basics.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngine.Rendering;
    5.  
    6. public class CreateRoad : MonoBehaviour
    7. {
    8.     //public static RamSpline CreateSpline(Material splineMaterial = null, List<Vector4> positions = null, string name = "RamSpline")
    9.  
    10.     public RamSpline ramSpline;
    11.     public Material material;
    12.     public List<Vector4> positions = new List<Vector4>();
    13.     public string splineName;
    14.  
    15.         private void OnEnable()
    16.     {
    17.         RamSpline.CreateSpline(material, positions, splineName);
    18.     }
    19. }
     
  10. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,355
    Screen Shot 2019-12-04 at 10.54.47 AM.png

    For the last line, what do I put between the parentheses? I can see it needs a List - do I access this from the generated ramSpline somehow? What did I do wrong?
     
  11. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    462
  12. Alex1337rus

    Alex1337rus

    Joined:
    Mar 30, 2016
    Posts:
    18
    Hello! As i see you are using spline for water movement animation, but you also have flow support. Is it possible to use your water shader for flat surface with flowmap?
     
  13. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,754
    We have own scripts for objects on the water. Check video tutorial for that. There is part about physics. (Under video in descriptions there are links directly to tutorial main points)
    Yes, for example lake or even simple unity plane.
     
    dsilverthorn likes this.
  14. Admin_Friend_Factory

    Admin_Friend_Factory

    Joined:
    Oct 23, 2018
    Posts:
    24
    Hi!

    Is the RAM now supported by Unversal RP 7.1.5? Thanks!
     
  15. wigglypuffs

    wigglypuffs

    Joined:
    Aug 10, 2015
    Posts:
    67

    There's an asset called volumetric audio that allows you to apply sounds to entire mesh shapes like pipes or rivers. Then as you walk along the pipe or swim along the river the sound carries along with it.
    https://assetstore.unity.com/packages/tools/audio/volumetric-audio-17125

    Another solution is Procedural Worlds has an asset called Ambient Sounds - Interactive Soundscapes, which allows you to place cubes around areas and if someone enters that cube they hear sounds.
    https://assetstore.unity.com/packages/tools/audio/ambient-sounds-interactive-soundscapes-142132

    Alternatively, you could code up a simple script that detects the proximity of your player to the water and then plays the sound from a pool of audio sources located at the closest position on the river.

    I'm not affiliated with these asset creators. I just was reading through the forum and noticed your question and remembered I saw something that addressed this a while back. I have not used volumetric audio myself so I don't know how well it works if at all. I've used ambient sounds it's good, but I haven't used it yet for water.
     
    dsilverthorn and Hawk0077 like this.
  16. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    691
    Thanks I went for ambient sounds, it does the job perfectly.
     
  17. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,754
    not yet, we wait for official release 2019.3. You can make also fake fix and lines with LWRP library errors replace by URP line.
     
  18. wigglypuffs

    wigglypuffs

    Joined:
    Aug 10, 2015
    Posts:
    67
    I fake fixed hdrp for Ram 2019.3 by putting my own not so good water shader I made in shadergraph myself on the ram spline:

    https://i.gyazo.com/abe3c5296167507eb262e2aa97383c60.mp4

    It's depressing, but a decent enough placeholder until this gets fixed.

    Edit: Added some transparency:
    https://i.gyazo.com/3853d47c5fe082a8613d8d1f88863fba.mp4

    Edit: Swimming around in it a bit:
    https://i.gyazo.com/d6b5caccd81b4614de23199a2c544a56.mp4

    Edit: How it looked on 2019.2 when I was swimming around with a friend in multiplayer:
    https://i.gyazo.com/71dfbbb4792c9dc81bed3a02c5c3d161.mp4
     
    Last edited: Dec 12, 2019
  19. Admin_Friend_Factory

    Admin_Friend_Factory

    Joined:
    Oct 23, 2018
    Posts:
    24
    Thanks! I got it work but by downloading the LWRP 7.1.5 packages instead but the Stylized Water Shader doesn't work. Unity is now out of beta and 2019.3.0f3 has already been released. Will you update soon? Thanks
     
  20. Admin_Friend_Factory

    Admin_Friend_Factory

    Joined:
    Oct 23, 2018
    Posts:
    24
    Have you evaluated to use the planer reflection in URP for realtime water reflections? Or can you only use reflection probes? Thanks
     
  21. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,754
    No it's not out. It;'s release candidate 1. I currently rewrite it for 2019.3 to give more features and performance. I almost done. https://gyazo.com/780237d770a1700b9446d87ec712d89a

    I didnt play with URP with water yet. I will check possobilities soon but planar reflections are always heavy.
     
    Admin_Friend_Factory likes this.
  22. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    196
    Guys, has this been asked yet, but after the purchase - on import it just does these exceptions, any idea, has anyone had the same, on Unity 2017.4.7 here ...

    Assets/NatureManufacture Assets/Spline System/Scripts/LakePolygon/LakePolygon.cs(217,27): error CS1729: The type `Vertex' does not contain a constructor that takes `2' arguments
    //
    Assets/NatureManufacture Assets/Spline System/Scripts/LakePolygon/LakePolygon.cs(218,18): error CS1061: Type `Vertex' does not contain a definition for `z' and no extension method `z' of type `Vertex' could be found. Are you missing an assembly reference?
    //
    Assets/NatureManufacture Assets/Spline System/Scripts/LakePolygon/LakePolygon.cs(221,21): error CS1502: The best overloaded method match for `TriangleNet.Geometry.Contour.Contour(System.Collections.Generic.IEnumerable<TriangleNet.Geometry.Vertex>)' has some invalid arguments
    //
    Assets/NatureManufacture Assets/Spline System/Scripts/LakePolygon/LakePolygon.cs(221,33): error CS1503: Argument `#1' cannot convert `System.Collections.Generic.List<Vertex>' expression to type `System.Collections.Generic.IEnumerable<TriangleNet.Geometry.Vertex>'
    //
    Assets/NatureManufacture Assets/Spline System/Scripts/LakePolygon/LakePolygon.cs(233,42): error CS0029: Cannot implicitly convert type `TriangleNet.Geometry.Vertex' to `Vertex'
    //
    Assets/NatureManufacture Assets/Spline System/Scripts/LakePolygon/LakePolygon.cs(235,52): error CS1061: Type `Vertex' does not contain a definition for `x' and no extension method `x' of type `Vertex' could be found. Are you missing an assembly reference?
    //
    Assets/NatureManufacture Assets/Spline System/Scripts/LakePolygon/LakePolygon.cs(235,69): error CS1061: Type `Vertex' does not contain a definition for `z' and no extension method `z' of type `Vertex' could be found. Are you missing an assembly reference?
    //
    Assets/NatureManufacture Assets/Spline System/Scripts/LakePolygon/LakePolygon.cs(235,86): error CS1061: Type `Vertex' does not contain a definition for `y' and no extension method `y' of type `Vertex' could be found. Are you missing an assembly reference?
    //
    Assets/NatureManufacture Assets/Spline System/Scripts/LakePolygon/LakePolygon.cs(237,35): error CS0029: Cannot implicitly convert type `TriangleNet.Geometry.Vertex' to `Vertex'
    //
    Assets/NatureManufacture Assets/Spline System/Scripts/LakePolygon/LakePolygon.cs(238,52): error CS1061: Type `Vertex' does not contain a definition for `x' and no extension method `x' of type `Vertex' could be found. Are you missing an assembly reference?
    //
    Assets/NatureManufacture Assets/Spline System/Scripts/LakePolygon/LakePolygon.cs(238,69): error CS1061: Type `Vertex' does not contain a definition for `z' and no extension method `z' of type `Vertex' could be found. Are you missing an assembly reference?
    //
    Assets/NatureManufacture Assets/Spline System/Scripts/LakePolygon/LakePolygon.cs(238,86): error CS1061: Type `Vertex' does not contain a definition for `y' and no extension method `y' of type `Vertex' could be found. Are you missing an assembly reference?
    //
    Assets/NatureManufacture Assets/Spline System/Scripts/LakePolygon/LakePolygon.cs(239,35): error CS0029: Cannot implicitly convert type `TriangleNet.Geometry.Vertex' to `Vertex'
    //
    Assets/NatureManufacture Assets/Spline System/Scripts/LakePolygon/LakePolygon.cs(240,52): error CS1061: Type `Vertex' does not contain a definition for `x' and no extension method `x' of type `Vertex' could be found. Are you missing an assembly reference?
    //
    Assets/NatureManufacture Assets/Spline System/Scripts/LakePolygon/LakePolygon.cs(240,69): error CS1061: Type `Vertex' does not contain a definition for `z' and no extension method `z' of type `Vertex' could be found. Are you missing an assembly reference?
    //
    Assets/NatureManufacture Assets/Spline System/Scripts/LakePolygon/LakePolygon.cs(240,86): error CS1061: Type `Vertex' does not contain a definition for `y' and no extension method `y' of type `Vertex' could be found. Are you missing an assembly reference?
     
  23. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,754
    Please write at 1 place at the same time. Check your e-mail. Anyway try at clean project first. Seams that something interact with our asset and break triangle.net libraries. Its old ram not 2019 if clean project will not help please give a sign
     
    Last edited: Dec 14, 2019
  24. Admin_Friend_Factory

    Admin_Friend_Factory

    Joined:
    Oct 23, 2018
    Posts:
    24
    We have been using the Boat Attack Water with planar reflections and it looks great is not that heavy actually as it is using custom render pass in URP. I would investigate the solution from here https://github.com/Verasl/BoatAttack (demo-work branch). It would be a great addition to the R.A.M. Though, not sure how to handle the tilted horizon of the river and planar reflection.

    Please let me us know when we can test the URP support. Thanks
     
  25. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,754
    At flat water at the same height, gpu generated: planar reflection are simple and cheap. When you curve spline, river it become : terrible expensive or innacurate (totaly wrong)
    Do not compare flat surfaces with simple calculations at 1 height with curved shapes. We had idea to add such feature but for non flat surfaces is wrong. BTW unity have planar reflection probes in HD RP and you can use them.
    Anyway we will back to the case at 2019.3 maybe and see what we can do. Seams URP have new solutions in this directions.
     
  26. Unplug

    Unplug

    Joined:
    Aug 23, 2014
    Posts:
    208
    any information on how to make AURA 2 compatible with your shader ???
     
  27. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,754
    Few devs at out discord seams to convert it somehow. Best idea is to ask Aura 2 dev if he have solution anyway.
     
  28. Unplug

    Unplug

    Joined:
    Aug 23, 2014
    Posts:
    208
    for anyone seeking a solution

    The doc was update and I indeed intend to have a tutorial about it. RAM shaders are surface shaders so you'll need to have a look at the provided example:
    - open "Assets\Aura 2\System\Code\Shaders\Shaders\SurfaceShaders\AuraStandardAlphaBlended.shader"
    - copy the pragmas at lines 35 36 37
    - add "finalcolor:Aura2_Fog" in the surface pragma line*1
    - and copy lines 43->66 and 75->88 in your shader

    *1
    For newbie like me: the "add finalcolor:aura2_fog" is actually the text you want to add in the surface pragma line of RAM shader. So at the end of line 87 for Water River Tesseled Vertex Color Flow shader (you don't actually add a prama line but just the text to the existing one)

    void Aura2_fog have to go after the struct and you must change SurfaceOutputStandard to SurfaceOutputStandardSpecular

    float Aura2_getfogvalue and void Aura2_Applyfog goes before the struct.

    Work very well... the best editor out there should talk to each other a little more. those premium asset we all wish to use them all at the same time. its win win for everyone
     
    rrahim and NatureManufacture like this.
  29. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,754
    Lovely!
     
  30. eblumrich

    eblumrich

    Joined:
    Nov 12, 2015
    Posts:
    91
    Okay- I tried following this tutorial:



    Unfortunately, it doesn't reflect my experience with the product.

    For example, when the instructor creates his first spline, the points he lays down are aligned with the terrain.

    When I try to lay down a spline by this method, it is -ALWAYS- floating ABOVE the terrain.



    Trying to align the points with the terrain is not a solution, as when I do, the RAM asset still uses that "above the ground" initial elevation as a reference, leading to INSANELY high road shoulders.

    So-

    1: Tell me how to ensure that my splines are laid down, as they are in the tutorial...

    2: Please amend the above tutorial to give a more accurate description of how to do so - I cannot emphasise how important this is. If people cannot LEARN your asset, they cannot USE your asset.
     
  31. eblumrich

    eblumrich

    Joined:
    Nov 12, 2015
    Posts:
    91
    upload_2019-12-23_19-47-14.png

    Note that the spline points initially are created ABOVE the terrain, now ON the terrain, as the tutorial shows.
     
  32. eblumrich

    eblumrich

    Joined:
    Nov 12, 2015
    Posts:
    91
    Note that "snapping/unsnapping" to the terrain results in nothing:

    upload_2019-12-23_19-50-7.png

    Yup- that's "Snapped to terrain"
     
  33. eblumrich

    eblumrich

    Joined:
    Nov 12, 2015
    Posts:
    91
    And I CAN move the points into place manually, but when I try to bake things into the terrain:

    upload_2019-12-23_19-51-19.png

    It uses the original placement of the spline as a reference for the road edge.

    So- please advise- and again: PLEASE update your tutorial to more accurately depict the use of your product.
     
  34. eblumrich

    eblumrich

    Joined:
    Nov 12, 2015
    Posts:
    91
    Following the directions in the video, we get this:

    upload_2019-12-23_19-59-19.png

    upload_2019-12-23_19-59-42.png

    Needless to say, this is not a very practical solution.

    Any assistance is appreciated.
     
    Last edited: Dec 24, 2019
  35. eblumrich

    eblumrich

    Joined:
    Nov 12, 2015
    Posts:
    91
    When I don't adjust the points manually, and just strictly follow the video tutorial, this is what we get:

    upload_2019-12-23_20-8-52.png
     
  36. Chandlerya

    Chandlerya

    Joined:
    Sep 4, 2018
    Posts:
    9
    I Had the same issue, my Gizmos were turned off...once i enabled gizmos it worked fine.
     
  37. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,754
    First of all Merry Christmas! make note that during next few days we will not answer so fast, we have holidays here. Best way is to contact us via e-mail or discord:)

    In 2019.3 they change a bit UI and your not able to set points from mouse when Gizmo at scene window is OFF". ;/ Like you said if you turn "ON" the gizmo it works fine.

    I see in fact spline falow the terrain but there is an offset. There are few resons that could generate that:
    1) Check if terrain collider match terrain data (im almost sure it is)
    2) Do you have any scale multiply on spline or... in terrain object? Terrain object should have scale 1,1,1, fallowing this maybe it's in parrent which have scale other then 1 1 1 ? If spline or terrain get scale it will generate such offset.
    Please share how terrain is placed in hierarchy. If you use unity 2019.3 please have gizmo button turned "On" at scene window to set points at terrain. (It's unique unity 2019.3 changes in engine UI)
    Best way to catch us and other users at discord, There is huge community for sure we or anyone who is atm online will help out of the box. Give a sign if that help, for sure it's something small easy to find:)
     
    Last edited: Dec 24, 2019
  38. Praetorsoft

    Praetorsoft

    Joined:
    Oct 9, 2016
    Posts:
    14
    I also had the same problem, I couldn't add any points, it just selected the terrain. All the gizmos in the Gizmos-drop down menu were enabled. I had to "Revert factory settings" in the layout dropdown and that fixed it. This is Unity 2018.4.9.
     
  39. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,754
    Yes this also happend sometimes very rare but yes. We use screen position and push raycast from mouse, if UI at engine is block this functions this may happend.
     
  40. Praetorsoft

    Praetorsoft

    Joined:
    Oct 9, 2016
    Posts:
    14
    Hi
    Is there a way to loop a road spline? I want the first and last point to be connected.
     
  41. Selac_NK

    Selac_NK

    Joined:
    Jun 17, 2017
    Posts:
    2
    hi

    Is that suport for Single Pass Instanced?
     
  42. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,754
    Nope with one spline... but... you can cut it into 2 splines and connect them end with beginning etc so in fact you will loop it:)

    Yes it support single pass at unity standard, LW RP have engine issue and it's still not fixed.
     
  43. Selac_NK

    Selac_NK

    Joined:
    Jun 17, 2017
    Posts:
    2
    thanks!
    Is it only "single pass stereo rendering"?Or "single pass instanced rendering" too?
    I'm thinking about launch a project of Magic Leap at Standard or LWRP.
     
  44. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,355
    I have reflection probes working with ram. But is there a way to make screen space reflections work? I am thinking ssr will be less intensive than real-time reflection probes. But when I add ssr to the camera I don’t see reflections in ram. Do I have to pick a specific material or is there something else I need to do?
     
  45. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,355
    Do any of the ram materials offer planar reflections? Has anyone got planar reflections working with ram? Just for flat surfaces like lakes.
     
  46. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,754
    Transparent shaders are not support ssr at unity even at hd rp.2019.3 (I tested)
    At hd rp yes you can use planar reflactions.
    Basicly as rivers are curved planar would be very inaccurate.
     
  47. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,754
    At lw rp single pass have issues with features used by water systems.
    I didnt test single pass instanced.
     
    Selac_NK likes this.
  48. jamesparksart

    jamesparksart

    Joined:
    Dec 1, 2017
    Posts:
    24
    Quick question:
    I have used RAM many times.. but I loaded it in my scene (2019.3.0f3) and it will not let me create or edit any points. In my scene i control click and nothing happens in the demo scenes I can click on the objects but there are no points. I tried re-importing RAM 2019 and it still is disabled. How do I go about fixing it? If possible can I get an answer as soon as possible I have a project due tomorrow. :)| which I got today.) Thank you!
     
  49. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,754
    Please turn "on" gizmo button at editor UI. It's new engine changes.
     
  50. jamesparksart

    jamesparksart

    Joined:
    Dec 1, 2017
    Posts:
    24
    YEAH!!!! Thank you!
     
unityunity