Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[RELEASED] Procedural Generation Grid

Discussion in 'Assets and Asset Store' started by FimpossibleCreations, Jul 20, 2021.

  1. farart

    farart

    Joined:
    Oct 31, 2017
    Posts:
    1
    Hey! Great plugin. I want to buy it but I don’t understand if it can do exactly what I need.
    I am describing the complained about: I need the plugin to infinitely generate a street with passages to courtyards (analogous to rooms, but with high walls) in real time as the hero progresses through the level. How is this different from "corridors and rooms"? I need arched passages to the courtyard, two or three meters thick and sometimes covered with gates with bars. Can your building plan do this?
    And courtyards, if possible, should be slightly crooked, not 100% rectangular

    And is it possible to randomize floors 2,3 and so on?

    In short, can a plugin do something very close, like in the photo? :)


    And one more question. Can I read the full tutorial online? This would resolve many issues
     

    Attached Files:

    Last edited: Oct 16, 2021
  2. victorkin11

    victorkin11

    Joined:
    Apr 20, 2013
    Posts:
    175
    I know it isn't fair to compare PGG with Dungeon Architect, since I get both assets, and I want to make some procedural generation scene, so I spend two days to study both asset, without scripting, PGG can do a lot of thing, but even a simple thing are hard to setup, Dungeon Architect are much more easy to setup and do a good jobs, without scripting, PGG may more powerful than Dungeon Architect, but not so Intuitive, Dungeon Architect are so much intuitive, if you will do a little scripting, it will more powerful than PGG.

    I do hope PGG can improve the work flow, because PGG still in beta state, I decide to use Dungeon Architect at this moment.
     
    cybie likes this.
  3. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    525
    Infinite generation is right now in work in progress stage, it requires some polishes to make it work fully correct.
    Here's gif of inifnite flight example which is provided with the package, but it's very simple scene and setup.
    You could prepare FieldSetup which would generate streets and cover it with high walls around on the grid you provide. Such streets probably will require many different tiles to make everything connected with eatch other.

    If you want to generate level infinitely with character position, you would need to provide grid cells shape on your own (lists of Vector3int positions), continous infinite world creation like minecraft etc. is using slightly different logics, it's like pre-known what's gonna be created at some world position, building plan is preparing finished closed areas.

    If you want to bend streets in flexible way you would need to use some other packages from the asset store on the generated areas by PGG.
    Randomize floors you mean different windows on walls? Then yes.

    You can read user manual here, it's not fully complete because there are upcoming big changes in the next updates.
    And here's tutorials playlist.
     
  4. sticcler

    sticcler

    Joined:
    Sep 23, 2021
    Posts:
    2
    Hello, I am very interested in this asset, however I have a quick question similar to the one above. I would like to generate a large interior area that is not separated by loading screens, which - to my understanding - requires streaming. Do these generated rooms already come with that capability, or would I have to first generate the large map (when the player clicks play) and then somehow connect a streaming grid to it? If the latter, is there a method you would recommend for setting that up with this asset?
     
  5. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    525
    Hello, in the current stage of development of the package, there is no finished support for this purpose.
    It probably will be developed after completing beta version.
     
  6. Chuy

    Chuy

    Joined:
    Mar 30, 2013
    Posts:
    2
    Hi, checking out the dungeon game demo i've noticed that there is some kind of "tag" in the build plan for retrict position, do some one knows where do you set this tag?
     

    Attached Files:

  7. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    525
    It can be used to prevent spawning rooms near the path start/end points
     
  8. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    525
    Procedural Generation Grid just updated to Beta Version 1.5.0:

    - Introducing 'Build Planner' Node Graph System:
    Node Graph system will be developed until the end of Beta Version of the Plugin.
    It's early version of the system, first it will aim to provide nodes and features
    to replace all of the other, hard-coded generators (facility, simple dungeon, rectangle of fields etc.)

    Initial version report:
    > Node Graph system with more than 70 coded nodes (much more in the future)
    > 6 Initial Shape Generator algorithms
    > Early manual update for the node graph system
    > Build Planner Executor component to handle build plans
    > Function Nodes Support (functions created out of other nodes - no compilation needed)


    - Field Setup Compositions for grid painters:
    Allowing to replace variables, spawned prefabs and editing other aspects of any field setup.
    - GUI update for the field setup to make it a bit more compact and quicker to read with some new icons.
    - Grid painters now allows to add ghost cells: no spawning in cell but trated as cell in graph, good for creating empty space inside grid.


    - Tile Designer window and Tile Designer Field Setup node.
    Tile Designer allows to generate architecture tile shapes like walls, roofs, pillars
    and create holes in meshes and spawn them on the scene / generate prefab without need to
    do models in the modelling software.


    New tutorials on the youtube: https://www.youtube.com/c/FImpossibleCreations/videos
     
    mick129, lukasynthetic and shyamarama like this.
  9. matzomat

    matzomat

    Joined:
    Mar 4, 2018
    Posts:
    63
    Hey,

    thank you for this but I can't seem to get this to work, even after changing the classnames (SimpleDungeonGenerator). Could you help me please?
     
  10. pixelChisel

    pixelChisel

    Joined:
    May 19, 2016
    Posts:
    17
    Hi! I've been experimenting with PGG for the past two days and it's super impressive; however, I do have a few questions:

    On the AssetStore page, you mention that "this system can generate objects in edit mode, as well as in playmode and on the build"
    That sounds amazing, and exactly what I'm looking for... but all the "generate" buttons or functions I could find seem to be editor-only tools.
    The only things I need to do are to set a FieldSetup's grid size through a script, and to access the method behind the "Generate New Grid and Spawn" button from the FieldDesigner window. Can this be done?

    Thanks!
     
  11. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    525
    Hello,

    Yes you can do this with generator components.
    The simplest way to generate it, if you need just simple rectangle shape grid, will be adding "Simple Field Generator" component to the empty object on the scene, select Field Setup file, set size in cells and click generate or call:
    Code (CSharp):
    1.          
    2. using FIMSpace.Generating; // Add this line on top of your script file, in order to see SimpleFieldGenerator class in code
    3.  
    4. SimpleFieldGenerator generator; // Assign somewhere through inspector window
    5.  
    6. generator.Generate(); // Call in your script's Start() or somewhere you want to trigger generating
    7.  
    Currently there is Node Graph layout generator system in progress which will help to generate more complex and customized levels without need to do tones of custom coding.
    Generating level layout with all door connections is tough thing to code ;)
     
  12. pixelChisel

    pixelChisel

    Joined:
    May 19, 2016
    Posts:
    17
    Hi! Thank you for your answer. Everything works perfectly! :D
     
  13. matzomat

    matzomat

    Joined:
    Mar 4, 2018
    Posts:
    63
    I'm answering myself.

    To generate a NavMesh I have tagged every floor prefab as "Floor" and used this script:
    Code (CSharp):
    1. using System.Collections.Generic;
    2. using UnityEngine;
    3. using UnityEngine.AI;
    4.  
    5. public class GenerateNavMeshOnFloor : MonoBehaviour
    6. {
    7.  
    8.     [Tooltip("Tag assigned to all objects that should generate a NavMesh.")]
    9.     [SerializeField] private string searchTag;
    10.     [Tooltip("If the Navmesh should be scaled out of bounds. 1 will only generate inside as usual.")]
    11.     [SerializeField] private float ScaleCells = 1f;
    12.     [Tooltip("Size that all floor tiles have (x and z).")]
    13.     [SerializeField] private Vector3 scale = new Vector3(2f, 1f, 2f);
    14.     [Tooltip("Maximum Level size.")]
    15.     [SerializeField] private Vector3 NavBounds = new Vector3(200, 40, 200);
    16.     [Tooltip("Center for NavMesh generation.")]
    17.     [SerializeField] private Transform center;
    18.  
    19.  
    20.  
    21.     private void Start()
    22.     {
    23.         if (searchTag == null)
    24.         {
    25.             searchTag = "Floor";
    26.             Debug.Log("searchTag in script GenerateNavMeshOnFloor empty in ", this);
    27.         }
    28.  
    29.         if (center==null)
    30.         {
    31.             center = this.transform;
    32.         }
    33.     }
    34.  
    35.     public void Generate()
    36.     {
    37.         Time.timeScale = 0;
    38.         NavMesh.RemoveAllNavMeshData();
    39.         NavMeshBuildSettings set = NavMesh.CreateSettings();
    40.         List<NavMeshBuildSource> listOfFloors = new List<NavMeshBuildSource>();    
    41.         GameObject[] allObjectsWithTag;
    42.         allObjectsWithTag = GameObject.FindGameObjectsWithTag(searchTag);
    43.         NavMeshBuildSource floor = new NavMeshBuildSource();
    44.         Vector3 tempScaleHolder= new Vector3(scale.x * ScaleCells, 0.0f, scale.z * ScaleCells);
    45.         for (int f = 0; f < allObjectsWithTag.Length; f++)
    46.         {
    47.             floor.transform = allObjectsWithTag[f].transform.localToWorldMatrix;
    48.             floor.shape = NavMeshBuildSourceShape.Box;
    49.             floor.size = tempScaleHolder;
    50.             listOfFloors.Add(floor);
    51.         }
    52.  
    53.         NavMeshData built = NavMeshBuilder.BuildNavMeshData(set, listOfFloors, new Bounds(Vector3.zero, NavBounds), center.position, center.rotation);
    54.         NavMesh.AddNavMeshData(built);
    55.         Time.timeScale = 1;
    56.     }
    57. }
    58.  
    But it works only on flat surfaces with square floor tiles.
     
    shyamarama and StevenPicard like this.
  14. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    525

    Sorry I didn't answered.
    As for now I suggest using runtime nav mesh generators solutions from github.
    When using just cell tiles it can be hard to generate correct nav meshes between the rooms with the walls between and doorway connection nav meshes.
     
    matzomat likes this.
  15. matzomat

    matzomat

    Joined:
    Mar 4, 2018
    Posts:
    63
    Thank you. Could you elaborate?
     
  16. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    525
    First search result directed me to unity's tools for nav mesh, it needs objects with colliders to build navmesh runtime and it gives result like this if you set generated objects as child transforms for nav mesh generator objects. (I've set floors and walls Layer to "Water" to test it)
    upload_2022-8-1_9-35-53.png


    With tiles nav mesh generator there probably will be no nav mesh separation for the walls:
    upload_2022-8-1_9-40-7.png
     
    matzomat likes this.
  17. bvonline

    bvonline

    Joined:
    Feb 27, 2021
    Posts:
    75
    Quite urgent questions:

    As we are planning cartoon houses with round edges (inside and outside), we will use a toon shader (Flat Kit e.g.) on the walls.

    Shader Problems in case of splitted walls (?)

    I assume, that there might occur problems with toon shaders - especially when walls are combined with round edges -, as a generated house is not one mesh, but consists of several meshes, so the toon shader will "cut" the colors at the end of a mesh (if you know what I mean?)... We need - in an optimal case - a generated wall mesh which is connected to the the specific cartoon material which has been attached on (several house walls with round in that case with the same material). Will we really run into such problems? Or will separate meshes be combined properly without any empty spaces which could cause the shader to "break"?

    Reusable House Presets (?)

    Also, I could not quickly find some information about if there is a chance to use "house" presets which can be created... to add several different house on a map.

    Roofs and height level variations (?)

    We are also thinking of roofs, and several vertical height levels - seems, that this is no problem to do, correct?

    Also when thinking of walls, wich are on the same vertical axes, but just above a wall of a lower level? Because it should be possible to add different walls on different verticals stages...

    Stairs and open floors (?)

    Should also be no problem to do, correct? Just to be able to walk stairs up to the next height level....

    Thank you for your quick answer in advance!
    BV
     
  18. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    525
    I tried using tiled walls and curved walls with toon shader from the flat kit and it works fine.
    I am attaching screenshot, correct me if you mean different case.
    You have possibility to automatically combine tiles into single mesh, but it does not weld vertices (but there should be no need for it anyway) but it should be easy to implement with some mesh-simplify plugin.


    The system is basing on such workflow.
    You can make preset for each part of the building: preset for placing walls, floors and ceilings, preset for placing furniture, preset for placing lights etc.
    You can also create preset variables for example to replace some props renderer materials without need to create a new separated setup.
    The latest version introduced "Compositions" (work in progress) which allows you to modify prepared preset's objects to spawn, variables and other settings without changing source preset.

    The shape of the generated architecture (meaning the shape of the grid created out of grid cells)
    is another separated topic: you can create it manually (Grid Painter component) use Generator Components (will be deprecated) or use Build Planner with Node Graph (basically layout generator - work in progress - now package is focusing on this feature)


    This is one of the simplest tasks to do with logic nodes.
    You would need to add Grid Position Node and change parameters, it would do something like:
    If Cell.Y position is = 0 then allow to spawn Wall Type 1
    If Cell.Y position is = 1 then allow to spawn Wall Type 2
    but in more visual friendly way - you don't need to code anything, just add nodes and prepare them.

    The logic nodes allows you to do lots of customization, but it needs a bit of time to learn how to work with it.


    Actually there is not yet direct and easy support for that, but it's possible.
    Right now I am focusing on fulfilling some other features for the main layout generating logic and when most important things are there, I am going to focus on vertical aspect of generating architecture.
    But it doesn't mean it's impossible, you can do it in a similar way like the doors generation is handled, in the future I will provide features which will make it easier to work with vertical levels transitions.
     

    Attached Files:

    bvonline and StevenPicard like this.
  19. bvonline

    bvonline

    Joined:
    Feb 27, 2021
    Posts:
    75
    Thank you for your answer. I have sent a message by Discord. Planning to buy it.
     
  20. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    591
    Don't understand how to setup prefabs to occupy more than 1 space and couldn't find it in the documentation either

    upload_2022-8-18_1-43-17.png

    I set 2x2x2 occupy cell but as you can see the cubes are still spawned in 1x1 spaces
     
  21. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    525
    I prepared quick image to help understand what "cell offset" is doing here (! it's not 2x2x2 !) - it is selecting different cell in relation to currently executed cell, like this:
    upload_2022-8-18_11-42-19.png

    You can click on the small rectangles button on the right of node header:
    upload_2022-8-18_11-46-1.png
    to select cells you want to occupy around.

    To avoid spawning other objects in the occupied cells use spawn tags.
    I suggest taking look on the tutorials, the tags is one of the fundamental approaches to control generation.
     
  22. stayvfraw

    stayvfraw

    Joined:
    Aug 10, 2022
    Posts:
    1
    Hello,

    Love the package! Excellent work and very comprehensive!

    But if I have a prefab of a basic wall that is 1 unit long, and I have a variation of that wall that is 1.5 units long (has a wide window), how do I spawn the wall variation and despawn the basic wall?

    Using the standard way in the tutorials and manual only deletes the basic walls length of 1 unit, and so the variant wall is either partially obscured by neighboring walls or if it spawns on a corner, it extends far outside the room.

    Thank you for your help!
     
  23. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    525
    Thanks!
    To generate such window wall it would be better to have tile of 2.0 units long, since you still need to fill this 0.5 unit gap.
    If you have type of wall with 0.5 size you can just create another prefab using 1.5 and 0.5 wall and spawn it using PGG.
    And to replace two wall tiles with one bigger you need to prepare spawner which is executed after initial walls generating, then using logic nodes check if in desired cell there is wall + wall on the side with the same rotation to replace it, then remove this walls replacing with 2x walls sized tile.
    Here I prepared simple example field setup executing such logics, keep in mind that if you need for example different tiles when double wall is placed at room edges then logics will get more complex.
    upload_2022-9-25_14-31-30.png
     

    Attached Files:

  24. BiggieShrimp

    BiggieShrimp

    Joined:
    Sep 7, 2021
    Posts:
    7
    Hello,

    When trying to add a new Cell Instructions Command, activating and setting as Pre Run Modifier/Post Run Modificator/etc. seems to break the Field Designer window, all below options disappear, and I cannot edit anything.

    Am I doing something wrong, or is this a bug?


    upload_2022-9-27_20-8-54.png

    upload_2022-9-27_20-9-1.png
     
  25. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    525
    Hi, are you sure you updated PGG to the newest version? It was a bug about month ago but it's fixed now.
     
  26. dev_project

    dev_project

    Joined:
    Jan 31, 2020
    Posts:
    13
    Hi,

    First of all, thanks for your great asset. I've purchased the asset and spent some time watching tutorials and trying things in Unity.
    This tool's got big potential but, given its complexity, it still lacks documentation and video tutorials to explain things beyond basics. From my past experience with procedural generators: debugging is not easy. I.e. it's hard to reason about the produced results when multiple rules are applied in a specific order and especially when things change due to randomness. I think it would be good to have more in-depth debug info per cell. It would be beneficial to have something like an extra component attached to each spawned entity showing the processing history with the names of generators, their processing results (e.g. spawned due to X, skipped due to Y, removed due to Z) and some interim steps. Otherwise, it's very easy to dramatically change something or even break something when it's hard to go back to the previous results since no undo commands or history of actions is available.
    A couple of specific questions from me:

    1. It seems to be a recurring question regarding the spawning of objects bigger than a single tile. E.g.:
    upload_2023-1-4_14-23-44.png

    I'd like to randomly spawn various objects of different sizes without having to manage them individually with different spawn rules depending on their sizes. Would it be possible to use the bounding box to ensure the object is pushed out to avoid collisions with already spawned objects and also to occupy neighbour cells I the bounding box is large than the tile?

    2. I tried to follow the door placement tutorial but am getting different results when re-generating the data using the same rules.

    See 3 random variations below:

    a. Nothing gets added:
    upload_2023-1-4_14-24-12.png

    b. Wall still gets generated:
    upload_2023-1-4_14-24-39.png

    c. Sometimes door gets generated (the result I want):
    upload_2023-1-4_14-25-20.png


    I tried changing the distance in "Remove in position" and also changing between "Greater" and "Lower". It's still always randomly going via 3 results above without a real way to control the outcome.

    3. I'm still a little confused about the props placement rules. E.g. I try to avoid placing props next to windows (say, large wardrobes blocking windows). When I set the distance of the cells to be 2.9 I'm still seeing cells located much closer the window (see the screenshot in the next post because I can only upload 5 screenshots at once). I'm not sure if it's to do with Euclidean vs Manhatten distances (if that's the case it would be good to choose the metric via a dropdown because Manhatten makes more sense on a tile grid).

    "Nice to have"-s:

    1. Prefab groups. I'd sometimes like to reuse some prefab groups in different spawners but I have to create them from scratch every time looking for prefabs across the project.Or at least it would be good to be able to copy-paste prefabs across different spawners.

    2. Being able to apply "Automatically apply box collider" to all prefabs in a group instead of having to individually check it for every prefab:

    upload_2023-1-4_14-44-4.png

    3. Some UI elements don't have tooltips and it's hard to understand how exactly they are used. This is also useful to understand that elements have extra options available when right-clicking on them.

    Thank you!
     
  27. dev_project

    dev_project

    Joined:
    Jan 31, 2020
    Posts:
    13
    Screenshots for question 3:
     

    Attached Files:

  28. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    525
    Thank you for the great feedback.

    The manual will cover more subjects with the updates, but many solutions are experimental, core code is changing so the manual update is not yet on the highest priority.

    Yes the debugging is important and I prepared something like this for the Build Planner system (layout generator tool) at some point I will implement something similar for the Field Setup workflow.

    It's actually called as you wrote "Occupy" and it can be done using "Cell Operation" node with cell selector
    upload_2023-1-5_18-18-28.png
    and yes, there is "Occupy Cells With Bounds" node in my task list for one of the next updates.

    Are you sure it's not the case described in the doorway tutorial in 3:58?
    There is probably wall measurement error and it's better to switch measure mode to 'Renderer Center'


    First make sure that windows are placed before the props in the order, so props can detect them, if windows mod/spawner is called after props, then props didn't have info about windows yet.

    If you're adding windows using commands with 'Post Execution', you can use "Optional Cell Data" field: it's adding string to the cell before field mods, so you can check distance to the "Cell Data" instead of "Tag" before window is generated.

    It is already there. Above prefabs list you see "Draw Setup For" and "Objects Stamp" is the thing you're talking about.
    It comes with extra features like random choose probability per prefab.
    The third option, multi set mode is list for multiple object stamps.
    I just wrote in task list to ensure it's working properly, I wasn't testing the stamps in Field Mods for few months. (I noticed it can throw error when having already prefab list and switching to Stamp, but it should work right on a fresh Field Mod)

    I will left selection per object but I can also add right mouse button menu to apply it to all prefabs.

    Thanks for reminding about tooltips, obviously I forgot to add them in some places, I will try filling it in the next update.
     
  29. Giantsmall

    Giantsmall

    Joined:
    Apr 28, 2019
    Posts:
    17
    Hello, I am new to PGG.
    Went through all tutorials I've found and I am impressed by what this tool can do.
    Trying to make simple city layout - created one main road planner added secondary roads.
    So far I have no idea what nodes to use to make it look better - like how to add min distance between secondary roads.
    Is there plan to document what each node is doing?

    Looking forward for future updates
    Marek
     
  30. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    525
    You probably would need to do iterator loop and try finding position with big enough distance between roads.
    At some state of the beta stage I will prepare separated document with the most common nodes use case description, but for now you need to relay on finding nodes by name and reading their header tooltips / hitting right mouse button on the node and selecting "show node description".
     
  31. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    243
    A few ideas/wish list for the Build Planner (going from relatively reasonable to complicated and crazy):
    1. Ability to fill an outline. e.g. I define the boundary of my object and when corridors and rooms are generated, there are no voids left, and everything stays within the outside boundary.
    2. Different room styles with ability to assign based on location. e.g. I want to create "office" rooms along wall 1 and "laboratory" rooms along wall 2. This would also tie in to doors, etc. -- an office would get a different door than a laboratory
    3. Repeat room or group of rooms multiple times along a corridor -- think hotel or apartment block.
    4. Transition from outside to inside -- ability to generate exterior walls, doors from exterior to interior
    5. Third dimension: multi-level, stairs/elevators (probably from prefabs), ability to generate rooms and corridors that have different heights -- need to be able to detect "collisions" e.g. 2nd floor room extending into 1st floor room that is double height.
    6. Constraints on number/size of rooms by type. e.g.
      • bathroom is minimum 2x3 units up to 4x7, bedroom is 4x6 up to 10x14, etc.
      • for every n bedrooms generate at least 1 bathroom
      • generate exactly 1 kitchen
    7. Outside/inside, second part: generate randomly scattered buildings, with interiors as in #1, different objects to place inside vs outside. Probably would leverage definitions from #2.
    Maybe some of those things are already possible and I just don't have enough experience yet to figure it out. Some of them I'm pretty sure are non-trivial.

    Regarding #1, I wonder if it wouldn't be better to consider the edge of the grids as the center line of the wall and offset the wall prefab into the room instead of offsetting the grid and ending up with grid lines that don't match up from room to corridor to room.
     
    haleler51 and StevenPicard like this.
  32. unitygnoob008

    unitygnoob008

    Joined:
    Sep 17, 2016
    Posts:
    225
    hey

    why does importing the assembly definitions for this break and produce this error:
    Code (CSharp):
    1. Assets\FImpossible Creations\Plugins - Level Design\PGG\Editor\Planner Related\FieldPlanner.Editor.cs(473,36): error CS1061: 'List<FieldPlanner.SubGraph>' does not contain a definition for 'ContainsIndex' and no accessible extension method 'ContainsIndex' accepting a first argument of type 'List<FieldPlanner.SubGraph>' could be found (are you missing a using directive or an assembly reference?)
    ContainsIndex, idk????
     
  33. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    525
    Thanks for reporting.
    It seems "AD_FimpPGG.Editor" lacks "AD_FimpShared" which you can try adding manually but I will upload fix on the store in a minute.
    upload_2023-3-8_20-31-43.png
     
    unitygnoob008 likes this.
  34. kotoffei

    kotoffei

    Joined:
    Jul 8, 2019
    Posts:
    15
    Hello!
    Is it possible to create a whole building with this asset? For exmple i shall make some rooms, then i ask the asset to make a building with them?
    Thank you in advance.
     
  35. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    525
    Yes, there are examples for generating interior rooms then generating exterior walls/windows/doors but the examples are a bit outdated and soon new updates will bring new approach for such purpose.
     
  36. Ghosthowl

    Ghosthowl

    Joined:
    Feb 2, 2014
    Posts:
    228
    Can your asset be used for stitching together pre-made prefabs?
    Can it also be used to generate multiple levels of a building and connecting them together with such things as stairs or elevators?
    Also, can it handle 45 degree bends in making halls or corridors?
     
  37. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    525
    Not in the current version, but I planning to implement it in the next versions (1.6.7 or 1.6.8)

    It can. There is old example of generating flat building with multiple rooms on each floor level and with elevator inside, but it's deprecated example. Right now plugin is focusing on layout generator workflow with use of node graphs, but there is no flat example like the deprecated one yet.

    I am not fully sure what you mean.
    It can make rounded wall corners with extra logic but generating works on the rectangle-shaped-cells, so it has some limitations for irregular shaped prefabs generating.
    If you mean making smoother upstairs/downstairs paths, you can adjust single cell size Y axis value lower, to support tiles like this. Approach is described in this tutorial video (18:30):



    Keep in mind that this plugin is providing tones of customization possibilities, but the downside is time required for learning how to use it.
     
    StevenPicard likes this.
  38. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    186
    Is it possible with PGG to generate spaces in a certain volume but not create empty spaces? Currently I see in all videos rather a random connection with "tunnels", which would make sense for a bunker system, but what if I have a house of a certain size or shape. Can PGG then be used to effectively fill the whole house area with rooms, staircases etc.?
     
  39. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    525
    Lastest versions provided new features for the layout generator, which allows to divide rectangle into rooms:
    PGGRoomsGen.gif
    + implemented helper features for generating doorways between tight placed rooms.

    But I wasn't yet focusing on staircases. It should be possible tho.
    I will work on the features for staircases in some of the next updates.
     
  40. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    243
    Awesome!
     
  41. KingOfMitochondrions

    KingOfMitochondrions

    Joined:
    Oct 20, 2019
    Posts:
    2
    Hi, I have just created the assembly definitions by clicking the "All Fimpossible Creations Plugins Assembly Definitions" under /Assets/FImpossible Creations/Plugins - Level Design/PGG.
    But I got the following error.

    Assets\FImpossible Creations\Plugins - Level Design\Generators Shared\Mesh Generating\FMeshUtils.Generate.cs(32,62): error CS0426: The type name 'PolyShapeHelpPoint' does not exist in the type 'FMeshUtils'


    And if I add that missing AD_FimpTileDesigner, it comes to the cycling referencing with this AD_FimpMeshGenerating.

    Could you take a look at this?
     
  42. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    525
    Hello, if you had PGG already in the project, you need to remove Fimpossible Creations/Plugins - Level Design
    directory and import plugin again. Unity Package Importer will not solve files which moved to other directories in previous update and it can cause errors.
    I suppose that's the case, since when I import all in clean project there are no errors and no missings.
     
  43. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    186
    Sorry for the late reply, I didn't get to it earlier. The update looks incredibly awesome. Exactly what I was hoping for! Is there also a possibility to use not only rectangular shapes but also some "non rectangular" houses like here ?
    upload_2023-9-12_15-8-31.png