Search Unity

Rotorz Tile System for painting 2D and 3D tiles!

Discussion in 'Assets and Asset Store' started by numberkruncher, May 10, 2012.

  1. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    Last edited: Mar 1, 2013
  2. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    There are many 2D art tools out there which each have different strengths. It is just a matter of searching and finding the tools that are useful for your game. Often you can mix and blend a variety of textures to produce the artwork for your game. And of course, applications like Photoshop have a lot of plugins which each provide unique and specialised effects.

    Take a look at the following forum post:
    http://forum.unity3d.com/threads/157621-Cartoon-Style-Seamless-Textures

    I believe that @p6r uses Genetica 3.6 to create some pretty neat textures:
    http://www.spiralgraphics.biz/genetica/gen3.6whatsnew.htm

    Depends what you want. If you were creating a top-down shooter with ultra cool turrets, then you could create some ultra cool turrets in Blender. The grass and cave platforms included with Rotorz Tile System were created using Blender.
     
  3. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    Ok, so this means for tiles I can use software like Pixelmator, Sketch, etc.. and for something like the character I should use a 3D-Programm like Blender?

    BTW: I can't use Genetica. It's Windows only.


    Just to be sure what I mean:
    http://leahayes.files.wordpress.com/...pg?w=446&h=258
     
  4. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    This example was taken from a texture that was freely available from Mapledev's site (http://mapledev.tumblr.com/post/10406905135/howtotileset). I do not know what software was used to create the artwork.

    You might find TexturePacker useful if you want to pack multiple tiles into a single atlas. Just make sure that all tiles in an atlas are exactly the same size as one another:

    http://www.codeandweb.com/texturepacker
     
  5. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Yes Pixelmator will be fine for creating your 2D artwork. I haven't used it though. Any program that can save image files in a format that Unity understands will be fine.

    When creating 2D tilesets you should (as with all textures in Unity games) be saving power-of-two resolutions. So use 512x512 instead of 500x500 for example.

    If you want to create 2D characters and sprites then you will need to use an extension which makes this possible. For example, you could use SpriteManager 2 (which is very good). Brushes can be created to paint instances of any prefab. So if your sprite is a prefab, then you can paint with it.

    Blender is fantastic for creating and animating 3D characters. You can then create a prefab for each of your characters and then create brushes as needed.
     
    Last edited: Mar 1, 2013
  6. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    I'm sorry. I think I described wrong what I need :D

    Look at this picture of your website: http://rotorz.com/tilesystem/img/banner.jpg

    What I need to know is: What tools are useful to build this 'boxes' (stones) and the 'eggs'? Should I build this graphics in something like Photoshop and put it together (tiles) in RTS or I have to build the whole 'box' in a 3D-App like Blender?
     
  7. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    The look of the boxes is a texture which was created in Photoshop. The physical mesh of the boxes was created using Blender.

    If all of the blocks in your game use a consistent UV layout, then you can reuse the same mesh for all of your blocks and just provide different textures for each one.

    The eggs from Munchy Bunny! were purchased from TurboSquid: http://www.turbosquid.com/3d-models/maya-5-easter-eggs/597013. And in fact those were the only assets that were purchased for Munchy Bunny. It was either $1 or several hours of work :)
     
    Last edited: Mar 1, 2013
  8. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    Haha, ok :D

    Thank you for your fast responses :)

    Could I use ProBuilder 2 inside of Unity to build the meshes?
     
  9. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    No problem :)

    If it saves meshes as asset files, and you can create prefabs for those meshes, then yes.
     
  10. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    I've to figure it out. I'm not sure yet :)
     
  11. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    Just one more question: Is it possible to combine RTS PlayMaker seamless?
     
  12. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    You can create PlayMaker actions to perform interactions with the RTS API.

    What did you want to interact with at runtime?
     
  13. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    I didn't try the whole range of functions, which comes with RTS. Maybe things which needs to interact with the character, like the coins in Mario. You know?
     
  14. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    Could you tell me, what filters you used for it? I just need a start for something like that ^^
     
  15. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Character interactions would typically still be accomplished in the regular Unity way. I.e. make use of object associations and tag lookups. The erase tile function may be of use to you for the collecting of coins. Though if your coins are 3D prefabs with custom scripts attached, then again you can achieve this in the regular Unity way using colliders. You would need to use the tileSystem.EraseTile function to erase 2D procedural tiles.

    It really depends what you are trying to achieve. The built-in "Offset" filter is quite useful when making textures seamlessly tileable. But there are some fantastic filters out there. For example, Alien Skin's Eye Candy is pretty awesome:

    http://www.alienskin.com/eyecandy/examples.aspx
     
  16. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Just to add to the first point, typically if you were creating a 2D game, then things like coins would be managed as individual prefabs using some sort of sprite manager asset.

    If you are creating a 3D game, then coins will be individual prefabs anyhow.
     
  17. Jerware

    Jerware

    Joined:
    May 15, 2012
    Posts:
    41
    Just curious how this progressing, Krileon? I don't see anything on the Playmaker forum yet. I'm a big fan of Playmaker, and am on the verge of buying this tile editor, so it would be great to see them married.
     
  18. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    I've Mecanim, Pool Manager, GridFramework, and Rotorz actions all done (in total over 140 actions), but no plans to public release them at this time; I just don't want to deal with the support or questions (I don't have time for it). Maybe later down the road will release them, but for now using for my projects only.
     
  19. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    I have updated the RtsPoolManagerObjectFactory script to workaround placement errors that occur when the pool manager is not placed at the world origin. The placement errors occur because the pooled tile objects get reparented to the tile system upon being painted.

    The workaround is simply to automatically position the pool manager at the world origin upon awake :rolleyes:.
     
  20. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
    Is it possible to merge the tile mesh during runtime ?
     
  21. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    No this is an editor-only feature.

    Though you can of course utilise the Mesh.CombineMeshes feature provided by Unity if needed.
     
  22. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
    Would you mind share the code snippet on how to do this ?
     
  23. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
    after the tile mesh is combined, can it be separated in runtime ?
     
  24. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
    Apart from side scrolling auto tile asset, could you provide top down auto tile asset ?
     
  25. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    The Unity documentation demonstrates how to achieve this:
    http://docs.unity3d.com/Documentation/ScriptReference/Mesh.CombineMeshes.html

    An example mesh combiner script called "MeshCombineUtility" is also included with Unity within the provided "Scripts" package which can be imported via Assets | Import Package | Scripts.

    Why would you want to do that? You should only combine "static" meshes that do not change at runtime. You can control which tiles are combined on a per brush basis by selecting the "Static" toggle as needed. Think of the mesh combiner as a sort of "static batcher" but with vertex snapping and normal smoothing as well.

    With that said, you can access the vertices, normals, triangles, etc of the combined mesh at runtime using the Mesh class provided by Unity. Though extracting the individual tiles is likely to be tricky.

    There are currently no plans to include additional demonstration brushes with Rotorz Tile System. Templates are provided for the "Basic" and "Extended" 2D autotile layouts which can be used as a foundation for creating your own top-down tiles.

    If you are referring to top-down 3D brushes then you could consider purchasing the beautiful tileset by BITGEM from the asset store and then define oriented brushes to paint them. A couple of customers have created some absolutely stunning levels using Rotorz Tile System and various BITGEM assets. Here are a couple of links to wet your tastebuds:

    Dungeon Builder Starter Set by BITGEM
    Cemetery Starter Pack by BITGEM - On sale at the moment!
     
  26. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
    Actually, I would like to make a city building game ( like simcity ) using Rotorz-Tile-System, when I paint several buildings and combine them, and may remove it later at runtime.
     
  27. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    In many ways the type of functionality that you describe is similar to that of highly dynamic voxel-based games where the visual representation of your world is presented using a mesh that is procedurally generated from a data representation of your world. Whilst I may be wrong, I suspect that you will need to implement a custom solution that is optimised specifically for your use case.

    As it stands Rotorz Tile System is not designed to work in this way. You can improve performance at runtime by pooling tile objects to reduce the overhead of instantiating and destroying prefab instances at runtime.

    You could probably implement a custom solution which combines and separates tile meshes. You would likely need to maintain a data structure that identifies which vertices and triangles are associated with each tile. I hope that this helps.
     
  28. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    How do you change a tile systems size in editor after you've already created it? Whether to make larger or smaller, is this possible? If not, is it possible it could be something implemented in a future release?
     
  29. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Are you referring to the number of rows/columns or the physical size of a tile?

    The ability to modify the number of rows/columns will be introduced in a future release.
    The ability to change the physical size of a tile can already be done using the tile system inspector.
     
  30. wokka

    wokka

    Joined:
    Jan 14, 2013
    Posts:
    7
    I'm having a little trouble with creating a wall brush for a tile system that has upward facing tiles. I would like to use one wall prefab in a brush that would paint walls that face the different cardinal directions. Is this possible?

    Or would I need to create a different prefab for each direction?

    Thanks.
     
  31. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Hi wokka

    Yes in this situation you would need to create a different prefab for each direction.
     
  32. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
    How to make 1x1 tile, 2x2 tile or 3x3 tile that snap to grid in runtime ?
     
  33. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    I am sorry but I do not understand your question, perhaps you could explain in greater detail what you are attempting to achieve?

    Many thanks
     
  34. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    The number of rows and columns.

    Sounds good. Shot in the dark here, but any idea when?
     
  35. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    At this point I am not exactly sure what it entails so I cannot really say. It would be nice to have an option to add rows/columns before and/or after the existing tiles, plus an option to offset tiles.

    I suspect that this will be similar to the way in which chunks are re-organised, though using a force-refresh (with all preserve options) to ensure that tiles are positioned correctly. I will put aside some time later this week to experiment with this because this would be a useful addition.
     
  36. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    Awesome, thank you. Yes, it would be very helpful as I have plans for an in-game level designer and with a slider to dynamically change the size of the level. So would be awesome to be able to slide a slider and see the level grow/shrink from a usability standpoint as the level editor is vital to my games future. So hopefully this could work at runtime too. I've still a ton of work to go through though so no rush.
     
  37. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Changing the size of a tile system has quite a lot of overhead since each tile will likely be repainted and the data structure has to be regenerated.

    When adjusting your in-game slider I would recommend that you provide a high-performance visualisation of the grid and then click a button to accept the new size (thus regenerating the tile system).

    Anyhow, keep an eye out on this thread for further information later this week :)
     
  38. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    I have created a selection of PlayMaker actions for Rotorz Tile System which are released under a BSD-style open source license. Hopefully these actions will be of use to PlayMaker users. Each of the available actions are documented within the source repository wiki and I plan to create some sort of demonstration soon.

    https://bitbucket.org/rotorz/rtsplaymakeractions

    Generally it is a good idea to create a variable to reference the currently active tile system which can be initialised by creating a "Setup" state in your FSM. This variable can then be provided to actions as needed instead of having to specify the tile system each time. A lot easier!

    The help icon of each action is linked to the appropriate action reference in the wiki which in some cases provides a little extra information regarding the action. A listing of the provided actions can be found here.

    Both tile systems and brushes can be dragged from the Rotorz Tile System palette windows and dropped onto the PlayMaker action fields for easier selection. Unfortunately it is currently not possible to use the dedicated brush selection fields within the PlayMaker action user interface.
     
  39. Renegat

    Renegat

    Joined:
    Mar 19, 2013
    Posts:
    10
    Hello numberkruncher,

    I'm building a kind of isometric top-down Tile System with RTS which works great so far. I want to make it 3 dimensional with different heights, but I need 2 things to do this.
    I have a brush for each height level, using prefabs with different offsets. It's quite tedious to copy each prefab, give it a y offset, copy the brush and change the prefabs in it. I would love to use only Alias Brushes and give them an offset.
    Due to the different height levels I need the brushes of each height level to connect with themself and with the next higher level (removing the gaps seen in the screenshot). That would be solved easily if I could define more than one group to connect with.
    The system works really good together with A* Pathfinding and Playmaker!

    I hope you can help me with my issues.

    Thanks
    Rene

    $tile_system_wip.jpg
     
  40. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Hello Renegat

    Are you trying to create multiple layers of tiles with multiple tile systems or just a single tile system?

    If you were using multiple tile systems (one for each level), you could probably use the same brushes throughout.

    Awesome!
     
  41. Renegat

    Renegat

    Joined:
    Mar 19, 2013
    Posts:
    10
    I wanted to use just a single tile system, because thats easier to handle and I don't have to mess around with multiple overlaying tiles, erasing them where they are not needed etc. Also baking it to a prefab to reduce draw calls and combining the meshes only works per tile system, right?
     
  42. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    At the moment the only two options that I can suggest to achieve this is to either:

    a) Use separate prefabs like you are already doing.

    b) Paint all of the platforms to the same level (but using separate alias brushes so that the brushes coalesce as needed) and then select the painted tiles and drag them upwards (or downwards) as needed using the Unity move tool.

    I will let you know if anything else springs to mind which might make your workflow easier here.

    Would it help if I added the coalesce mode Own And Group? If I recall this should be a fairly simple addition on my part which I could probably squish into the minor update that will be released very soon.

    Yes that's right, the mesh combiner option is per tile system.

    I would generally recommend using the "Build Scene" feature where possible which generates a new version of the scene with the optimised tile systems. So you essentially have two versions of the scene, the original master scene and the optimised scene. Any changes should be made to the original master scene and then re-built.
     
    Last edited: Mar 21, 2013
  43. Renegat

    Renegat

    Joined:
    Mar 19, 2013
    Posts:
    10
    Yes! I think Own And Group would perfectly solve this.

    As to the other issue: Could an individual position/rotation transform much like it is possible for the scaling be added to the extension (Use Prefab position/orientation; Use custom position/orientation as offsets)? I would think this should be easy to integrate because with the scaling it works perfect already?
     
  44. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Okay I have added this for you and it will be released to the asset store over the coming week.

    I have noted this as a feature request which might be introduced into a future version. I cannot make any commitments at this time with regards to this feature but it will certainly be considered. It is likely that several core changes will need to be made to provide this feature which could break one of several use cases. I am afraid that this is not something that can be rushed.

    Would the technique b) that I suggested above be of any use to you?

    If you contact support with your invoice number I would be happy to send you the latest pre-release version which includes the "Own And Group" feature for you to experiment with.
     
  45. Renegat

    Renegat

    Joined:
    Mar 19, 2013
    Posts:
    10
    Hey!
    The own and group method is working for me. Now my tiles join correctly with the next highler level. Thanks again!

    My gameplay objects, obstacles, decoration etc. are on a second tile system. These are all placed on the ground level and I move them manually using the snapping of unity.

    The overall workflow regarding the use of different height levels could be better/faster, but it works for me for now :)

    One last thing: I've found a minor bug using the fallback orientation. After closing unity and opening the scene again, the fallback orientation of brushes sets itself back to 'next best' every time.
     
  46. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Fantastic stuff!

    Thanks for the heads up, this will be addressed in version 2.0.7 because I have already submitted 2.0.6 for approval. Let me know if you would like me to e-mail you the fix :)
     
    Last edited: Mar 25, 2013
  47. fgielow

    fgielow

    Joined:
    Jan 3, 2012
    Posts:
    122
    Hi! I have been using rotorz for a while and I am pretty happy with it, overall.

    I would like to know if the following is possible:

    I have set a tile system with 160units of space, hence all blocks are aligned in a grid which is composed of 160x160units squares.
    However! I would like to align my 160x160 styles on a smaller granularity, suppose 40x40.
    So, even though I have 160x160blocks, I want to align it in different heights, if you know what I mean,

    I try to illustrate in the following image (it shows the common grid and the green block corresponds to the position wherein I wanna place a tile):

    $rotorz-different-aligment-example.jpg

    Is there any way to achieve so? I really needed such behavior, and I considering using several tilesystems so I could have several heights, but it would be too much complicated to manage it the way I need.


    Edit: I noticed I can change manually the tile's position if it is not procedural and even change its offset through the prefab transform, but that would be really messy. All in all, is it possible to really make a smaller granularity grid system with tiles occupying more than one slot on that smaller granularity?


    Thanks for the attention!
     
    Last edited: Mar 29, 2013
  48. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Awesome, great stuff!

    Tiles are placed uniformly within the tile system grid, it is not possible to offset procedural tiles into a "sub-grid" using a single tile system.

    To achieve this you would need to use multiple tile systems.

    You can quickly cycle between tile systems when painting using the keyboard shortcuts Page Up and Page Down. This will cycle through tile systems in the order defined in the "RTS: Scene" palette window. You can adjust the cycle order by rearranging the tile systems in the "RTS: Scene" palette.

    I am afraid not, the data structure of Rotorz Tile System can only store one tile per slot, and slots are uniformly distributed.

    I hope that this helps.

    Edit:
    Thinking about it, you might be able to improve your workflow by creating prefabs from the automatically generated non-procedural tiles. You can then set the offset using the prefab offset feature. This would probably be the easiest approach. I would be happy to record a demonstration video if you like.

    Though it is important to note that you can still only have one tile per slot.
     
    Last edited: Mar 29, 2013
  49. fgielow

    fgielow

    Joined:
    Jan 3, 2012
    Posts:
    122
    Hey, thanks for the quick reply!

    As far as using multiple tile systems go, my major concern is possible loss of performance, I do not know if any batching operations would break, for instance. And further, I would have several really sparse grids - which would not be stripped, for having content, but which would still be really sparse because the content would be distributed among different tile systems.

    If more people need it, I would suggest incorporating a sub-grid tiling system as a feature for maybe a next major release. Maybe something that only shows a lower granularity grid system (without altering the core grid system underneath) and, when you place a tile, incorporates those offsets automatically (given that overlaps are not possible, an overlap would destroy the previous tile when creating the current), considering the nearest real tile in the back end? Well, that is just a probably crude idea/approach, but it would be great to have something like this supported for other projects later on.

    For now I will try using prefabs with offsets indeed. Hence, if you can, I would appreciate a quick video demonstration as a basis!

    Thanks for the attention, it's an awesome tool we have here. :)

     
  50. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Tiles are batched on a per tile system per chunk basis. So yes, having multiple tile systems will introduce additional draw calls when using the same tileset on multiple tile systems.

    With regards to the non-procedural approach, you will automatically benefit from the regular Unity dynamic batching though you can optionally use Unity static batching to reduce draw calls or alternatively the tile system combiner build function (aka Build|Entire Scene).

    Please watch in HD :)
    http://www.youtube.com/watch?v=d4Aaog3FN30&feature=youtube_gdata