Search Unity

[Released] Tessera : Generate 3d tile based levels with Wave Function Collapse

Discussion in 'Assets and Asset Store' started by BorisTheBrave, Nov 28, 2019.

  1. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    No worries, I was simply referring to using the mouseover to display a color near the mouse cursor (or right where you draw the face), or even just color the tooltip with said color. You could make the faces into "slots" and display the color there in the center or something too. If you're just drawing a 3d cube gizmo, I don't remember if you can set the material for it somewhere or not, but that makes me wonder how this face thing works for non-cube prefabs.

    Also, maybe you could just draw a slightly "larger" (white or dark-gray) 3d cube gizmo behind the existing (selected) gizmo to better display the color of those faces on the prefabs? -- It would save a bit of work messing with overlays and whatnot, while also showing the color clearly (and it would be nice to give the user the option to toggle this background cube/gizmo on or off).

    I get that not everyone is a UX wizard, and Unity is particularly unwieldy in that area. No worries. I am still hoping you can toggle between the most recently used colors via the same shortcut key (i.e. I hit "X" two times to toggle back to my third most recently-used color after using the first one -- i.e. colors A, B, C >>> "X" x1 = color B, x2 = color C, x3 = color A, x4 = color B, etc. ... )


    As for the other shortcuts, simply holding Shift and right-clicking should be the color-picker (and should display the preview color and name before picking on the main palette window possibly). X, of course, should swap between the three most recently-used colors. Clicking in the Palette window on the colors there (with Shift held down) should likely set the most recently-clicked colors as the recently-used color for x1, x2, or x3 keypresses of the "X" shortcut (or indexes 1, 2, and 3 by default, if nothing but the default color index is selected yet). Showing the selected color/face name should really be visible in the palette (as well as the three face types that are selected for toggle between).

    Hopefully the above paragraph helps with this.

    I know it will be immensely helpful to have at least three "colors" available at all times. At the very least, as a more simple-to-implement alternative, let users use Shift + 1,2,3 to "pick" these color indexes from the palette via shortcut (and from nearby faces using RMB). RMB will set the color of whatever index slot is currently active (whether it's 1,2, or 3). However, X should cycle through and activate one of the three colors after another regardless of how they get assigned in the interface. Cycling through colors is very necessary for speed while assigning different prefabs similar colors/face types, limiting the need to go click on windows and color swatches constantly during this critical process.

    Right-clicking a face (with Shift) could bring up and close the palette window (in case it takes up too much screen real-estate), and it would be useful if that window popped-up right where the mouse cursor was (but this isn't necessary as long as it is at least in the center of the screen).


    Perhaps adding a new Layer via Shift + L (which would be consistent with Photoshop) or Shift + V to add a new volume rule area.

    Outside of what's been said above, I think that should cover the workflow in terms of necessity of speed and ease-of-use ergonomics. I've not played with the more advanced features, but slopes and sky aspects might need some love (to make them a little more straightforward in terms of discovery). Regardless, I've got no complaints otherwise. :)
     
  2. LineKernel

    LineKernel

    Joined:
    Dec 11, 2013
    Posts:
    46
    i m slightly colorblind , the main problem i have in life is thoses images with the circles of many colors , or red text on white background , your tool is fine for my colorblindness
     
    awesomedata likes this.
  3. kca

    kca

    Joined:
    Nov 27, 2013
    Posts:
    6
    Hi!

    I need help with some strange issues, possible bugs.
    Some related to generation in general and a few to the "Generating on Mesh Surfaces" feature and another to the "Overlapping Model" feature.

    Unity version 2021.2.15f1.
    Tessera Pro version 5.1.1.
    The 3D tiles made by ProBuilder 5.0.3.

    A.) when we generate the layout in edit mode
    1.) objects from the scene view randomly (?) disappearing (looks like the ones used as reference tiles for the layout generation).
    2.) the buttons of Clear/Generation from the "Tessera Generator" script of the Inspector tab also disappearing.
    To make them reappear I used to press the undo/redo keys.


    B.) the generated object/objects of the layout on the surface mesh become "independent" from the surface and also scaled up non-uniformly:
    1.) in game mode when the surface was already generated in editor mode (except if it is generated by "Generate On Start" script, then it is fine).
    2.) in editor mode when we open up a scene that was saved with a generated layout.
    3.) in editor mode when the generator object selected in the Hierarchy while the generator button pressed in the inspector.

    Screenshot 2022-04-19 192316_LI.jpg

    4.) in editor mode when we select an element object of the generated layout of tiles in the scene view.

    Screenshot 2022-04-19 193400.png

    Screenshot 2022-04-19 193538_LI.jpg

    C.) when Overlapping model is selected we cannot add samples to the list of samples, cos in its place an error message appears:
    "You can't nest Foldout Headers, end it with EndHeaderFoldoutGroup."

    Screenshot 2022-04-20 000431_LI.jpg


    Thanks for your help.
     
  4. kca

    kca

    Joined:
    Nov 27, 2013
    Posts:
    6
    Hi there!

    I just figured out the problem described in B.) is ProBuilder (obviously).
    After I export the meshes (Tools > ProBuilder > Export > Export Asset), delete Pro Builder Shape (Script) and ProBuilder MeshFilter, the unity's basic Mesh Filter automatically added (, with the prev exported meshes !! ? ), and all the issues of point B. are gone.

    Sadly my workflow lost some flexibility, but that's it.

    But point C. is still here ("You can't nest Foldout Headers, end it with EndHeaderFoldoutGroup.") and I have no idea what is the problem.

    It shows up even if I create an empty project and import only Tessera Pro, and load in a sample scene ('GrassPathsOverlapping').
    I opened the above project with a bunch of Unity Editor LTS versions, and also with the 2022.1.0b16 BETA, but the error message sits.

    Thanks,
    kca
     
  5. littenli

    littenli

    Joined:
    Dec 18, 2019
    Posts:
    33
    Help Wanted!

    Hello, I am using "Tessera Procedural Tile Based Generator". When I click the "Paint" button of "Tessera Tile", the "Tile Painting" window should appear according to the tutorial, but it does not.

    This causes me to be unable to continue using it.
    By the way, I'm using Unity 2021.2.10f1c1.

    Please help me, thanks.

    Snipaste_2022-04-22_14-32-43.png
     
  6. kca

    kca

    Joined:
    Nov 27, 2013
    Posts:
    6
    Hi!

    Try to open it up manually through the menu Window > Tessera Tile Painting.

    Screenshot 2022-04-24 205733.png

    kca
     
    littenli likes this.
  7. kamGames

    kamGames

    Joined:
    Apr 2, 2013
    Posts:
    33
    Hello @BorisTheBrave I have been working with you system(Tessera Pro) and was wondering if there is a way to change the Tiles during runtime(a Build system), like update only an 3x3x3 cube to match the one in the center and also ignore the Tiles that don't need updating(If I missed in the guide a reference will be grate too)
     
  8. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
    Thanks for your reports
    .
    > objects from the scene view randomly (?) disappearing (looks like the ones used as reference tiles for the layout generation).

    I think I need a more detailed report on this one.

    > You can't nest Foldout Headers, end it with EndHeaderFoldoutGroup

    This is almost certainly some foolishness on my end. I think unity changed the behaviour in 2021. I will prepare a fix for the next version. In the meantime, I suggest you comment out the Begin/End HeaderFoldoutGroup which will allow you to proceed.

    > was wondering if there is a way to change the Tiles during runtime

    I'm afraid there is no guide, but most things can be changed at runtime. The API Documentation will help you further.

    It *sounds* like you are trying to change the tilemap after tessera has generated it. You're a bit more on your own there. At the moment, tessera generates stuff by instantiating the objects, then it totally forgets about them. So you can't really use it for changes. You can either use the normal Unity methods for altering objects, or you can delete tiles and then ask Tessera to re-generate the whole area. Tessera reads tiles already in the scene, so this will cause it to replace the deleted tiles and keep everything else in place.

    > the "Tile Painting" window should appear according to the tutorial, but it does not

    As KCA says, try the menu option instead.
     
  9. kamGames

    kamGames

    Joined:
    Apr 2, 2013
    Posts:
    33

    But it can be done like in your example on your website (https://www.boristhebrave.com/2022/04/25/editable-wfc/)

    I may have not explained that I was hoping to get some insight on how to begin to work on a Editable WFC with your system
     
    Last edited: Apr 29, 2022
  10. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    @BorisTheBrave

    Any chance on supporting "meta" tile chunks that don't need to be regenerated on larger maps? -- i.e. I have a grid of 128x128x1 tiles, but with (4x) sub-areas as 64x64 "chunks" that contain 1x1x1 and 1x1x2 tiles that I would like to later cull/replace with a LOD so that I can see these areas from a distance (without them occupying too much memory)?

    It seems like optimizing a generative pattern to include subareas like that would make tiles Tessera generates A LOT easier to work with for serious game level creation -- especially when it comes to optimization. Right now, I still use Houdini because it is easier to use than Tessera + layers of logic for stuff like this. However, I feel like Tessera isn't far away from being able to do this well enough itself. I would much prefer to stay in Unity as much as possible (which is, essentially, the fundamental reason why I bought Tessera). Perhaps a simple "baking" to mesh and "baking" these tiles and meshes to a grid (with subsections -- as in the example above), is a functionality that is a little harder to translate (quickly and simply) from within Houdini to Unity mesh instances.

    Just something I was hoping for since I found Tessera -- and food for thought.
     
  11. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
    > But it can be done like in your example on your website

    I write articles on lots of subjects. That blog post does not say anything about Tessera. It may be a feature in the far future, but it's not in Tessera's feature list atm. There's a large gap between "understand something and it works" and "production ready feature that is user-configurable and bug free".

    > Any chance on supporting "meta" tile chunks

    Tessera's default behaviour of just instantiating an object per tile isn't great for huge maps. And the mesh output coalesces everything into one mesh, which is also not very useful. So yes, I have considered some sort of chunking support in future, I might work on it once i finish my current project.

    However, you *can* use Tessera as part of a more complex pipeline. If you set the OnComplete callback, then Tessera will not create anything, but provide you with all the data about what it will create. You can use that however you like. Perhaps you can find an existing LoD asset, and feed the data into that?
     
    awesomedata likes this.
  12. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    Thanks, that would be ideal. Honestly, while I initially wanted to purchase Tessera because I wanted to be able to handle 3d tilemaps of huge sizes, when I read this wasn't part of Tessera, I was pretty disappointed considering how great it was otherwise for the generating side of things. It seemed like low-hanging fruit that just wasn't there for such a great product otherwise.
    That being said, the option to handle some of this on my own is definitely a plus. Sadly I'm no longer really a power-user who tries to bend Unity's meshing algorithms to my will anymore (at least in the graphical department), so I tend to use Unity's existing display features (along with some third-party tools like Tessera, as well as applications like Houdini) to do the "heavy-lifting" for me in the procedural-generation departments.
    However, a Unity-specific tool like Tessera would be better than Houdini if it offered at least some basic level of generic or mesh-based meta-tile support and optimizations so that I could create a ton of tiles and have my worlds repopulate or generate LODs only within certain areas where I want it to (when I want to tweak specific tiles to be specific things in specific meta-tiled areas and procedurally-generated chunks). This as a feature, to me, would crush any competition for Tessera when it comes down to quickly generating (and playtesting) tile-based worlds. Right now, getting into a world we generate in Tessera is more of a long-term goal (due to needing to create tile-handling infrastructure) than a "generate-and-play" scenario (which is what most users tend to want with something like this). In fact, I can see this feature alone giving Dungeon Architect a run for its money. Just saying. :)


    This is an idea, but I don't own any LOD assets. I typically generate the LODs I use in Houdini (which handles textures and everything in batches). Essentially, I have to program my own version of an ideal form of Tessera in Houdini. That isn't as difficult as it might sound, but it would require a few days of development time to do (as well as a pretty sound knowledge of Houdini -- not to mention the interface wouldn't be as nice/friendly as Tessera when it comes to designing the specifics in my levels). Therefore, in the end, I would prefer to rely on Tessera whenever possible for the tile-based generation and loading/unloading of tiles/metatiles specifics and instancing/LOD usage -- especially when DOTS gets closer to being ready. Having a system architecture in place for handling the loading and display of this kind of stuff like this would be a great selling point for myself and others looking for a usable drop-in system like yours (without hassling us to learn the API of a tool -- or build one ourselves -- when it comes time to visualize our levels and performance).

    I'd love to use Tessera for something serious with larger and more detailed worlds. If the metatile loading/unloading/lod systems are generic enough in their design, it definitely has that kind of potential. I could see using this for the projects that don't even use tiles for (except for level-streaming). Either way, thanks for considering this idea! -- Just something to think about for the future. :)
     
  13. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
    Thanks aweseomdata - i'm still working on Tessera enhancements, it's been slow going.

    Everyone else - I've relased Tessera 5.2.0 which I think fixes all the issues mentioned above. Let me know if things are still broken for you.
     
    kca, awesomedata and StevenPicard like this.
  14. petervrenken

    petervrenken

    Joined:
    Dec 17, 2014
    Posts:
    1
    Hi Boris, great asset - purchased the Pro version a few days ago.

    Small question:
    I'm currently working on a small game that uses a hex grid for floating islands. Tiles in use are next to the primary ground tile a lot of border tiles that give the outside of the island somewhat more detail. The water (or clouds ;-)) are empty gameobjects tiles which then get removed and replaced by a water/cloud plane.

    However the islands are very fragmented and shattered into many small ones instead of a fewer bigger ones.
    I'm somewhat confused on how to best change this as giving different weights to the tiles does not really seem to help.

    Could you give some hints or guidance on how to best approach the creation of islands, or did I maybe miss an example somewhere from where I can distill the tricks of the trade? Any small tip would already be very much appreciated.

    In the meantime: keep up the great work!

    KR from Germany,

    Peter Vrenken
     
  15. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
    Hi Peter, that's a great question. I've actually struggled with that myself. You generally want to increase the weight of non-edge tiles, so water and land, rather than coast. However you never really get a natural looking coastline - that just seems to be how the generation algorithm works.

    You could also try using a Path constraint. Using the connected setting, you can force the generation to only make a single island. Combine with a count constriant to get a single, *large* island.
     
  16. Gunhi

    Gunhi

    Joined:
    Apr 18, 2012
    Posts:
    300
    How can I make objects follow the generated paths. I want some cars moving on the sample HexRaceway.
     
  17. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
    Tessera only handles level generation. Using the level is your own responsibility. So I don't have any advice on that.
     
    StevenPicard likes this.
  18. PhoenixAdvanced

    PhoenixAdvanced

    Joined:
    Sep 30, 2016
    Posts:
    316
    Hi,
    This asset looks very interesting, but I have two questions.

    First of all, would it be possible to use this at runtime? IE, generate a (relatively small) grid of objects and instantiate them without noticeable frame rate issues?

    I'm not talking about a large city, etc, just a relatively simple settlement, etc?

    Second of all, could this solution be used for slightly more abstract WFC tasks, such as, for example, creating a large, single building, rather than a city?

    So, I could specify the parts of the building, how they should connect, etc, and then the WFC system creates the building itself?

    Thanks!
     
  19. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
    Hi Phoenix. Yep, it's perfectly usable at runtime. Small grids are virtually instant to generate.

    And yes, Tessera is designed to be very flexible. You supply the tiles, so are free to design anything you like as long as you've designed how they connect. One of the provided samples shows building a castle out of small pieces, for example.
     
  20. PhoenixAdvanced

    PhoenixAdvanced

    Joined:
    Sep 30, 2016
    Posts:
    316
    Hi,
    Thank you for your reply, that's is very encouraging, I think I'll give Tessera a try.

    I'm currently trying to decide between Tessera and another competing asset, and it seems tessera will win out on features.

    The one question I have left is, would it be possible for your asset to create non-building models too, such as in this video:



    I hope you don't mind me showing a video from a competing asset in your forum thread! I can remove it if you like, but it's basically a video of a WFC algorithm creating a spaceship model from discrete modules. Could this be done with Tessera?
     
  21. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
    There's nothing in that video you cannot do with Tessera.

    Also, the basic version of tessera is only $5. I'm biased of course, but have you considered just downloading it and seeing?
     
  22. PhoenixAdvanced

    PhoenixAdvanced

    Joined:
    Sep 30, 2016
    Posts:
    316
    Hey, thank you!

    I actually purchased the pro version, and I'm playing around with it, it looks great!
     
  23. Yany

    Yany

    Joined:
    May 24, 2013
    Posts:
    96
    Hi @BorisTheBrave,

    I'm planning to buy your asset, and I have to tell you, your documentation is extremely nice and makes me believe this tool is very well thought through.

    I'm planning to make a racing game on terrains that are generated with WFC solution, so I read through most of your documents (sic) and checked your tutorial video, but they left a few specific questions unanswered, that I'd like to discuss before jumping into using your tool. I might have missed earlier answers here or stuff in your docs, despite I did my best to know them before I ask, if that happens, sorry for that.

    As I mentioned, I plan to make a car racing game in which the players can create tracks on generated maps, and that requires some constraints regarding the generated part. I plan to create landscapes as islands on water and let the player put the racing track on the generated land. So my questions:
    1. LOD and Rendering performance - I've already read some discussions about performance, but do you recommend an exact solution to speed up rendering the final result? I saw output to mesh is an option, but you also mentioned that it has its own traps. So for instance an 80x10x80 (x,y,z) island, what do you think the best solution could be to render the landscape? Simple separate prefabs with LOD added? Or put into a single mesh? Or are there any other ways to optimize the result for performance? If the mesh is the way to go, what are those cons compared to other solutions? Do you rank this as a "big" map if I want to make my game performant on a mid-tier desktop PC?
    2. Generation time - Do you rank it as a big task for Tessera to generate such a landscape having about 40 different tiles? How much time should it take to generate a landscape of such size?
    3. Natural, layered islands - I saw here in the forum that generating an island with natural-like beaches and structure is not an easy thing with WFC, or at least with this tool. Before I started checking Tessera and other assets I figured out how I can generate the overall shape of an entire map with shader graph and I put it into a texture. My question is if I have a texture that holds information about where "land-type" tiles should be placed and where is empty (basically a simple boolean value for each cell in a 3D space), can I somehow put that information to Tessera as an input? I know about the callbacks you mention in the documents, so that seems to be a viable low-level solution, but is there a high-level way to feed that information into Tessera? Like this texture: upload_2023-3-5_16-9-48.png
      If you take a close look at this example, the red channel is the bottom layer (level 0), the green defines level 1, and blue is the level 2. This is just an example, but I think you get the concept: I put land where the texture says so, but I'd like to let Tessera find out what kind of tiles should be placed there (for instance, beach tile to the borders of level 0, but rocky elevation to the level 1 and above borders).
      Alternatively, is there a way to configure Tessera itself to end up with similar layered-flatty-island results?
      It's very important in this question, that it's not the only intention to get not-too-scattered islands, but also to have this "layered" style, meaning: each layer should have extensive flat area(s). The game I want to create is not about giving players landscapes that force the tracks to go constantly up and down on small bumps but to go up hills and down occasionally. If Tessera could use such an input like this texture, that could be a solution for others too to generate a landscape with a specific architecture-style.
    4. Runtime API limitations - Are there related features in Tessera I can do in the Unity editor, but missing from the runtime API? I mean I want to give my players the option to generate a random map based on the rules above, not just myself as the dev providing pre-generated maps for my players. As far as I understood from the docs, I can give my players the features needed to do all the generation runtime, right?
    5. Tile modeling tool - Can you recommend a specific tool (preferably a Unity asset) to model 3D tiles? I mean, not just modeling 3D tiles, but doing with assisted tools, like taking care/highlighting of bordering edges to be in seamless line with other tiles', managing models as tiles (like defining pairs), and so.
    6. Strict tile direction - If I want to put rivers on a landscape that has a visual current/flow, it seems to me that it's possible to generate that by assigning separate colors to each side of the river tile and by preventing the connection between the same color on the palette matrix. So this way it cannot happen to get a river that has a flowing current in the opposite way of the neighboring tile. I just wanted to be sure if I see it right. The same issue can come up for other animated tiles too.
    7. Tessera for validation only - Is there a way to fill up a grid with tiles (loading from disk, or by setting them from any data, but not by generating them using Tessera) and then check it with Tessera if it's a valid grid? Basically using Tessera just to validate a landscape that was not generated by Tessera or at least not in the same session of the validation. Why I ask this: I plan to provide the players to generate random landscapes with Tessera and let them edit a track on it, but currently I think the concept of how the ground tiles must meet the WFC rules is very similar to how the track validation works not just between track tiles, but with the ground tiles too. So in order: the player gets a random landscape using Tessera, then the player edits the track on it (not by replacing the ground tiles, but laying them over that) and then validates the manually edited track using Tessera (whether it fits with the ground and the track tiles together). Is it something you think can work?
    8. Connection rules based on tile mesh - Some other WFC assets have a feature to analyze the tiles fed into the tool and create the connection rules based on the 3D mesh itself. Does Tessera provide such a feature or do you plan to make it? That could be a very handy tool to automap the connections between all tiles if you have a larger set in a palette.
    9. Merging both meshes for graphics and meshes for collision - If I have tiles with MeshCollider component attached and those colliders reference different meshes (a simpler for instance) than the MeshRenderer, does Tessera merge the meshes referenced by the colliders too into a single mesh if the mesh output is chosen? It seems to be a must-have feature if the collider mesh is much simpler than the visual mesh.
    10. Collapsing possible tiles by custom conditions - Is there a way to define context-specific set of tiles available during generation in addition to the palette matrix, like tile coordinates or component properties of a tile prefab. For instance I just want to let the generator put water tiles on the bottom layer. Or bottom layer can have grass and oak trees, above there are rocks and pine trees, and at the top level put snowy tiles.
    I know it's a lot, and most of my questions are not business critical. Seeing the docs for your asset brought me very close to the decision already, whatever your answers are, the stuff you created is already awesome and I really appreciate all your efforts.
     
  24. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
    There's a lot of questions there. I don't have time to answer them fully.

    LOD / Rendering

    Tessera does not do these things for you. It generates game objects (or one big mesh). You are free to feed the output of tessera into other unity assets that can handle these things for you.

    Generation Time

    Unfortunately, this is very difficult to answer. It varies a lot. Tessera is not the fastest implementation, either. Best I can do is offer you a refund if you find it unsatisfactory.

    Natural Layered Island

    The grid based nature makes anything natural tricky. And WFC doesn't do well on large scale features, like topography across an island. I'm not that clear on how your layers work, but stuff like that generally is possible. You can make flatter generations by making slopes more rare, or by simply designing flatter tiles.

    Runtime Limitations

    Everything can be done in runtime. The only limitation is that Tesseras user interface (e.g. used for painting tiles) is Editor only. If you want to change paint at runtime, you need to edit the fields on the object, which is harder.

    Tile Direction

    Yep, you can color the front/back of river tile differently, and use a palette to ensure that front only connects to back. But that alone isn't enought to prevent loops, which looks very unriverlike. The Path constraint has some additional features you'll likely want.

    Validation

    Hmm, not considered this use case. While the answer is technically yes, I think this would be a pain to do, and you'd find just a yes/no answer not very useful.

    Connection rules based on mesh

    Many people have asked for this, but I dont' support it at the moment, sorry!

    Merging Colliders

    It does not. You're right that makes it a pretty useless feature.

    Custom Conditions

    Yes, these are called constraints and should be well documented in the manual. E.g. a VolumeConstraint can filter the bottom layer just grass and oak tiles.
     
    Yany likes this.
  25. Yany

    Yany

    Joined:
    May 24, 2013
    Posts:
    96
    Hi there,

    I appreciate the time you spent answering my questions. By now I have bought your package and just started trying out its features. I started with a new HDRP project and my very first step was to import Tessera Pro and I got this in the console:
    upload_2023-3-9_17-26-11.png

    Is it something that breaks functionality or may I ignore it?

    Unity v2021.3.17
    HDRP project


    edit #1: I did the same in Unity v2022.2.9, and there's just a single warning, so I stick to this Unity now:
    edit #2: I noticed when I checked your sample scenes, that the generator does not treat prefabs as actual prefabs to instantiate, but general game objects. This way it is not possible to fix all tiles of a kind without regenerating a whole map. I guess it is worth checking if a given tile is a prefab or an instance of a prefab and spawn an instance of it instead of creating a detached gameobject. As a result, the generated tiles could be prefab instances (with possible overrides) and fixing the prefab itself would fix all the tiles already placed. Also the scene files would be extremely smaller as putting all the gameobjects straight into the scene (without prefab referencing) means all the serialized stuff goes into the scene. What do you think?

    Or is it something that can be controlled with one of the components? I checked the instantiate one, but it is about a different thing.
     
    Last edited: Mar 9, 2023
  26. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
    I've not seen that error, i'll check it out. The warning can be ignored.

    Regarding prefabs, I designed tessera with runtime generation in mind, where prefab links are not relevant. I've added that feature to Tessera 6, but it is not released yet.
     
    Yany likes this.
  27. Yany

    Yany

    Joined:
    May 24, 2013
    Posts:
    96
    Hi there,

    I'm making 3D tiles for our game and I'm not sure how the "Symmetric" property works, to be honest.

    1. Could you describe it in a bit more detailed way, please? What kind of symmetry should it be and along which axis if it's axial, or does central symmetry come into play as well?
    2. What happens if I check symmetry on a 3D tile which is not actually symmetric (not even the tile paintings)?
    3. Does it depend on the tile paintings? If so, how?
    4. How does it cooperate with the rotatable/reflectable properties? What happens when I check symmetry on a reflectable tile and what if I do it on a non-reflectable? Isn't a reflectable tile symmetric too?
    5. When I have a tile that looks like and works the same way in every rotation, which properties should I set? All Reflectable, Rotatable, and Symmetric features are true, but I'm not sure if it's better to leave some of these properties off or set all on to have the best performance and the least amount of unnecessarily calculated tile.
    6. Can I see the amount of generated tiles somehow from which the algorithm picks the potential one?
    It looks like we have quite a bit of different tiles and I try to get the most out of Tessera regarding the performance and efficiency. Thank you.

    Some work in progress: upload_2023-4-27_19-31-12.png
     
    uchimatausa likes this.
  28. Yany

    Yany

    Joined:
    May 24, 2013
    Posts:
    96
    @BorisTheBrave

    I don't want to look like I'm impatient, just asking if you could give some quick info for those questions above, please? If any of my questions are hazy, let me know and I try to rephrase that. Thank you.
     
  29. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
    @Yany apologies, I was travelling until recently.

    Your pic looks very cool.

    In more detail, "Symmetric" means that the symmetry of the tile contents can safely be derived from the symmetry of the tile paint. If so, Tessera reduces the number of possible rotations it considers, a significant performance optimization. So you want the setting on unless it causes issues.

    It works for any sort of symmetry (rotations, mirrors, etc) as long as you've painted the tiles sensibly. If in doubt, you can turn it off as it's just a performance optimization. If there's no symmetry in the paint, then this setting does nothing.

    Tiles are only ever rotated and reflected as you dictate with the rotatable reflectable properties. As the Symmetric setting just reduces the number of rotations/reflections, it's only relevant to the extent it agrees with what you've set up there.

    ---

    The full list of tiles tessera uses is visible in a debugger. Look for the TileModelInfo class.

    Also, there's a hidden feature of AnimatedGenerator. If you pick an "Uncertainty Tile" which has a TesseraUncertainty behaviour attached, you can pause the generation and inspect the tiles to see the full list of tiles that remain possible at this point.
     
    one_one and Yany like this.
  30. Yany

    Yany

    Joined:
    May 24, 2013
    Posts:
    96
    Thank you, this helped me a lot.
     
  31. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
    If you pick an "Uncertainty Tile" which has a TesseraUncertainty behaviour attached, you can pause the generation and inspect the tiles to see the full list of tiles that remain possible at this point.
    Whoops, this is an unrelased feature. It'll be in Tessera 6, coming soon.
     
    Yany likes this.
  32. Yany

    Yany

    Joined:
    May 24, 2013
    Posts:
    96
    I'm eagerly waiting for the new Tessera. In a couple of days, we arrive at a point where we can check Tessera a bit more in-depth and see if it does everything we need for our game. Our main POIs will be robustness, speed, and controllability, meaning: we plan to generate flatty islands with rocky "bridges" and caves and a grassy surface. We'll see how far we can go and if you wish I can get back here with our notes.

    ps.: will you release the new Tessera as a separate asset or will those owning the current version get the new one?
     
  33. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
    Yes, this update will available to existing users for free.
     
    Yany likes this.
  34. Yany

    Yany

    Joined:
    May 24, 2013
    Posts:
    96
    This is very good news. :)
     
  35. Yany

    Yany

    Joined:
    May 24, 2013
    Posts:
    96
    tldr: my question is at the bottom

    Hey there! I've created a pack of scripts to autogenerate all the possible variations for cube tiles based on the following method:
    1. Split up a cube into 8 "quads" or corners.
    2. Set whether a quad is "filled up" with soil (ground) or is an empty space (air).
    3. Find all the variations. Normally it's a list of 2^8 (256) different variations, but(!) need to skip those which can be reproduced by rotating and/or reflecting an already generated variation.
    4. As a result, it gives 55 different tiles (including the full air and full ground tiles.) and it also sets if it is reflectable and/or rotatable.
    Sidenote: the mesh of the tiles is not autogenerated, the method above just instantiates a prefab with the given "ground" and "air" information for the quads and the mentioned "rotatable" and "reflectable" flags. I drew the meshes by hand, but I added a very handy visualization aid for the generated versions, so I knew where to draw faces using the ProBuilder.

    This is what a tile looks like now with the colored cubes that represent the "ground" quads, and I had to draw the mesh around them:
    Tile_Quads_Visualization.gif

    So my final task is to set the tile paintings automatically, but before I do something stupid I wanted to ask for a very simple example of how I should paint a given tile with a given color from the given palette.

    Let's say I'd like to paint the right face of a tile, and from its 3x3 paintable grid, I want to paint the left-middle and left-bottom one. If I have the tile in the variable myTile, what methods/properties should I use for that and how? Thanks.

    Is the utility I briefly explained above something you could use for Tessera? I can give the code to you if you think it's useful for your users. ;)
     
  36. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
  37. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
    Yany, that's a super cool utility. I've got some ideas in that direction myself, but I've not found the time.

    You can absolutely paint the tiles programatically if you like. But the format is a bit of a pain (also note it has changed slightly from v5 to v6).

    You want to edit sylvesFaceDetails on the tile object. This is a list of objects, one per face of the tile.

    If you wanted to set the paint on the center of face that faces forward, you'd do:

    Code (CSharp):
    1. var orientedFace = myTile.First(x=> x.dir == (Sylves.CellDir)Sylves.CubeDir.Forward);
    2. orientedFace.faceDetails.center = 1; // The first entry in the palette, black by default
     
    Yany likes this.
  38. Yany

    Yany

    Joined:
    May 24, 2013
    Posts:
    96
    I haven't checked the new version yet but it's super news that you came out with that. One thing I did not notice in the changes that bothered me the most with the previous version is when I'm in tile painting mode, I cannot orbit around the object safely because the painting tool "steals" the left click even if the Alt key is pressed and I constantly ruin the paintings accidentally when I rotate around these objects. (I have to start orbiting with the mouse curser over the selected object, but that's really not so rare :))

    Is it something you noticed too? Could you disable tile painting if the Alt key is pressed, please?

    The other one I noticed in the release notes is that users are warned when static objects are used. Why? Tiles should be static in most cases, shouldn't they?

    I have some more progress with tile generation:
    • So 55 different tiles (situations) are generated based on a split-up cube into 8 "quads" and varying where is ground and where is air in those quads.
    • The rotatable and reflectable situations are ruled out and also set the flags as needed.
    • The tile paintings are defined based on the quads. Now it paints "Air", "Soil", "Cliff" and "Grass", where
      • Soil is the inner ground deep inside (no graphics)
      • Cliff is the crust, the actually visible "edge" of the ground, like vertical walls, cave ceilings
      • Grass is the crust of the ground too but used on horizontal surfaces with its normal pointing upwards.
    I could even paint all the tiles by hand, but I'm sure that I'd made a lot of mistakes. This way I just set these rules in code and it should work like a charm. (I haven't tested, rushed to tell you that I'm happy to see Tessera has updates :)).

    Here I'm switching between
    1. The pure ProBuilder mesh (handmade)
    2. The visualized quads I mentioned above (generated; those colored cubes helped me during drawing the mesh)
    3. The Tessera tile paintings (generated)
    autopainted_tessera.gif

    I hope this all works nicely with Tessera, and I also hope it won't give me too much work to update the auto-painter code to use the new Tessera.
     
  39. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
    This doesn't happen to me. What Unity version do you see it on.

    No. Static in Unity means that the object was present when the scene was loaded. It should never be set for something generated at runtime. The warning is pretty clear:

    upload_2023-5-9_23-10-25.png

    Updating the code should be jsut a few renames.

    A lot of users have asked me to infer connections automatically from meshes, which would also solve your problems. Sadly, I don't have that feature yet.
     
  40. Yany

    Yany

    Joined:
    May 24, 2013
    Posts:
    96
    Any I have tested with it so far: 2021.x, 2022.x
    All you have to do to select one of the tile paint tool and try to orbit around the object this way:
    1. Hover your mouse over the selected tile with its paintable faces visible.
    2. Press Alt + Left mouse click just as usual in Unity to start orbiting.
    3. Now move your mouse to rotate around.
    Experienced:
    1. On the click (at step #2) the tile has got painted immediately, despite the Alt key being pressed.
    2. Moving the mouse does not rotate the scene view, as the left click is consumed by Tessera.
    My suggestion: Whenever the Alt key is pressed, Tessera should ignore any clicks in the scene view.

    Now I always have to be extremely careful to avoid the tiles in the scene view when I want to start orbiting because it's not just a bit annoying that the function does not work otherwise, but accidentally I paint color on tiles I might not notice and this is the real issue here as this can cause hidden issues with landscape generation.

    Ahhh, ok, so this is for the runtime generation only. I get it.

    I have finished and tested my code with v5.2 and I can say that I could generate landscapes using the tiles having those generated paintings very well, moreover, the generation was way faster (compared to when I had only 10-15 tiles) as now they cover basically all the situations so no moment should be there when Tessera does not know which tile to drop at a particular position. I have not seen a single occasion when generation failed even with backtrack disabled, that's a great sign. :)

    We've been thinking about island(ish) generation, to have circular-like results and we found out that the following method might work: we should change the weight of specific tiles depending on the distance between a given tile position and the center of the tessera map. Means: the weight of the ground tiles should be lower when Tessera looks for a potential tile closer to the landscape border and at the same time the weight of the air tile should increase.

    What do you think, how could we achieve this with Tessera? Is there a constraint already that we can set up like this, or do we need a custom code for that? Maybe a new Constraint you might consider making? :)
     
  41. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
    Debroglie supports this, but tessera has no feature for it. In case you want to try modifying Tessera, here are the details, but I think it would be challenging.

    DeBroglie is tricky to configure due to sparse docs and the fact everything is table driven. But you can see the options here: https://github.com/BorisTheBrave/DeBroglie/blob/master/DeBroglie/TilePropagatorOptions.cs TilePickerType.ArrayPriority does what you want. When it's set, it'll read WeightSetByIndex to determine which "weightset" to use for a given position, and then WeightSets configures the weights inside a weightset. Just set "priority" to 0, you don't need that feature.
     
    Yany likes this.
  42. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
    i will look into this
     
    Yany likes this.
  43. Yany

    Yany

    Joined:
    May 24, 2013
    Posts:
    96
    This was the only change needed:

    Code (CSharp):
    1. var face = tile.Get(Vector3Int.zero, (CellFaceDir)faceDir);
    to

    Code (CSharp):
    1. var face = tile.Get(Vector3Int.zero, (Sylves.CellDir)faceDir);
    I tested the clicking issue too, it still blocks scene view orbiting...
     
  44. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    Is there a way to elegantly utilize Tessera for "1D" (arranging elements along a line or spline, e.g. fences etc.) generation? Would 1 by n grids work or is there a way to do it more efficiently? Or is perhaps Tessera overkill for that?
     
  45. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
    A 1 by n grid would work fine.

    You could even generate a mesh of faces in a row if you wanted Tessera to generate along a spline
     
  46. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    Interesting, what would be a 'mesh of faces'? Is that Tessera terminology I'm not familiar with?
     
  47. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
  48. Yany

    Yany

    Joined:
    May 24, 2013
    Posts:
    96
    Hey Boris,

    May I have a feature request? In my project there's a rather hefty amount of tiles that your great stuff have to deal with, and it does quite well, though when I want to change the weight of these, it's difficult to know, what these tiles are, because all I can see from a tile is its name.
    upload_2023-10-12_12-29-3.png

    These are generated and this is just a part of the whole list. Could you make the list of the tiles behave like Unity's own Project windows does?

    Let me show you what I mean:
    Unity_JQTKRAiF20.gif

    The "list view" in Tessera should be the way it looks just now, and the "thumbnail view" should look like something like this for each tiles added:
    upload_2023-10-12_15-31-19.png

    In "thumbnail view" I meant the asset preview feature Unity shows when you select a prefab. Can be added using the AssetPreview class.

    Unity_iHzphxm3G9.gif

    What do you think?

    edit: if getting a preview from a custom prefab is just too tedious, I can even imagine a solution to tell Tessera in which field it finds a preview texture pre-rendered. This way I can store a preview texture with the prefab itself in one of its members.
     
  49. Yany

    Yany

    Joined:
    May 24, 2013
    Posts:
    96
    A quicker question:

    Can you explain how the FacesOnly type of pinned tiles works?
    I wanted to specify a few tiles on my terrain to align with faces defined on the pinned tile, but when I place these pins in the scene, Tessera skips them though the docs say:

    upload_2023-10-13_11-57-8.png

    As I understood, Tessera will pick any tiles in the place of the pinned one and give a constraint on the neighboring tiles. This is exactly what I wanted to achieve.
     
  50. BorisTheBrave

    BorisTheBrave

    Joined:
    Nov 18, 2018
    Posts:
    64
    That's a lot of tiles Yany. If you are generating them, I think you should probably also manage the generator's tile list programatically.

    I'd like to improve the UI, but it's quite tricky in Unity.

    ---
    The pins do need some better docs. I vaguely plan to rename them to be clearer. For now I suggest you experiment to see what gives the best result. The difference betwenee facesonly and faceandcells is that the latter blocks tessera from generating a tile in that location. Both have very similar behaviour on neighboring tiles.
     
    Yany likes this.