Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Ferr2D Terrain Tool

Discussion in 'Assets and Asset Store' started by koujaku, Oct 9, 2013.

  1. Abban

    Abban

    Joined:
    Aug 5, 2013
    Posts:
    1
    Fix for this, open Ferr/2DTerrain/Shaders/LitCommon.cginc and comment out line 8.

    Also open the other shaders and take out any pipes from the name string. The names will appear properly in the Inspector then.
     
  2. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    @Abban, that's refreshingly easy! I haven't made it to the lit shaders yet, but here's hoping that's all it is, with nothing sneaky in there =D

    Are you guys running into the Inf/NaN verts warning occasionally? I haven't heard anyone mention that yet, but I see it pop up pretty frequently when doing silly things with the path.

    I'll probably be running through the shaders after I fix that warning. I'm also hoping to spend a little time on the colliders, fix some of the problems there, but I don't want to spend tooooo long working on this patch, so we'll see.
     
    BTStone likes this.
  3. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,418
    Yeah, I get this Inf/NaN warnings, but I just ignore them :D
     
    koujaku likes this.
  4. Blueduckraider

    Blueduckraider

    Joined:
    Jan 11, 2014
    Posts:
    8
    When do you think a update for Unity 5 will be released?
    I am awaiting such update with excitement before deciding on purchasing the product or not.
     
  5. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    Should be soon! I've made good progress on it, it's mostly easy stuff, so I should have a version by/on the weekend~ Of course, submission can sometimes take a while, but I'll post here when it's ready, so feel free to email me about getting it early!
     
    Blueduckraider and BTStone like this.
  6. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,418
    Dibs! :p

    Sent me a mail when it's finished, please :)
     
    koujaku likes this.
  7. RenLiz

    RenLiz

    Joined:
    Mar 2, 2015
    Posts:
    2
    Any chance of spotlights in Ferr2D? And a lit wavy shader?
     
  8. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    Lit wavy, sure! That's easy enough I can add it with the Unity 5 patch.

    Spotlights, well, no. I'm already doing some crazy stuff to get that lighting working, I don't think it's even -possible- to identify when a light is a spotlight from within a shader. My recommendation is to try a transparent sprite with one of the particle transparency (additive blend) shaders. Might possibly work, depending on how you're using them.

    Edit: probably not impossible, just way more work than it's worth.
     
    Too-Nerd-To-Die likes this.
  9. sysameca

    sysameca

    Joined:
    Mar 2, 2013
    Posts:
    99
    Hey we just bought Ferr2D, and i would like to say you did a really great job on it. I would like to ask is there any method exposed to get any point between 2 path vertices which are smoothed? If there is none, can you at least point where exactly is the algorithm for smooth path creation?
     
    Last edited: Mar 15, 2015
  10. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    So I do have a version that works fine on Unity 5, it's really not much different from 1.0.8. I went through and manually updated the component stuff properly, and re-structured the shaders and added in a wavy lit variant. Should behave the same on your end (minus the broken bits =D), but it's now easier for me to maintain 'em and change 'em! Next full version, I'll likely condense those shaders down into just one or two shaders with options =D

    I'm still hunting down warnings about Infinite/NaN verts, or zero area faces or whatever they are, but they're pretty rough to track down so far, and I'm not entiiiiirely sure if they're actually my code. Especially since unchecking the 'static' checkbox seems to get rid of it, so do that if the warnings are bugging you too much.

    Anywho, I'm sending this build off right now to those who requested it, but I'll be chewing on that warning a little more during the week, maybe a few other small things. Do feel free to email me your invoice if you'd like it as is!
     
  11. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    In the Ferr2D_Path component, there's all the smooth path stuff. Some of the methods there are static too, so don't forget those! It's probably a little tricky to get the data that way though, it's a bit of a mess. I've written a much better path system I'd like to replace it with one of these versions, but that's later... You might also just want to do raycasting with the physics system depending on what you're doing! Check out BlobShadow.cs for that! GetClosestSeg might be useful too.
     
  12. underdog3dee

    underdog3dee

    Joined:
    Aug 17, 2012
    Posts:
    4
    Hi,
    I have admired this tool for a while. I have not purchased it because the projects I'm working on now wont take full advantage of the features (soon though). But I noticed you mentioned on page 13:
    Can you explain a bit more how you see your tool working for constructing ISO/top-down game assets? An explanation maybe for someone who has not used your tool yet. Thanks.
     
  13. mrwogs

    mrwogs

    Joined:
    Aug 20, 2014
    Posts:
    36
    Thanks again for making this great tool.

    I recently ran into a problem, and I'm not sure how it happened, or how to fix it:

    When I go to Game Object > Create Ferr2D Terrain > Create Decorative 2D Terrain...

    The Select Terrain Material window appears, but none of my terrain selections show up, nor do the default ones that ship with Ferr2D. I receive the message "No recently used Terrain Material components found. Try dragging and dropping one instead."

    Any idea how I can get all of my materials to show up again?

    Thanks!
     
  14. Nicrom

    Nicrom

    Joined:
    Nov 17, 2013
    Posts:
    419
    did you try to click the menu "Rebuild Ferr2D Component Cache" form the Assets menu?
     
  15. mrwogs

    mrwogs

    Joined:
    Aug 20, 2014
    Posts:
    36
    Nope, but I'll give it a shot. Thanks for the suggestion.

    EDIT: Worked, thanks!
     
  16. jocyf

    jocyf

    Joined:
    Jan 30, 2007
    Posts:
    284
    Had someone made modifications to use more than one fill material in the terrain? I've been looking at the code but right now I don't know even where to start....lol
     
  17. CarreraSilvio

    CarreraSilvio

    Joined:
    Jul 21, 2012
    Posts:
    31
    Is there any way to set a physics material for the edge collider section and another one for the floor? I`ve set a slippery one so my player doesn't get stuck on the walls (edges) of the terrain but when there's a slope the player will be able to run and jump real high since there`s no friction anywhere...

    I`m doing this the wrong way? Any ideas? Thanks!
     
  18. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    @jocyf, multiple fill materials is definitely not trivial to implement! I've got some stuff in the works, but don't expect it too soon. Sorry~! In the meantime, I suggest using decorative sprites and stuff like that, take a look at how Rayman Legends, Child of Light, or other UbiArt games do it! They all use just a single fill material, so it's fun to see how they make up for it =D

    @TheSarcastic There isn't a great way to do this just yet, you may need to disable Ferr2D's colliders, and create your own colliders to get that variety. There are other ways to prevent players from sticking to the walls as well!
     
  19. s1m0n1stv4n

    s1m0n1stv4n

    Joined:
    Sep 14, 2012
    Posts:
    16
    Hi,
    Is there any news about the release date of the u5 version?
     
  20. CarreraSilvio

    CarreraSilvio

    Joined:
    Jul 21, 2012
    Posts:
    31
    I see. The easiest way I found was adding a slippery property to the wall. The only other way I thought was raycasting forward from the player in order to detect the collider tagged with wall and ignore movement when this is happening.

    I gotta say that I'm not really happy with any one of those but thought the first one would work better... if you have any approach to recommend I'd be happy to listen.


    [EDIT]
    Actually after writing a reply here I thought about adding two side colliders to my character and make them slippery while having a middle one that would interact with the floor when walking (so I could make a slippery floor or sticky one).

    But then again if you can give me your input on this.
     
    Last edited: Mar 25, 2015
  21. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    @s1m0n1stv4n, email me your invoice number (support@simbryocorp.com), and I'll send you a copy of preview 2 for the new build =D

    @TheSarcastic, I generally write my player controllers from scratch, just bypassing most of Unity's stuff and using raycasts to drive everything, but then, I don't usually do fancy stuff with physics materials either! I can't think of anything off the top of my head, but I'll let you know if I come up with something~
     
  22. jocyf

    jocyf

    Joined:
    Jan 30, 2007
    Posts:
    284
  23. CarreraSilvio

    CarreraSilvio

    Joined:
    Jul 21, 2012
    Posts:
    31
    @jocyf Thanks for sharing the link man! That will definitely help. I wont build everything from the ground up but I'll look through how he worked he`s stuff so I can try to integrate it on my code.

    My main problem now is that even just having only walls as "slippery" that will make my player get impulse when jumping on them and also makes my slopes become a cannon xD. Wonder how other people using the terrain are doing it.... I`ll probably try something will raycasts to detect if its a wall.
     
  24. sstrikerr

    sstrikerr

    Joined:
    Dec 31, 2013
    Posts:
    11
    Hey koujaku do you have anything new for unity 5? or is it just able to work in the update?
     
  25. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    I do! Email me your invoice number, and I'll send you a link to the current build =D Although, technically, the only thing that doesn't really work right now is the lit shaders, and that's easy to fix.
     
  26. mrwogs

    mrwogs

    Joined:
    Aug 20, 2014
    Posts:
    36
    Koujaku, any chance you can add the ability for F2D terrain to accept light cookies? I am trying to add underwater caustic effects to a scene, and I'd like to have a point light with caustic cookie texture affect the F2D terrain. Can't get it to work as it stands.

    Thanks!
     
  27. Psch

    Psch

    Joined:
    Nov 26, 2014
    Posts:
    1
    Hi!

    We've detected that with Unity 5 lighting is not working properly... some componentes became obsolet, and terrains with diffuse Ferr2d Shaders appear textured as pink. Any suggests?

    Thanks!
     
  28. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
  29. josessito

    josessito

    Joined:
    Feb 14, 2014
    Posts:
    57
    Hi koujaku, I tried commenting out line 8 and the errors are gone, however I have an issue with lights. You can see the image below were the line of the fill is showing. Not sure if there is a way around this. ferr2d light.png


    Never mind, I just had the fill textrure very far back and that was the issue, after radjusten de fill z offset the issue is almost invisible
     
    Last edited: Apr 4, 2015
  30. anf

    anf

    Joined:
    Mar 21, 2015
    Posts:
    1
    Hey guys!
    First post here :)

    Just bought Ferr2D, it's super nice. I'm currently modifying the Infitine script but I'm having an issue.
    I want the hill to always go flat or down, so I've modified the GetRight() function.

    My problem is that I have a skirt of 10 that is apparently based of the global Y position. So after a few seconds my skirt is above my road haha.

    Anyway I can fix that?
     
  31. Skyboard_Studios

    Skyboard_Studios

    Joined:
    Jul 20, 2013
    Posts:
    51
    HI!
    Just wanted to say excellent work. I was wondering if there is a way to spawn items/objects down during the InfiniteTerrain script... for example lets say you were to make a infinite terrain that would have objects placed ontop of the collider as it gets generated. Like just off the top of my head... Coins... or some nice 2D plants...

    update: I managed to add some object pooling into the InfiniteTerrain script during the RebuildTerrain procedure. With some offset calculations to reduce the Y position I managed to spawn some objects quite effectively on the edge of the collider. Didn't take much work to do really. I also ran a calculation based on the distance from the player's position so that objects wouldn't blink or poof into view during terrain updates...

    little video showing Editor / Game View splitscreen during runtime.
     
    Last edited: Apr 8, 2015
  32. ZannaU

    ZannaU

    Joined:
    Mar 24, 2013
    Posts:
    17
    Hi everyone,

    I'm new to this tool. Is it possible to use different caps for when the top material end on a ledge and when it end again a rising wall?

    I noticed that when it end on a rising wall the corner looks quite weird. Here is an example using the default cave material


    We can alleviate the issue with the art but having the ability to use a custom cap would provide a much better quality result.

    Thanks for the help
     
  33. ZannaU

    ZannaU

    Joined:
    Mar 24, 2013
    Posts:
    17
    Answering my own question here in case other noobs need the info :)
    In the material editor there is an option for inner cap that allows to solve exactly this issue.
     
  34. josessito

    josessito

    Joined:
    Feb 14, 2014
    Posts:
    57
    Hi!! I'm sorry but I can't find that inner cap option... Can you show me?
     
  35. ZannaU

    ZannaU

    Joined:
    Mar 24, 2013
    Posts:
    17
    First off I'm on Ferr 1.0.9 preview 2 so not sure if this option is available on earlier versions.

    - In the assets select one of the Ferr material such as CaveTerrainMaterial.
    - Press Open Material Editor
    - Select Top
    - Right there there you'll see the option. There is Left Cap and below Inner Left Cap. By default is disabled but if you selected it, it will allow you to chose a different cap for the inner endings.
     
  36. ZannaU

    ZannaU

    Joined:
    Mar 24, 2013
    Posts:
    17
    @KevKevOnFire @Studio_Istmo
    I had the same issue of not seeing new edges when creating a new terrain.

    I found that starting a new project and importing Ferr2D as first thing would make it work correctly. Something about the materials would not import properly otherwise.

    So the temp solution for my project (which is already quire large) was the following:

    1- Start a new project.
    2- Import Ferr2D, make sure it all works.
    3- In my old project export all assets into a unity package "allassets.unitypackage".
    4- Make sure both old project and new project have Asset Serialization Mode set to "Force Text"
    5- Close both project. Copy the "ProjectSettings" folder from my old project to the new one. (You don't need to copy everything but this makes it easier.)
    6- Open the new project import the "allassets.unitypackage" you created in step 3.

    This creates a new fresh project with working Ferr2D and all your assets and settings.

    I sent a sample project to Nick so he can reproduce this problem. He's working on a proper solution.
     
  37. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    O.O I left the inner cap stuff in with 1.0.9 preview 2? Ooops. Well then... has it been stable for you? Guess I'll have to put that in my test plan now!

    There's still a number of things I'd like to do with the inner caps to make sure they work properly, but they do work reasonably well as is. I had originally planned to introduce that in combination with perfect corners, but I guess we'll see!
     
  38. ZannaU

    ZannaU

    Joined:
    Mar 24, 2013
    Posts:
    17
    Ooops sorry being new to this tool I didn't know it was a new upcoming feature :)

    We didn't create our materials yet so we didn't do a lot of testing on it. What I noticed tho is that once you enable inner cap the inner cap and cap are "inverted". In the sense that the inner cap image is used when the terrain ends on a ledge and the regular cap is used when the terrain ends against a wall.

    Thanks a lot for adding this new feature to the test plan for the next release, it will be very useful for our project!
     
  39. rOBY GAMES

    rOBY GAMES

    Joined:
    Oct 16, 2012
    Posts:
    40
    Hello.
    I purchased Ferr2d hour ago. We still do not know this so I can have the wrong assets anything. On my scene I picture appears Rocky, Rocky Fill. I do not understand what the problem is, I chart using Unity version 4.6.
    I enclose a picture.
    Thank You

     
    Last edited: Apr 12, 2015
  40. Too-Nerd-To-Die

    Too-Nerd-To-Die

    Joined:
    Apr 28, 2014
    Posts:
    44
    Hello devs,
    I'm trying to make a secret passage with Ferr2D, I managed to make the first part as the video shows, but there i am destroying the object, but I want to decrease the alpha in the vertex color.

    how can I access the Vertex color of Ferr by script using C# and reduce the alpha to be transparent?
    (sry for noob question, im learning C#)

     
  41. sleekdigital

    sleekdigital

    Joined:
    May 31, 2012
    Posts:
    133
    Too-Nerd-To-Die likes this.
  42. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,418
    Works really great by tweening with DOTween!

    Make sure you use for both materials, the Edge and Fill Material, the Tinted Transparent-Shader! If only the Edge is set to Tinted-Transparent it will only fade out/in the Edge, but not the Fill!
     
  43. Too-Nerd-To-Die

    Too-Nerd-To-Die

    Joined:
    Apr 28, 2014
    Posts:
    44
  44. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,283
    Hi, first off, awesome package, does what it says and very well too.

    However, I'm looking for some extended functionality, I would love to be able to assign custom segments/materials to edges rather than just up, down, left or right. Imagine a wall jumping game, but some walls cannot be jumped off. I need to define these walls somehow, both visually and programmatically. So I have 2 questions:

    1. Is there a way I can query an edge based on a position, get its material information somehow?
    2. What's the best way to force a certain edge, should I create a new terrain with edges only perhaps?

    Thanks
     
  45. GScorpio

    GScorpio

    Joined:
    Apr 15, 2015
    Posts:
    6
    It's really cool!Thanks for your work;
    There's some questions,how to save and load the terrain by json,and if the terrain i want to make is very large,then what the size do you suggest,and is it necessary for me to write something to show my terrain by small area?
     
  46. GScorpio

    GScorpio

    Joined:
    Apr 15, 2015
    Posts:
    6
    There's another problem.I saw a video in youtube shows that ,the terr terrain tool has a destructible part ,but when i buy the tool ,i can't find it,am dupery?
    the address is this:
     
  47. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,418
    As you see in the video, this is not the official channel of @koujaku but a video of a user who hacked in the source-code to get destructible terrain, as he mentioned it in the video-description.
    He also links to a tutorial how to get this effect: http://quantumyeti.com/blog/destructible-terrain-in-ferr2d
     
  48. GScorpio

    GScorpio

    Joined:
    Apr 15, 2015
    Posts:
    6
    Oh,tanks a lot~
    there's anohter problem ,i dont konw whether the reason of my light shader missing is because my unity version is unity-5.0.The img is come from the example7 in the pkg.

     
  49. GScorpio

    GScorpio

    Joined:
    Apr 15, 2015
    Posts:
    6
    I make a test with unity 4.6,it works very well.And the problem of the light shader is just in unity 5.0.Is there any solutions to solve this?Or i have to change my unity back to 4.6?
    I am very anxious,who can help me:(
     
  50. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,283