Search Unity

Ferr2D Terrain Tool

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

  1. cparki3

    cparki3

    Joined:
    Jan 13, 2014
    Posts:
    35
    I would look into using the Stencil Buffer on your shader... I'm using something similar to get blood splatters and shadows, etc to only show on the terrain. Here is a great tut I looked at to get the effect I wanted:

    http://vinaybourai.com/blog/masking-unity-sprites-with-stencils/

    SpriteMask support would be pretty sweet though ;)
     
    Ta-da likes this.
  2. Brumby

    Brumby

    Joined:
    Sep 8, 2014
    Posts:
    16
    Hey guys! I try to create ferr terrain dynamically. Do you have any idea how to change Edge Segments from script?

    Code (CSharp):
    1.         FerrObject = Instantiate(FerrPrefab.gameObject);
    2.  
    3.  
    4.         Ferr2DT_PathTerrain NewFerr2d = FerrObject.GetComponent<Ferr2DT_PathTerrain>();
    5.         NewFerr2d.ClearPoints();
    6.  
    7.         NewFerr2d.AddAutoPoint(new Vector2(0,0), Ferr.PointType.Sharp);
    8.         NewFerr2d.AddAutoPoint(new Vector2(1, 0), Ferr.PointType.Sharp);
    9.         NewFerr2d.AddAutoPoint(new Vector2(1, 1), Ferr.PointType.Sharp);
    10.         NewFerr2d.AddAutoPoint(new Vector2(0, 1), Ferr.PointType.Sharp);
    11.  
    12.  
    13.  
    14.         NewFerr2d.Build();
     
  3. maltakereuz

    maltakereuz

    Joined:
    Mar 29, 2015
    Posts:
    38
    Problems by updating from version 1.x to version 2.x

    I have just updated my ferr2d Project to a new version. At first it looks great, but there is some problems:

    1) After upgrading my legacy terrains, colliders are set pretty different. I need a collider to be in the middle of top edge, so player is placed in the middle. But colliders are now at the very top side of edge-rect. How can i have collider

    legacy collider in the middle:

    new rect collider:

    Setting colliders to Edge2D does not seem to work. Is any way to get collider in the middle of edge?

    2) Old colliders used top, bottom, left and right offsets. After updating theese props are gone. Is there something like that in new ferr?

    3) Z-fighting/edge cropping in editor and game mode:

    As you can see fill is drawn over the edges. The legacy Z-Offset is now converted to drawOrder in material editor and multiplied by 1000. Setting it to another value does not seems to resolve flickering and cropping.

    May be something wrong with my material slicing?

    upd: i think i found it. It is renderQueue in fill material prop. Something new in unity2018 (upgrading from 5.4.5)

    4) In some my utils-code i use foreach loops for all Materials. In Ferr2D-1.x it was like this:
    Code (CSharp):
    1.  var mats = Ferr.ComponentTracker.GetComponents<IFerr2DTMaterial>();
    But ComponentTracker is removed. What is a new way to iterate over all materials?

    5) How can i get aabb-bounds of terrain? Can not find any method like GetBounds() or similiar.
    Code (CSharp):
    1. terr.Path.GetBounds()
     
  4. MercurialKid

    MercurialKid

    Joined:
    Aug 30, 2018
    Posts:
    21
    Hi Ferr. I'm getting alot of noise in warnings:

    upload_2018-10-30_10-10-50.png

    Can I remove these? Version Unity 2018.3.0b7 - but the warnings have been there through several version upgrades. Thanks
     
  5. Guliz

    Guliz

    Joined:
    Aug 8, 2012
    Posts:
    27
    Hello @koujaku
    first i want to say that i love this tool, it's really awesome! Second there where some posts about destructable terrain in the past http://forum.unity3d.com/threads/ferr2d-terrain-tool.204436/page-12#post-1796742 and i was wondering if there are any news regarding this feature?
    Unfortunately he tutorial on http://quantumyeti.com/blog/destructible-terrain-in-ferr2d is out of date but maybe somebody here in this forum has experience with the changes?
    I really would love to have an official implementation rather than making custom changes. I would contribute or even pay money.
     
  6. MadPropz101

    MadPropz101

    Joined:
    Aug 29, 2018
    Posts:
    12
    For the love of God I need someone to help me out. I like to think that I'm better than average when it comes to drawing and I use Photoshop extensively, but I just can't figure out how to draw stuff that works this way for the life of me.
    From what I understand the fill has to tile seamlessly in each direction, and then all the other sides go over to make the illusion that it's all stitched together.
    But what about the sides, does each side have to tile on itself? Also what do I do about the corners, do I draw them so that they connect to the sides? And what goes on top of what? I feel like my head is gonna burst :(
    @koujaku @Kelde
     
    Last edited: Nov 15, 2018
  7. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    145
    I'm playing with the Sprite Shape preview package and came across your asset. I was wondering if it is possible to animate a vertex on a spline shape during gameplay, updating colliders as well as it moves.
     
  8. chaolbvbiens

    chaolbvbiens

    Joined:
    May 12, 2013
    Posts:
    1
    Not sure if making a tiling texture is where your grief is coming from but I hope these help:

     
    Last edited: Nov 20, 2018
    MadPropz101 likes this.
  9. MadPropz101

    MadPropz101

    Joined:
    Aug 29, 2018
    Posts:
    12
    Hey thanks for replying, by now I have solved most of my issues. Now only to increase my drawing skills lol...
     
  10. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    573
    Anyone actively using Ferr2D in 2018.3 beta yet? There's tons of warnings, though most of them are harmless, and most of the features appear to be working ok - but there are some issues related with the new Prefab system, particularly when entering the prefab mode all Ferr2D terrains don't show up until you click on them
     
  11. maltakereuz

    maltakereuz

    Joined:
    Mar 29, 2015
    Posts:
    38
    I am not sure about new prefab sys, but the same issue happens by copying a terrain. It was already discussed in in posts #1365 etc. Ferr2DPath.Build() should solve this problem.
     
  12. BodhiSlam

    BodhiSlam

    Joined:
    Nov 30, 2012
    Posts:
    3
    Is there any way to adjust the scale inside the Material Editor? I found a reply in this post about changing max size if you are working with huge textures (for textures that are appearing outside the bounds), but I am working with super small textures, and adjusting the handles of the editor is really tough! Any thoughts?

    upload_2018-11-29_8-35-42.png
     
  13. shanemt

    shanemt

    Joined:
    Mar 5, 2014
    Posts:
    5
    I recently purchased Ferr2D. I'm working on a special node-based navigation system for my game, and I can see a way that I can easily integrate my node-system into the edges of the terrains built by Ferr2D. Assuming just straight edges, I essentially need 2 things:
    1. I need access to the edges of the Ferr2D polygons that display the ground edge material
    2. For these edges, I just need to know the positions of the end points.
    If you would be able to assist me with how I can get this data with code, it would be extremely helpful. Thanks.
     
    MercurialKid likes this.
  14. MercurialKid

    MercurialKid

    Joined:
    Aug 30, 2018
    Posts:
    21
    Hi Ferr2D. With greatest respect, is anyone answering support questions? This is my second attempt. I never heard anything back after my last question (over a month ago).

    My project is taking too long to compile, and I'm wondering if Ferr2D is available as a DLL?

    Thanks!
     
    BTStone likes this.
  15. Caliber-Mengsk

    Caliber-Mengsk

    Joined:
    Mar 24, 2010
    Posts:
    683
    Anyone know of a way to stop the textures from updating after the game start? I'm kinda just messing around, but wanted to make like a wavy vine thing (maybe for under water, or possibly to make a different script that's vines waving in the wind or something) and it has a problem that as the curves change, it flips the texture. Is there any way to force the texture a certain way or make the path update without the texture updating? Attached is an example of the problem.
     

    Attached Files:

  16. shanemt

    shanemt

    Joined:
    Mar 5, 2014
    Posts:
    5
    I'm not 100% sure if this will work, but in the editor mode you might be able to click the little circle to the top/right/left/bottom of the edge the appropriate # of times until it displays the texture you want, and have it manually set the texture, instead of relying on it automatically deciding the texture.
     
  17. bourriquet

    bourriquet

    Joined:
    Jul 17, 2012
    Posts:
    105
    Hi. I started working with Ferr2D (thanks for the cool plugin) and at some point I needed "hollow platforms". I tried to see if that was a feature but it didn't seem like it, so I changed the code and added a Collider Mode that creates collider lines around the path of the platform. Here is how it looks.


    Now I want to make sure: was there no better way to do that?
     
    arvzg likes this.
  18. bourriquet

    bourriquet

    Joined:
    Jul 17, 2012
    Posts:
    105
    Also, as you can see, there is a 2nd terrain in the background to make it look like you can see inside the tube. This 2nd terrain is created and updated based on the main terrain. Right now I have to trigger the update manually after I'm done with the main terrain.
    Is there any event I could use to update it automatically?
    Something like OnTerrainModified or something like that?
     
  19. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    145
    Hi,
    Not sure if you missed my earlier question. Anyhow, I just purchased this and was wondering if animating vetted positions and having colliders update is something that is possible. Being able to make ground that moves would be awesome.
    Thanks!
     
  20. chanfui

    chanfui

    Joined:
    May 2, 2017
    Posts:
    2
    Recently I'm having issue of when I duplicate my main terrain to act a cover layer, and when I choose the collider mode from Polygon 2D to None, the terrain UV offset will slightly moves, making my duplicated terrain cannot align with the main terrain which has collider. Using 2018.3.0f2 and latest ferr2d asset.
     
  21. Chuckalicious

    Chuckalicious

    Joined:
    Jul 28, 2012
    Posts:
    48
    Why does my character walk just fine on the terrain UNTIL I change the layer of the terrain from default to foreground and the players layer from default to Foreground? Now the player falls through the terrain. If I undo my change the terrain is smearing across the screen.
     
  22. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    145
    This sounds like something in the physics setting. Is foreground set for self collision?
     
  23. MercurialKid

    MercurialKid

    Joined:
    Aug 30, 2018
    Posts:
    21
    Hi Shane, I'd be interested to discuss this with you. How can I contact you?
     
  24. NatCou

    NatCou

    Joined:
    Jan 29, 2017
    Posts:
    7
    Just rename the Folder in Assets/Ferr/2d/Scripts/poly2tri.cs
    Rename this Folder from poly2tri.cs to poly
    and now it works.

    Yay thanks! <3
     
  25. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    1,889
    They never answer takes ages or not at all.

    Best to abandon Ferr2D like the developer has, and use spriteshape preview which is actively developed and has responsive developers.
     
    MercurialKid likes this.
  26. MercurialKid

    MercurialKid

    Joined:
    Aug 30, 2018
    Posts:
    21
    I have issues with Ferr in 2018.3. The edges of terrains start flickering if you have to many Ferr objects. This bug wasn't in 2018.3 beta. So I would caution developers to test the system before moving into production with it. Trouble is: Spriteshape is only a preview, and last release was 6 months ago. I've asked Unity to provide some kind of roadmap for the product. Troublesome times for spline tools!
     
  27. flashframe

    flashframe

    Joined:
    Feb 10, 2015
    Posts:
    392
    Don't know your setup, and I'm not using 2018, but that could be a draw order issue. We had this problem when terrains shared the same sorting layer and order, even if they didn't overlap. Moving each flickering terrain to a unique sorting order solved it for us.
     
    Lars-Steenhoff likes this.
  28. MercurialKid

    MercurialKid

    Joined:
    Aug 30, 2018
    Posts:
    21
    Thanks, FlashFrame. I really, appreciate the heads up. I think though that would mean I'd have dozens of sorting layers, as I use a lot of terrain shapes.

    I think I'll risk moving to SpriteShape, and hope Unity don't drop it.
     
  29. DavidAvenue

    DavidAvenue

    Joined:
    Dec 27, 2016
    Posts:
    6
    Hey, what would be the best way to achieve Parallax using Pro Cam 2D's parallax component?
     
  30. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    145
    You are quite likely to run into the same issue using SpriteShape. The best way to handle this in either situation is to use the sort order on the terrains that overlap. You don't need to put everything into a unique sort order, just the shapes you have that are causing issues.
     
  31. Mahunreah

    Mahunreah

    Joined:
    Mar 1, 2018
    Posts:
    5
    Hi =)
    I'm trying to understand how to access the public variables in Ferr2D's script. I want to change the vertex color with a script wich runs when I press a button.(Currently, the vertex color is light grey, which I set in the inspector)
    I found
    Code (CSharp):
    1. public Color    vertexColor     = Color.white;
    in the Ferr2D_PathTerrain script, but it is nested inside of
    public partial class Ferr2DT_PathTerrain : MonoBehaviour, Ferr2D_IPath, IBlendPaintable 
    .
    I tried going at this by writing
    Code (CSharp):
    1. public Ferr2DT_PathTerrain ferr2dscript;
    2.  
    3. public void Mapa ()
    4.     {
    5.         ferr2dscript.vertexColor = Color.white;
    6.     }
    But this did not work and I'm not sure where to go from here. Could somebody here maybe show me how to solve this?
     
  32. flashframe

    flashframe

    Joined:
    Feb 10, 2015
    Posts:
    392
    That's the correct variable. You might need to get Ferr2D to refresh to reflect the change in the mesh. Try calling ferr2dscript.Build(); after you set the color.
     
    Mahunreah likes this.
  33. Mahunreah

    Mahunreah

    Joined:
    Mar 1, 2018
    Posts:
    5
    That did the trick! Thank you very much :)!
     
    flashframe likes this.
  34. captnhanky

    captnhanky

    Joined:
    Dec 31, 2015
    Posts:
    89
    Hi!

    Just a quick question:
    Are there more terrains, landscapes, fills, themes, ..(don´t know how to name it) available (paid or free) for this fantastic tool?

    Thanks
     
  35. Demerzel_

    Demerzel_

    Joined:
    Mar 31, 2015
    Posts:
    1
    Hey.

    I am trying to use Ferr2d to create walls, in a scrolling game.
    My problem is, I don't want to have the colliders on the walls straight lines, but rather follow the graphics.
    If I use my walls as SpriteRenderers, I can easily just add a polygon collider, and it will detect the shape of the graphics.
    However, if I add them via Ferr2d, no matter which collider I choose, I will always get box-like colliders, with straight lines, disregarding completly the art I'm using.

    Is there any option I could use inside Ferr2D to have the colliders follow the art (similar to the SpriteRenderer)?
    If there isn't such an option, anyone has any idea on where inside the code of Ferr2D to start looking in order to add this functionality (I don't mind adding it myself if it's possible).

    Thank you.
    PS: The tool is awesome!
     
  36. PedroSchabib

    PedroSchabib

    Joined:
    Oct 2, 2015
    Posts:
    5
    Hi, can I manually edit the edge textures? Could this be a new update?
    I want to add textures only in the required segments.
    As in the example below, I only need edges in segment 1-2. How can I do it

    upload_2019-2-7_0-14-59.png
     
  37. ScourgeGames

    ScourgeGames

    Joined:
    Aug 22, 2017
    Posts:
    199
    Is it true this asset head been abandoned by the author? His profile shows he hasn't been online here since December 21, 2018. I thought about purchasing, but it appears there are a lot of compatibility issues with 2018.3 that I'm seeing people mention, and if it's abandoned, I'd hate to waste money .
     
  38. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    145
    You can currently do this. If you go into the material editor, select the side that you want multiple images for. Make sure that you are not in simple mode. There will be a line directly beneath the simple mode check box that says "Body" < 1 > 1 Total. Change that second "1" to a "2" and then you can set up a second segment definition. In the scene editor, click the "Segment Lock" button at the top of the window and you'll be able to select a new segment for any spans that have more than one option available. If you watch the UI video that the author posted on you tube, he covers this (and a lot more) in that.

    Good luck!
     
  39. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    573
    It's true. Nick has gone off to work for Microsoft, and well.. his focus has shifted. I have emailed him, as a bunch of others here have and have gotten no response. He hasn't replied to any questions on here for a long time either, and the asset hasn't been updated for a little while.

    As for the question "Should you buy this asset", the answer isn't clear cut.

    If you are working in Unity versions 2018.2 or below, and have no plans or possibility of needing to upgrade to later versions, and you need a solution that Ferr2D provides - You should get it.

    Ferr2D does not play well with Unity 2018.3 because of the new prefabs system. Most of the core functionality still works, but there are some glitches that happen if you turn your Ferr2D gameobjects into prefabs and try to edit them in Prefab mode. Don't get it.

    If you are just curious and wanted to play around with the asset to see what you can do with it - Don't get it. Play around with Unity's new SpriteShapes feature instead.

    The only other scenario where you might consider getting it is if you are very, very comfortable with advanced Editor scripting, and am happy to use Ferr2D as a starting point, fix all the bugs that come up with newer Unity versions and modify it to your own needs. Be aware that it is a fairly advanced level Editor scripting.
     
    PedroSchabib likes this.
  40. ScourgeGames

    ScourgeGames

    Joined:
    Aug 22, 2017
    Posts:
    199
    I got it working in 2018.3 and haven't had much trouble fixing the glitches. My prefab workflow, however, is really simple. I don't use nested prefabs at the moment. I'll probably rewrite much of the editor scripts, and extend the base of code he has written. Unity SpriteShape is still a bit janky, so I'm waiting to see what they do with it.


    On a side note, it's sad to see Microsoft take talent and turn it into mediocrity. I worked there many years. I hope he has gotten into a good team there. I had to leave to do anything meaningful.
     
  41. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    573
    Good to hear, the problems I saw in 2018.3 were mostly around prefabs and nesting of them, and editing them in prefab mode, so I suppose if you stay clear of that you'll be fine for the most part.

    From what I see of his twitter it looks like he's working on Microsoft's AR/VR technology. Can't really say they're turning him into mediocrity, maybe he's genuinely doing some insanely cool new tech? It sucks for us, but personally I understand his decision. What I don't like is him basically vanishing on us without even a word. A quick little note to say "Sorry guys I am way too busy now" would have been very appreciated. He also should be putting a note on the asset store page to warn people that the asset is no longer in active development and clearly say which Unity versions are supported
     
  42. ScourgeGames

    ScourgeGames

    Joined:
    Aug 22, 2017
    Posts:
    199
    I did receive a message on Facebook from him that he will be back to working on it soon. I know what it's like to work at Microsoft, so I understand that he might be drinking from a fire hose right now. One of the reasons I had to leave there was to have a life. 70+ hour work weeks. They will work a person to the bone if you don't push back really hard. Also, when I worked there, I had to get written approval to moonlight on my personal projects.


    Maybe he would be willing to turn over the maintenance of the asset for a rev share.
     
    LucidDreamsStudio likes this.
  43. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    573
    This is nice to hear, but I'll believe it when I see it. When he first announced he'd be working at Microsoft I tweeted at him to ask what it means for the future of his assets, and he replied to me saying he's still commited to his tools.

    That was right as he was starting there, so maybe a year on things are calming down a bit so he can spend some time working on his tools again, but with MS just announcing Hololens 2 I don't see how things could possibly be calming down
     
    LucidDreamsStudio likes this.
  44. BAIZOR

    BAIZOR

    Joined:
    Jul 4, 2013
    Posts:
    72
    How to fix these broken edges?
    They sometimes appear and disappear, depends on edge's angle.
    I can't use it for production build :(
    upload_2019-3-2_1-49-41.png
    upload_2019-3-2_1-51-16.png
     
  45. Wegenbartho

    Wegenbartho

    Joined:
    May 10, 2017
    Posts:
    1
    Hey everyone.

    I noticed a weird issue with 3D colliders:
    When FillMode is set to invert , it's not working as intended.
    The character gets stuck on the bottom side of the collider.

    upload_2019-3-7_18-9-23.png

    After some try and error, I added the "false" to the if clause and disabled the whole segment, forcing invert to use the normal collider vertex addition.

    upload_2019-3-7_18-10-54.png

    Just wanted to share this in case other people have a similar problem.

    Best,
    Maxi
     
    arvzg likes this.
  46. MichelVictor

    MichelVictor

    Joined:
    Apr 15, 2018
    Posts:
    1
    I am using Unity 2018.3.8f1 and I am receiving lots of warning, we'll receive some updates to fix these problems?
     
    GMax likes this.
  47. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    573
    See my reply to similar question

    Short answer: nope
     
  48. Kothered

    Kothered

    Joined:
    Mar 5, 2019
    Posts:
    5
  49. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    145
    @Kothered Sure! If you go into your material editor, you'll see something along the lines of "Body < 1 > 1 Total" under the edge segments simple mode check box. If you change that second "1" to a "2" (or however many alternate segments you'd like) then you can define more segments just like you did for the first one. This will alternate them automatically (so that edge 1 follows edge 2).

    To do what is happening in the image you linked to, in the dropdown at the top of the material editor, select (+new edge). Define it just like you would any of the other edges. In the editor, click the edge select then cycle through to pick your alternates.

    Hope this helps.
     
    Kothered likes this.
  50. oik976

    oik976

    Joined:
    Jul 2, 2012
    Posts:
    13
    Gang, I decided to spend some time today to try and remove some of those errors and warnings in the terrain tool in Unity 2018.3.x (and also fixed the ability to work with our terrains within nested prefabs along the way). Not that I'm interested in becoming the official support for the tool. I'm not entirely sure what is kosher to share here on the forum....obviously not the whole unity package, but if people are interested I'd be happy to post where I've made changes to make it work for me. (Bear in mind I haven't dug too deeply in testing. Just a basic "does it appear to work in editor" smoke test since that's where the lions share of the errors were.) Would those code snippets be useful? Obviously if Nick asked me to not share those things, I'd be happy to oblige....this is still his baby, after all.
     
    GMax likes this.