Search Unity

2D Terrain Creation Tool

Discussion in 'Works In Progress - Archive' started by koujaku, Aug 29, 2013.

  1. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    This tool is now up on the asset store, check it out here!

    $Promo2.png

    So I'm making this tool, mostly because I think it's a cool idea, and partially because I think it might be useful! I was inspired when I watched a Rayman Legends developer video, demoing their toolset, so it was intended to be much like that!

    All you do, is make a quick texture or two, define a path, and boom! Instant level!

    $Caves.jpg
    Works just fine with concave paths!

    $SandDunes.jpg
    They're two draw calls each, not the best, but still cheap enough, and I might still be able to do better yet!

    $Rocky.png
    Here's an example of the sort of texture you might use to define the edges.

    I'm still not finished with it, the path fill still needs some work, and I think usability could be better. But anyhow, I'd love for some input! Do you think you'd use it? Are there any features you think it might benefit from? I'll see if I can post a video of it sometime later too =D

    ...and here's that video =D


    Here's a little demo created using the terrain plugin!
    Demo link
     
    Last edited: Oct 9, 2013
  2. TonyNowak

    TonyNowak

    Joined:
    May 10, 2010
    Posts:
    316
    This is really cool!
     
  3. softwizz

    softwizz

    Joined:
    Mar 12, 2011
    Posts:
    793
    Looks good , need to see a video of it in action. Does it generate colliders?
     
  4. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    It does generate colliders, actually! I need to re-work the code on that a little bit, since I just recently switched to a new fill method, but it's a simple process at this point.

    I'll try and put up a video of it soon, it's not the prettiest thing ever right now, but it'll at least show how super easy it is to use~!
     
  5. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    So basically you draw a polygon (and edit the shape) and it auto-generates the mesh and applies some kind of `outline` textures around the edges, like bevels?
     
  6. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    Yes, exactly like that! It doesn't sound quite as impressive when you boil it down like that, but I'm sure I spent a lot of work on something in there =D

    It is a pretty fast workflow though once the texture is defined properly. It honestly takes little more that 30-60 seconds to create a scene like in the first screenshot. It's also fast enough that I can recalculate the mesh as you're dragging points around, so you do get real-time updates there too.
     
  7. Yago

    Yago

    Joined:
    Jan 28, 2013
    Posts:
    1
    how is it going? i wuold be interested in trying this tool :)
     
  8. Rawkjs

    Rawkjs

    Joined:
    Jul 7, 2012
    Posts:
    18
    This is definitely a tool I would love to try/use. I was exactly thinking about tinkering something like this when I saw the Rayman Legends video. Keep us posted! A video would definitely be lovely!
     
  9. Duusty

    Duusty

    Joined:
    May 14, 2013
    Posts:
    56
  10. Rawkjs

    Rawkjs

    Joined:
    Jul 7, 2012
    Posts:
    18
    Thanks TehReason, this thing looks awesome and it apparently still works with Unity 4 so this is great!
     
  11. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    I'm still working on this! I've been really crammed at work recently. Just published to Android today =D

    I'm hoping to have a video up this weekend, I've been doing some cool stuff with inspectors to make the terrain materials easy to create. Also fixed up the colliders, so those are working quite well now too!

    That E2D stuff is pretty sweet, I love the idea with the brushes!
     
  12. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    353
    I am VERY interested in this tool. Please keep up the good work! I too watched the Rayman Legends video and was amazed by their level creation tools. This would be an amazing and revolutionary tool for Unity.
     
  13. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    Okay, so here's a quick video update! Editor tools are shaping up well, and things are polishing up nicely! I'm hoping to do some testing with friends this week, and get some feedback on usability. Lemme know what ya think!

     
  14. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    Good. Needs some randomization/procedural generation of different surfaces/variation beyond having the same texture for every part of the environment. Take a look at maybe the Sonic 2D games for inspiration.
     
  15. V0odo0

    V0odo0

    Joined:
    Jan 8, 2012
    Posts:
    328
    I wan't to see it in Asset Store! :)
     
  16. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    I do have some plans for randomly picking different pieces from the material for a little more variety, but I'm not sure if that's quite the level of randomization you're thinking about. If you have any screenshots or videos you could share, that'd be sweet! I couldn't find anything that really showcased what you were thinking about.

    And yes, Asset Store, soooon =D Has to be quality though! Still polishing~
     
  17. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    Pioneering stuff here ;) ... get creative. I just know that I wouldn't want a single texture used for the entire level.
     
  18. Kelde

    Kelde

    Joined:
    Feb 28, 2012
    Posts:
    629
    Cant...wait...for...this...!!!!
     
  19. V0odo0

    V0odo0

    Joined:
    Jan 8, 2012
    Posts:
    328
    What about price? I think this tool is really must-have for 2d game developers.
     
  20. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    353
    Agreed, would happily pay a reasonable price for this tool. Hopefully having people pay for it would allow you as the developer to continue to improve it with new features and bug fixes.
     
    jamesgentry likes this.
  21. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    On the topic of price, right now I'm thinking perhaps $20. I haven't done my price research yet, so that may change. Sound reasonable?

    Aaaand some updates =D

    I'm starting to do some testing with close friends, so I'll hopefully be making a few improvements based on that. Super excited to see what people will do with it!

    I've been working on some fill modes, Closed, Skirt, and Path/None. I'm planning on adding an Inverted Closed fill mode as well, so it fills outside the path instead of inside. Colliders work fine with all of these modes too~! Here's a screen of that.

    $Ferr2DT FillModes.PNG

    I've done some nice stuff with the inspector UI too, though I feel there's probably some room to improve. It literally took me a whole day to figure out how to change the icon on the scripts >.< d'oh. (FYI, select the script itself in the project window, and the .CS icon in the top left is actually a dropdown menu) ._. these things are important to me.

    $Ferr2DT Material Inspector.PNG

    $Ferr2DT Editor Preview.PNG

    And to top it all off, I got the draw calls down to a solid 2 per terrain material, regardless of how many terrain objects there are! (so long as the terrain objects are marked as static, which I mark by default)
     
    Last edited: Sep 11, 2013
  22. softwizz

    softwizz

    Joined:
    Mar 12, 2011
    Posts:
    793
    Looking super awesome now I have seen the video.

    I will pencil this in as a 'must buy'
     
  23. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    Added inverted terrain, which fills the outside of a path, rather than the inside. Makes it slightly easier to do caves and interiors~ Also added in some random material section picking (check out the pipes) and some initial curves stuff too! Just need to work the colliders into that as well.

    Aaand, here's an interactive demo =D Everything in this scene is created with terrain objects!

    Screenshot:
    $Ferr2DT Demo Screen.PNG
     
    Last edited: Sep 12, 2013
  24. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    353
    Wow, love the demo. This is turning out wonderful. And yes $20 is very reasonable. If you really polish this and continue to add more features I personally think it is worth more than $20. The better the tool is the happier I am to throw more money at you =D
     
  25. Kelde

    Kelde

    Joined:
    Feb 28, 2012
    Posts:
    629
    omg man!!! ive started textures for this just to let u know, will send u a pack when im done with my own demo stuff.

    This tool is amazing!
     
  26. Kelde

    Kelde

    Joined:
    Feb 28, 2012
    Posts:
    629
    Im currenlty designing textures that blends with this sort of building, so expect a few "bug reports", or tweaks if u will:)

    I noticed it cuts off textures at each segment, and im using a grass texture i have made seamless in X, and also wall segments that should blend into the seamless texture im using. Sofar so good, just some minor tweak man and i think this will be the best tool for making levels, especially for detailrich enviroments like im used to paint.

    Will send u some images hopefully this week and some notes on what could use some improvements:)

    Love this stuff,best tool ive ever used, period.
     
  27. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    353
    Have you actually been able to test the tool? How can I get in on this tool testing goodness? Would be happy to test it out if possible.
     
  28. Kelde

    Kelde

    Joined:
    Feb 28, 2012
    Posts:
    629
    Im helping him with my painted textures for future display of demos and such, thats why i have a build. Im working on highdetial 2d games like Rayman Origins and games that uses the same amount of textures and detail, so a tool like this is a must for me:)

    So right now im testing it on seamless and pieced textures i would use in my own games.
     
  29. ExportDesign

    ExportDesign

    Joined:
    Sep 12, 2013
    Posts:
    25
    Looks great.
     
  30. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    353
    Gotcha. Keep up the good work gentlemen! I find myself checking this thread way to often looking for new posts with news haha. ;)
     
  31. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    I just added undo ability, and cleaned up the colliders for curved terrain (Super visual stuff! *sarcasm* Otherwise I'd have a screenshot to go with this post). I think I'm finished with all the major features, excitingly enough! It feels pretty solid right now, and does what I need it to. So at this point, I'm just collecting feedback, documenting/refactoring code, and polishing stuff up!

    I've got an item or two on my wishlist, like some better corner code, faster triangulation (it's already pretty fast, and only runs in the editor, I just, y'know, ...want to), and OMG WHATEVER THIS FELLOW WAS DOING

    http://www.youtube.com/watch?v=fHFsQHvzfwo

    But to be realistic, I'll probably save those for the next version. It's pretty darned handy as is.
     
  32. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    353
    Me Wantee! =D
     
  33. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    Another demo! Some people were saying it'd be cool to have a tiny sprite system in, just to get them on their feet, and I needed something so I could really test the colliders well!

    So, basic sprites, and spritesheet animations! I'd recommend using better ones, but you could definitely make a game with these if you needed to. I also fixed a number of big collider bugs!

    Anywho, check it out: http://goo.gl/VoSlh0
     
  34. idTaken

    idTaken

    Joined:
    Sep 14, 2013
    Posts:
    22
    This is coming along nicely. I'm waste deep in setting up something similar right now, and this could save me quite a bit of time.

    Have you thought about adding manual swaps along the segments? This would be great for the "Caps" to help avoid the Escher like perspective illusions that can pop up. It would also allow a bit more variety.

    I am very anxious to see this in the wild.


    Was I the only one to get frustrated before figuring out that you had to flick the little booger with the mouse?
     
  35. Kelde

    Kelde

    Joined:
    Feb 28, 2012
    Posts:
    629
    Alright!

    I used and tweaked some textures from my current game, and made an atlas like Koujaku had done it. Took me a while to figure out how to define edges and so on, but once that is set, u are good to go.

    Here's what i did with my own textures:
    $ferr2dtest.png

    The only issue i ran into was texture stretching, but simply fixed by adding more points. A second was i didnt manage to align the bottom edge caps with the left and right edge bodies, but i think the error is my fault.

    Would i buy this for my 2D games? Confirmed, with alittle more tweaking this tool will be incredibly powerful for everyone looking to build a 2D game:)
     
  36. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    Wow, I am so interested in this. I would like to know some things:

    - can we disable your Colliders and set Colliders manually along the created texture?
    - how does your System work with other Spritesolutions, for example 2DToolkit?
     
  37. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    353
    Seems like at this point you can adjust the colliders "depth", but I don't know that you can change the colliders to be custom shapes that are different from the ground textures shape.
     
  38. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    I don't want them be custom shapes but manually placed Box-Colliders.
     
  39. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    353
    I have to imagine it would be very easy for him to make an option to turn off colliders for the terrain. Then you could just use Unity's native box colliders and place those around maybe?

    Now that I think about it, it would be very useful to turn off colliders for level design that is just for aesthetic things in the background that the player won't interact with. In the above demo there is a ground layer that is in front of the player if you go down low, I wonder if that has colliders on it?
     
    Last edited: Sep 17, 2013
  40. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    Yeah, I've got a couple of options for adjusting the colliders around, and you can definitely turn them off completely! It'd be a waste to create colliders on terrain objects that were purely decorative, and I do use a lot of decorative terrain pieces~

    I haven't tested it with the 2DTK, but I built it as a standalone component to be compatible with standard Unity stuff, so it -should- work perfectly fine with it!

    As an update, I've added options to adjust the caps on segments, so corners should be a little nicer now too. Right now, I'm putting together some videos and resources, I'm planning on submitting this to the asset store by Friday latest! Kelde's been doing some pretty amazing stuff with it, I'm really looking forward to seeing what everyone else will come up with too =D
     
  41. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    What I mean is more the workflow between a SpriteSolution and your tool, like:

    If I import my sprites into the project and create a 2DToolkit SpriteCollection (TextureAtlas), how do I have to work with your tool then?
     
  42. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    That part shouldn't be an issue, however, you won't be able to use a 2DTK atlas to create materials for this tool, since it already does a sort of atlasing on its own. Just treat them separately, and they should play together just fine!

    I'll have workflow and tutorial videos up sometime in the next few days, so you can see for yourself exactly what's involved =D
     
  43. Kelde

    Kelde

    Joined:
    Feb 28, 2012
    Posts:
    629
    Using a 2DTK with this is not a problem, i already tried. They are just 2 separate things in the scene, u can place stuff from the 2DTK around with ease.

    Koujaku's tool simply lets u do the playground faster and tweak it if necessary, then u can place decor from a 2DTK around with ease, much faster. I wish i had this earlier as i showed Koujaku my game and he asked me "did u place all these by hand..?"

    It was a sad "yes..i did....can i go cry now?"

    When this is done it's gonna be great, and hopefully it can stand up to Unity 2D update, wich i think it will. Dont know everything they are implementing as i didnt watch the whole thing.
     
  44. xtremepman

    xtremepman

    Joined:
    Jul 18, 2012
    Posts:
    388
    Great work so far!
     
  45. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    It's sent off to the Asset Store! Now I just have to wait =D

    $Promo2.png

    Also, many many thanks to Kelde for letting me use his art!
     
  46. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    So, what will the pricetag be?
    Are the Tutorial-Videos ready to go?
     
  47. koujaku

    koujaku

    Joined:
    Aug 28, 2013
    Posts:
    321
    I discovered they actually have pricing guidelines in the submission process! I've got it set to $30 at the moment, that seemed to fit about where they were suggesting

    I do have a few tutorial videos done, but I still have one or two more I must create. XD I'm also working on a webpage for that too, busy busy busy. Once I have the webpage done, I'll be sure to post that here =D
     
  48. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    Great, I'm really looking forward to that. Count me as an Instant-Buyer. I hope you'll provide good support :)
     
  49. Kelde

    Kelde

    Joined:
    Feb 28, 2012
    Posts:
    629
    man that turned out great, glad u like the textures:D

    Asset store cant move fast enough for this...!!!
     
  50. devandart

    devandart

    Joined:
    Jun 7, 2013
    Posts:
    144
    Wow really nice tool! :)