Search Unity

PATileTerrain - Preview

Discussion in 'Assets and Asset Store' started by Panerox, Sep 26, 2011.

  1. Panerox

    Panerox

    Joined:
    Apr 27, 2010
    Posts:
    15
    PATileterrain this is a terrain, based on the tiles. You can use it for games where you want to use tiles (like Warcraft 3 or others).
    Edit the terrain can be right in the game, not only with Unity3D Editor (for example, change the height).
    The terrain consists of several chunks (each chunk is a separate mesh). This allows you to use it with Occlusion Culling and create large maps (up to 1024).
    The number of tile types is limited only by the size of the texture for a specific platform.
    The editor has all the necessary features: edit/smoothing heights, loading height maps, edit vertex colors, painting, save/load tilesets for use in other maps and others...
    The core of the terrain - PATileTerrain.cs provides direct access to all functions that are used by the editor. You can use them for games of any genre.

    Editor and Terrain Features:
    • Edit/Smooth heights
    • Loading height maps
    • Edit vertex colors
    • Painting
    • Chunk System
    • Map size can be up to 1024x1024
    • Simple embedded pathfinding

    Here you got the link to the Asset Store:
    http://u3d.as/content/pozdnyakov-anton/patile-terrain

    Some video:
    Using Editor - http://www.youtube.com/watch?v=8qCF-15wKZE
    In Game Editing - http://www.youtube.com/watch?v=EydJT2Vc6Ho
    In Game Editing 2 - http://www.youtube.com/watch?v=eOo1MUONHek
     

    Attached Files:

    Last edited: Oct 11, 2011
  2. simone007

    simone007

    Joined:
    Oct 30, 2008
    Posts:
    221
    Very nice, I love it. Are you planning to share it?
     
  3. Panerox

    Panerox

    Joined:
    Apr 27, 2010
    Posts:
    15
    Yes, as I wrote, the editor will be available for purchase. The first version will probably be available this week.
    At the moment I have some issues with the Asset Store, when all problems are resolved, the editor will be available for purchase.
     
  4. pixellegolas

    pixellegolas

    Joined:
    Apr 10, 2011
    Posts:
    223
    hehe this is really nice. I think isometric games like final fantasy tactics clones would benefit alot from this.

    Does it have transition of lets say something that looks like a cube wall. Would it be able to transition the 90 degree wall, if you know what I mean?
     
  5. Panerox

    Panerox

    Joined:
    Apr 27, 2010
    Posts:
    15
    sorry, but I do not quite understand what you mean :)
    PATileTerrain is just a few meshes. I plan to make the bounds of the map in the form of the cut.
    Maybe you mean it. It will look like a wall.
     
  6. Panerox

    Panerox

    Joined:
    Apr 27, 2010
    Posts:
    15
    Released...
     
  7. Windamere

    Windamere

    Joined:
    Aug 21, 2011
    Posts:
    15
    From what I see, looks like what I need. When you say edit terrain from inside the game, can you make a Webplayer so I can see this in action?
     
  8. Panerox

    Panerox

    Joined:
    Apr 27, 2010
    Posts:
    15
    Last edited: Oct 11, 2011
  9. Frednaar

    Frednaar

    Joined:
    Apr 18, 2010
    Posts:
    153
    Very nice
    I have some questions:
    1. Can I extend the tile properties with custom values such as walkspeed =2, defense = 3 etc...
    2. From the video I see the user can change the tile elevation, can it also change the tile type (i.e. from grass to sand) ?
    3. Have you tried it in Unity 3.5 beta (I would like to use it for the Flash Contest....)
     
  10. Panerox

    Panerox

    Joined:
    Apr 27, 2010
    Posts:
    15
    1. Now tile has two properties:
    ...
    public bool walkability = true; / / for PathFinder
    public Object customData; / / User data, you can assign your object
    ...
    You can use the 'customData' or add your own properties in the class of the tile.
    2. Yes, it works. You can use special drawing methods.
    ...
    public void PaintTile1x1 (PATile tile, int type)
    public void PaintTile3x3 (PATile tile, int type)
    ...
    3. Yes, I've tried. it works in 3.5.
     
  11. Muckel

    Muckel

    Joined:
    Mar 26, 2009
    Posts:
    471
    Hi,
    nice stuff !
    will it work also on Mobile ?
    I'm looking for a endless terrain on Mobile...
    thxxx
    Muckel
     
  12. Panerox

    Panerox

    Joined:
    Apr 27, 2010
    Posts:
    15
    Yes, it works
     

    Attached Files:

  13. jeedee

    jeedee

    Joined:
    May 30, 2011
    Posts:
    15
    Are you planning on making it serializable to allow saving it in a xml/text file?
     
  14. landcf

    landcf

    Joined:
    Jun 24, 2010
    Posts:
    7
    Hello Panerox,
    I would like to know if PATile supports terrain up to 2000x2000. If it does, how is the performance compared to unity's terrain.
    And is there a demo version of PATile available?
     
  15. Panerox

    Panerox

    Joined:
    Apr 27, 2010
    Posts:
    15
    For such huge maps need to modify the code and optimize the algorithm for editing. As I recall, editing of the mesh Unity3d very slow. The process of editing needed to be moved to the library with native code. Now I have no time for that.
     
  16. kimsama

    kimsama

    Joined:
    Jan 2, 2009
    Posts:
    166
    My problem is that there is seam between every repeated tiles.

    See the attached image:


    How can I get rid of those black lines?

    Thank you.

    -Kim
     

    Attached Files:

  17. kimsama

    kimsama

    Joined:
    Jan 2, 2009
    Posts:
    166
    Problem of the seam between tiles is related to offset value of tile image.

    I modified OffsetX and OffsetY value to 0.01 from 0 (default value) then all seams was gone.

    Thank you.

    -Kim
     

    Attached Files:

  18. lvis

    lvis

    Joined:
    Mar 16, 2012
    Posts:
    2
    Hi,

    This seems pretty interesting...
    One stupid question, just started with Unity a few days ago, more with scripting stuff, not 3d in gerneral.

    In case that i have a cube on the map, and i move it to tile x/y
    Will the cube automaticall align to the height/slope and so on? Or is there any simple formula, so that i can rotate the cube, as it would look like the cube is "climbing" the mountain?
     
  19. kimsama

    kimsama

    Joined:
    Jan 2, 2009
    Posts:
    166
    Hello,

    I got lightmap issues here:

    $lightmap01.png

    As the above screenshot shows, the generated lightmap does not what exactly expected.

    As I guess there should be some tweak on terrain chunks.

    Any ideas?

    Thank you.

    -Kim
     
  20. Panerox

    Panerox

    Joined:
    Apr 27, 2010
    Posts:
    15
    Chunks/Meshes consist of several quads and so light map generation algorithm does not work properly with this type of terrain. I even rewrote the algorithm for calculating the normals, as Mesh.RecalculateNormals standard method of working with such terrains is not correct. So I guess that is the same problem. You can use the realtime shadows.
     
  21. kimsama

    kimsama

    Joined:
    Jan 2, 2009
    Posts:
    166
    I'm using PATfileTerrain for mobile device. So using real-time shadow is not considerable at the moment.

    Before seeing your reply, I've tried to add additional lightmap uv channel, uv2 which is Unity uses for its lightmap uvs.

    Because, lightmapping needs its own uv channel but I couldn't find any uvs for it.

    When PATileTerrain creates tile chunk at CreateTerrain(), I added uv2 like the following:

    Code (csharp):
    1.  
    2. ...
    3. List<Vector2> uvs2;
    4.  
    5. for (cy = 0; cy < chunkCountY; ++cy)   
    6.     for (cx = 0; cx < chunkCountX; ++cx)
    7.     {
    8.         ...
    9.             //Unity will use UV2 for lightmaps, if the channel is present. Otherwise it will use primary UVs.
    10.         uvs2.Add(new Vector2(0.0f, 1.0f));
    11.         uvs2.Add(new Vector2(1.0f, 1.0f));
    12.         uvs2.Add(new Vector2(1.0f, 0.0f));
    13.         uvs2.Add(new Vector2(0.0f, 0.0f));
    14.         ...
    15.         }
    16.     ...
    17.     mesh.uv2 = uvs2.ToArray();
    18.     ...
    19.  
    But it results same like the above one.

    As I think, PATileChunk can be consider just as ohter plane so, adding uv2 could sovled the problem but it didn't.

    Why? Could you explain about it for more details?


    Thank you.


    -Kim
     
  22. Panerox

    Panerox

    Joined:
    Apr 27, 2010
    Posts:
    15
    PATileChunk it's not a plane. This mesh is composed of several independent quads. Each quad can be called a simple plane, consisting of two triangles.
    I have tried to manipulate the UV coordinates, etc., the result remains the same. Unity 3D generates the lightmaps are not as they should. I did a test and created a few simple planes (GameObject / Create Other / Plane) 16x16 = 256 planes, and the result was similar.
    PATileTerrain uses simple plane, nothing else, and Unity 3D uses the data is not correct, and eventually obtained lightmaps are not correct.
     
  23. kimsama

    kimsama

    Joined:
    Jan 2, 2009
    Posts:
    166
    Thank you for the reply and your effort.
     
  24. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    Any chances to make it using 3D tiles? Each tile would be separate mesh then (but they would be melt together using something like CSG to make chunks)?
     
  25. areszues92

    areszues92

    Joined:
    Dec 16, 2013
    Posts:
    78
    Tyvm Panerox for sharing this with us, it's a really good editor.
     
  26. Cripplette

    Cripplette

    Joined:
    Sep 18, 2012
    Posts:
    66
    Hi,

    We at Graphicstream are working on a TiledTerrain which gives you the possibility to also create Cliffs like in the Wc3 editor :)
    It should be available soon, we are testing the last bugs, it should be in beta in 2 weeks or so.
     
  27. The-W-A-T-Z-R

    The-W-A-T-Z-R

    Joined:
    Apr 13, 2014
    Posts:
    22
    your videos is not existed man XD haha not good
     
    Kattlelack likes this.
  28. Kattlelack

    Kattlelack

    Joined:
    Jul 11, 2013
    Posts:
    4
    Is there a way I can access or change the custom data through a script?
     
  29. The-W-A-T-Z-R

    The-W-A-T-Z-R

    Joined:
    Apr 13, 2014
    Posts:
    22
    whit this tool can i use my terrine i have now and make it into pieces/Chunks