Search Unity

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

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

  1. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    It wasn't recognized by Rotorz RTS designer as it was gameobject and not prefab , making it prefab it worked.

    Thanks.
     
  2. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    We now have our own forums which are dedicated to
    Rotorz Tile System!


    http://forum.rotorz.com/

    It would be appreciated if customers could use our forums when posting questions about our asset.
     
  3. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    in unity 4.5 i got this
    MissingMethodException: Method not found: 'UnityEditor.EditorGUILayout.BeginScrollView'.
    Rotorz.Tile.Editor.DesignerView.Draw ()
    Rotorz.Tile.Editor.DesignerWindow.OnGUI_DesignerView ()
    Rotorz.Tile.Editor.DesignerWindow.OnGUI ()
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
     
  4. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    This issue has already been resolved and an update has already been submitted to the Unity asset store for approval. I have no idea how long it will take for them to approve...

    Send me your E-mail address via private message and then I would be happy to provide you with access to the BETA group. You will need to include your invoice number as proof of purchase.

    Why does this error occur?

    For some reason Unity have removed that scroll view method from their API...
     
  5. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Rotorz Tile System 2.3.0 is now available for download from the Unity Asset Store!

    Overview Video:


    See the release notes!
    _
     
  6. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    nice work about procedural mesh i exist any way for walk on it i want say i add mesh collider
    it's work's ?
    i found


    any tut's for make the atlas
     
    Last edited: Jun 12, 2014
  7. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    It is a good idea to use an existing input artwork as a guide when painting new ones. For instance, you could use the "Pink Platform" or template which is included. I have attached an additional example to this message for you to play with:

    quick-test-2.png
    User Guide: Autotile Artwork
    _
     
  8. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Hello, I'm very interested in the runtime capability of the tile system. Looking at API doc briefly , I can't find a method to save/load maps(tile system). Do you have to serialize/deserialize maps yourself?
     
  9. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Yes, you need to serialize/deserialize maps yourself, although an example implementation is provided in the following forum thread.

    Saving tile systems at runtime
    http://forum.rotorz.com/viewtopic.php?id=23

    I hope that this helps :)
     
  10. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Ah, the example looks very nice. Thanks for your reply.
     
  11. sirio21

    sirio21

    Joined:
    Mar 11, 2013
    Posts:
    114
    Hi, two things i'd noticed:

    First, running the hatguy demo, under his shoes, there are trhee diamonds in diagonal.To the right, a row of diamonds.
    Why if any diamond of diagonal is erased draw calls down, but no with diamonds that are in row? What's difference?

    Second, Creating a brush from a prefab doesn't apply scale correctly.

    It was used with "scale mode" option and "Use cell size".

    Rotorz not scale to fit the cell, and prefab was moved from the grid by 0.5 offset moreless.

    So, thinking and thinking, i had imported in 3D Studio and inspecting how prefab was made it was created from position 0,0 (left, down) and it has 1,371 x 1,371 x 1,371 (its bounding box).

    So i change model scale in unity to 1 / 1,371 = 0,72...... and restoring model scale to 1, i had move Y asis to half ( Y = -0.5 ) as transform in order to center model. Making this correction prefab was fit into every cell correctly by Rotorz.

    It's a bug? Or it's by design. I think that, every mesh used like a brush is static, so if Rotorz scale to really fit any cell, draw call doesn't reduce.

    But,, scale should be come from bounding box of imported model + transform unity scale.

    Example, if cell is 2x2x2 and prefab bounding box is 2.2, 2.2, 2.2 (Transform scale 1.5, 1.5, 1.5), then scale it can be reduce prefab to 2 x 2 x 2

    So x=( 2 / 2,2 + 1 / 1.5 ), y=( 2 / 2,2 + 1 / 1.5 ), z=( 2 / 2,2 + 1 / 1.5 ) = real scale to be fit in Rotorz.
    Transform must to scale x,y,z relation to fit in cell size.

    I hope you understand, i speak spanish.
     
  12. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    I do not entirely understand your question... Perhaps the following response helps?

    http://forum.rotorz.com/viewtopic.php?pid=39#p39

    "Use Cell Size" will scale your tiles by a factor of the tile system cell size.

    It does not attempt to guess the bounds of tiles and make them fit snugly within cells since this would considerably slow painting performance and wouldn't be consistent because mesh bounds are not always accurate.

    The best workflow is to ensure that your meshes fill a 1x1x1 unit of space in Unity. The "Use Cell Size" scaling mode will then make that mesh fit snug within a cell. A good way to verify whether your mesh is properly sized is to do the following:
    1. Create a blank scene.
    2. Add your prefab to the scene and set position to (0, 0, 0), rotation to (0, 0, 0) and scale to (1, 1, 1).
    3. Add the default Unity cube and again verify that its position/rotation/scale are like with the previous step.
    4. Your prefab should fit perfectly within the Unity cube.

    If the origin, rotation or scale of your mesh are incorrect then you should correct them using your modelling package. If just the scale is incorrect then you can also adjust this using the model importer inspector. For the purposes of dynamic batching you should be using uniform scales.

    You can use the "Use as Prefab Offset" feature of Rotorz Tile System to apply transformation corrections to tiles:

    http://rotorz.com/tilesystem/guide?ref=707c5c12-fd4c-451b-8dec-aa1ce9607a8d

    As mentioned in the first link in this message, static optimizations are only applied by Rotorz Tile System upon building your tile system(s). Tiles painted with brushes that are marked "Static" can be combined to reduce the number of draw calls. Of course this will only work for meshes which share materials.

    You can, however, mark your prefab as static in the normal Unity way to benefit from regular Unity Pro static batching functionality. The same basic principals apply to static mesh optimization with Rotorz Tile System or Unity static batching:

    http://docs.unity3d.com/Manual/DrawCallBatching.html

    I hope that this helps!
     
  13. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Hi,
    I have a small problem, as i made a cube in BLender and painting with Rotorz the cube is very small ?
    Is there a scaling bug ?


    Inserted in the scene manually the scaling is good same size as Rotorz tiles examples.
    But when painting with Rotorz the brush cube si ultra small (must zoom a lot to view it) ?
     
  14. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    I suspect that the scale/rotation/translation offset of your model is incorrect.

    First off, ensure that the model importer inspector (for your Blender file) has a scale factor of 1.0 so that 1 Blender unit = 1 Unity unit. This could very well be the issue.

    If you continue to experience this issue after doing the above, try the following as well.

    Using Blender:
    1. Open up your tile model.
    2. Create a cube at origin (0,0,0) with a radius of 0.5. (This will occupy a 1x1x1 unit of Unity space).
    3. Ensure that your mesh lies within this area.
    You may need to apply your transformation offset to your model; refer to the Blender documentation for further information regarding this:

    http://wiki.blender.org/index.php/U..._Transformations#Apply_Object_transformations

    You may also find the following section of our troubleshooting guide helpful:
    Tiles not positioned, rotated or scaled as expected

    If you continue to experience difficulties then I would be happy to take a look at your Blender model file to verify the root cause. Just post a DropBox download link and I will take a look for you :)

    I hope this helps!
     
  15. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Strange using Blender 271 or older version using some default units cube it is ultra small in Unity ?
    I attached the original cube file i use with Blender dimensions.

    Perhaps it's the project using multiple plugins that could caus some problem ?
    I'll try removing Gamedraw plugint to see if it's better.
     

    Attached Files:

  16. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    It works exporting in "obj" from BLender. If i import in FBX format that's really strange but scaling issue apperas using FBX. So the solution is to use "obj" or directly Blender file format for example.
     
  17. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Different model formats have different default scale factors inside Unity. When working with .blend models the scale factor 1.0 should be sufficient:

    http://docs.unity3d.com/Manual/FBXImporter-Model.html

    Your rounded cube has a radius of 1.0 rather than 0.5 which means that it occupies a space of 2x2x2 in Unity. To correct this issue you can set your model's scale factor to 0.5 using the model inspector.

    I have attached a video for you:

     
  18. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Thanks.
    The day you have time if you could make some tutorial on how to make corners inner and outer ones ?
    I followed your video on how to fix prefabs orientation

    The problem is that you use a defined tileset in the exemple , i don't find easy to understand how green connexions works for inner conners or for walls if we need three green dots or only one ? making custom brushes i just get simple corners ok, but gets not working for making walls and inner outer corners.

    I could send you the prefabs if you have time ,


    Anyway for simple corners usage the tool is great :)
     
    Last edited: Aug 3, 2014
  19. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    I have attached an illustration which will hopefully clarify this for the above tileset:

     

    Attached Files:

  20. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Thanks so much i understand lot more better the system now :)
     
  21. jasonMcintosh

    jasonMcintosh

    Joined:
    Jul 4, 2012
    Posts:
    74
    I haven't seen it mentioned anywhere, but how would you recommend implementing parallax scrolling for 2d tilemaps with Rotorz? Does the system provide a built-in way to handle that?
     
    Last edited: Aug 28, 2014
  22. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    The following video by the Unity Learn team demonstrates the basics of how to create scrolling backgrounds for the parallax feel:

    http://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/2d-scrolling-backgrounds

    If you are using a tile system for your background then you could apply the same concept by having two tile systems.

    Forum for Rotorz Tile System:
    http://forum.rotorz.com
     
    jasonMcintosh likes this.
  23. MrTobi

    MrTobi

    Joined:
    Jun 13, 2013
    Posts:
    10
    I'm very interested in this tile system. You guys did really a very good job! I would instantly buy it if there wouldn't be this one question i have.
    After watching all your videos i still couldn't figure out if it is possible to build 3d tiles in all 3 dimensions. Your video with the BITGEM assets shows how to make a 3D level, but it looks like you can just build on the local x and y axis which is making the scene very flat. Is it somehow possible to build tiles also on the z axis to have different height layers like the tiles in the screenshot?

     
  24. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    As you say a tile system allows you to paint 3D tiles onto a 2D plane. You can stack multiple tile systems for the 3rd dimension.
     
  25. MrTobi

    MrTobi

    Joined:
    Jun 13, 2013
    Posts:
    10
    Thank you for your fast reply.
    Will the stacked systems benefit from the optimization and brush features (like smoothing) all together or is it just working for every single system itself?
    And what about the performance with a lot of systems stacked on each other?
    Will ten or twenty tile systems on each other be possible?
     
  26. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Optimizations are per tile system. Vertex snapping and smoothing does not occur across the boundaries of multiple tile systems.

    Performance will vary from project to project depending upon what you are doing. If not optimized each tile is a separate game object. When optimized tiles are combined to help reduce the number of draw calls.
     
  27. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
    How can I make the dark violet fog effect using Rotorz Tile System ? It looks good that doesn't seem repeating tile
     
  28. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    A buddy of mine uses the Tasharen Fog of War asset (by the nGUI developer) which works wonderfully for them. I haven't used this asset myself but I suspect that you could add a repeating texture like the one in your screenshot. I would suggest posting in the Tasharen forum to find out more.
     
  29. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
    The fog of my screenshot has pattern texture instead of color which look pretty than Tasharen Fog of War.
     
  30. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    I am led to believe that the Tasharen FoW generates an alpha map to reveal/hide parts of another texture which in that screenshot was solid black. So I suspect that you could change that solid black texture with a repeating texture like the one in the screenshot. Of course, ask the Tasharen developer first to confirm that this is in fact the case.
     
  31. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309


    I am using the 2.3.1R, The tileset brush generate a 10x10 grid with 40001 verts that use 2.3MB, compared to a simple built Plane that only have 121 verts, how can I optimize this ?
     
  32. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    By default tile systems are optimized for fast painting both in-editor and at runtime.

    You can minimize the amount of procedural tile data by deselecting the per tile system property "Mark Procedural Dynamic". This has no effect in edit mode, but when play mode begins you will see that there is far less vertex data.

    Degenerate vertices (the unused ones) have very little effect on render performance essentially swapping time and the memory allocations that it takes to add/remove vertices with increased memory.

    Please consider using our dedicated forums for Rotorz Tile System:
    http://forum.rotorz.com
     
    Last edited: Sep 16, 2014
  33. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
    very good, i save nearly 50 MB memory in my game by simply uncheck the property.
     
  34. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Just wanted to say a big thanks for this wonderfull tool :)
     
  35. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Awesome!! I am pleased that you have found this useful! :)
     
  36. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    I just tried the included run time example using the latest Rotorz package on Iphone 4 and getting a very strange behavior.
     

    Attached Files:

  37. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    This is not a known issue. Could you please answer the following for me:

    Q1. Which version of iOS are you running?
    Q2. Are you using the original iPhone 4 or iPhone 4S?
    Q3. Which version of Unity are you using?
    Q4. Are there any errors in the log file?
     
    Last edited: Nov 9, 2014
  38. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    IOS 6.0.1
    Unity 4.5.5 f1 Pro

    Publishing using .NET 2.0

    Log Trace:

    - Completed reload, in 0.405 seconds

    ExecutionEngineException: Attempting to JIT compile method 'System.Collections.Generic.GenericEqualityComparer`1<Rotorz.Tile.TileIndex>:.ctor ()' while running with --aot-only.

    at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    at System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0
    at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in <filename unknown>:0
    at System.Activator.CreateInstance (System.Type type) [0x00000] in <filename unknown>:0
    at System.Collections.Generic.EqualityComparer`1[Rotorz.Tile.TileIndex]..cctor () [0x00000] in <filename unknown>:0
    Rethrow as TypeInitializationException: An exception was thrown by the type initializer for System.Collections.Generic.EqualityComparer`1
    at System.Collections.Generic.HashSet`1[Rotorz.Tile.TileIndex].Init (Int32 capacity, IEqualityComparer`1 comparer) [0x00000] in <filename unknown>:0
    at System.Collections.Generic.HashSet`1[Rotorz.Tile.TileIndex]..ctor () [0x00000] in <filename unknown>:0
    at Rotorz.Tile.PaintingUtility..cctor () [0x00000] in <filename unknown>:0
    Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Rotorz.Tile.PaintingUtility
    at Rotorz.Tile.TileSystem.PrepareChunkForTile (Int32 row, Int32 column) [0x00000] in <filename unknown>:0
    at Rotorz.Tile.TileSystem.SetTileFrom (Int32 row, Int32 column, Rotorz.Tile.TileData other) [0x00000] in <filename unknown>:0
    at Rotorz.Tile.Brush.DoPaintTile (Rotorz.Tile.TileSystem system, Int32 row, Int32 column, Rotorz.Tile.TileData newTile, Int32 variationIndex) [0x00000] in <filename unknown>:0
    at Rotorz.Tile.Brush.Paint (Rotorz.Tile.TileSystem system, Int32 row, Int32 column, Int32 variationIndex) [0x00000] in <filename unknown>:0
    at Rotorz.Tile.Brush.Paint (Rotorz.Tile.TileSystem system, Int32 row, Int32 column) [0x00000] in <filename unknown>:0
    at HatGuyInGameLevelDesigner.Update () [0x00000] in <filename unknown>:0
     
  39. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Using the default iOS player settings it seems to be working fine for me with the same hardware, iOS version and Unity version.

    Which "Stripping Level" are you using when building your player?

    Does the issue occur if you ensure that "Stripping Level" is set to "Disabled"? If you have selected "mscorlib" then I wouldn't expect this to work since the painting utility class makes use of "HashSet" which is part of the System library.
     
  40. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Striping = Disabled

    Edit: The target IOS version = 4.3
    AST compilation Options = blank
    Script call optimization = Slow and Safe
    Optimized Mesh Data = True.

    Edit: Changed IOS version = 6.0 , still same issue.
     
    Last edited: Nov 9, 2014
  41. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    I just did the following to test:

    1. Created an new empty project.
    2. Import Rotorz
    3. Open Hatguy_level_designer scene.
    4. Publish to Iphone.

    Getting the same errors.
     
  42. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Did you add the "Hatguy_level_designer" scene to the "Build Options" scene list?

    I completed those exact steps several times (including the build options window part) and it is working fine for me. I wonder what is causing this to happen for you but not me.

    Edit: I will see if I can get someone else to reproduce this issue.
     
  43. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Yes, I added the scene. The TileSystem grid shows up on the phone. The errors begin showing up when I add tiles by dragging my finger on the screen to paint. As you can see from the screen shot, as a result of the errors, the tiles look strange.
     
  44. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Okay, I was able to reproduce this issue using another Mac and iPhone... it is unclear to me why this is happening on one and not the other.

    Instead of assuming the default equality comparer, I have explicitly created an implementation of IEqualityComparer<TileIndex> and pass that into the HashSet<TileIndex> constructor and that seems to resolve the issue.

    This issue will be resolved in the next release. Thanks for taking the time to report this issue and answer my questions :)

    Send me a private message with your invoice number if you would like early access to the next BETA release for testing.
     
  45. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Very cool you found the issue. I sent my invoice number via PM.
    Cheers.
     
  46. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    I have uploaded a package to the BETA group which should hopefully resolve the issue for you. Please let me know how it goes!
     
    DarkArts-Studios likes this.
  47. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Superb, now working great.
     
    DarkArts-Studios likes this.
  48. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    The last time I tested Rotorz was about a year ago. I ran the same example on the iphone 4 and the frame rate was very low. Had to do all sorts of workaround to make it useable on the phone. Very surprised today that this example is running at a solid 29-30 FPS on the old Iphone 4. Can I ask what you did to improve the performance so drastically?
     
  49. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Awesome stuff! I will submit this fix to the asset store today (eta 3 to 5 days for approval).
    There have been many minor performance improvements throughout. But I think that the major performance boost came from internal improvements in a recent Unity release. :)
     
  50. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    You mean improvements from Unity Engine itself ?