Announcement

Collapse
No announcement yet.

Modular Construction Tool: Example Project - Release

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [TOOL] Modular Construction Tool: Example Project - Release

    Download Source:
    https://gumroad.com/l/GVSGf

    Updated 7/4/2015

    Edited:
    Removed Kite Demo Assets.

    Using the Layout Designer to create a building Prefab.


    Example Verison: 8.4 - Will update to the offical 4.8 when avaliable. Note that the files will work in 4.7 except for the blueprint node for Editor Apply Spline which was new to 4.8.

    -City of Tristian's Revival- Well for my first test in modular parts lead to the creation of the city or Tristian but before i could release it for those that wanted to play around with it my version of the 4.2 build corrupted the terrain vegitation causing the entire scene to no longer work. This make me sad a little but in the 4.8PV i was able to convert it and revive the entire map. So why not give it out with this release!

    So about 3 mothns ago, I started looking more into modular/procedual creation. My final result being the CityPath Builder which adds builds on top of all my previous smart objects to help me make citys and towns faster for my game. Since I'm not an artist I can't really think of any better way to create buildings outside of themed modular parts. With the use of an external application built in C# I can make prefabicated building layout designs and save them to a collection. From there I can use both the City Path Builder and the Building Generator to load this data and apply custom building themes to the instances in the map, spawn the building parts and make them to instanced meshs for optimization.

    Classes:

    BuildingModTile:



    This is the smallest component of the Building Gen it's purpose is to house the base components of a modular tile, all modular parts are displayed in this component. This compnent holds the Floor,Wall(External Walls),InternalMesh (Used for internal walls aka walls adjacent to external walls), Decoration Mesh (Wall Lamps, pictures etc), and Furnatur Mesh. The data for this tile is sent from the controlling parent into this component. Any generated content of this tile can be manually changed with dropdowns allowing you to change the wall alignment, the mesh used in this indivisual instance. Lastly the tile will also report its final mesh list to build a baked mesh list of all elements and send this back to the control parent for making into instance meshes.

    BuildingModLevel:



    This component is fairly simple. The level spawns child BuildingModTiles using manual entry, if used alone or by templete prefab data sent from the parent constrolling class. The Level class controls a set of rules for dealing with the templete data. The data normally does not have floor information so the level will determine if a BuildingModTile will need the generic floor or a slanted floor or no floor at all, based on the incomming wall and internal wall data coming from the templete data.

    Manual use of the MuildingModLevel and BuildingModTile:




    BuildingModGen:



    This component is responsible for load prefab data,creating level children, baking children data to instance mesh, adding smart objects to certain items(Interactable Doors, cabinets, tearsure chect etc), Theme creation/mesh collection. First the Prefab loading of building layouts made in the RPG Toolkti Application, by default the BuildingModGen will load all building templetes located in teh Content\Data folder. If for reasons you want to load only a certain types of building layouts the field PrefabFilterPrefix can be set with a Name prefix that will append to the file scan and only bring in files leading with that given naming convention. After the data is loaded the file list are listed in the Building Data section of the details panel from here you can manually set the desired building to generate by setting the DesiredPrefab option to the index of the desired building. From here a building will be generated from teh prefab data.

    Next the Baking process. Once you generate and or modify the tiles as desired you can select the Bake option bool to start the baking process. This will start the baking process for the meshes in the child objects. In addition to the process if you have any meshes linked to smart objects these can be spawned during the baking process. Currently the only smart objects used areMainDoor, InsideDoor or SlidingDoor. These can be expanded as desired. The Smart objects addapt the same rotation and offset as the mesh that they are paired to.

    Finally Themes... Themes are just a instance of the BuildingModBen that has the meshes list setup for a certain building type. Themes are used by the CityPathBuilder to set the data for the buildings on a path. To understand this more, if I make two instances of the BuildingModGen one named Victorian and one named Medieval. The mesh list in each will define the meshes to use for the given style of the modular parts. The dementions of one type could be different from the other. 400x400x400 vs 500x500x1000 modular size. This gives you the ability to make many differnt types of buildings and use them without manually configuring per instance. As a note the theme option in the path building should probably accept an array of building themes to change up the styles of building used in a path but I decided to leave that as a single them to keep it simple...



    CityPathBuilder



    This component generated proxy buildings along a spline, generates BuildingModGen buildings that can be modified after creation, and also triggers the bake process for all buildings. There is also the ability to add a road mesh to the center RootPath, and to apply the spline to the terrain simular to the terrain options for the spline objects. (PLEASE NOTE THAT EPIC NOTED THAT THESE TERRAIN MODIFICATIONS CAN NOT BE UNDOED TO UNDO THIS YOU MUST RELOAD THE TERRAIN DATA THAT WILL RESET ANY TERRAIN MODIFICATION) Because of the before mentioned issue you can opt to not use this feature but you will need to manuall adject the terrain to the buildings underneath sections. This Component is a little hard to explain so i will try to break this into sections according to the configuration sections:

    A_Setup
    • proxyMesh - This component spawns "Render Friendly" Proxy meshes alone the splines. These proxys are scaled to the area size of a loaded list of Prefab data. This should give you a good visual of the building that will be occupied when the building is generated.
    • ModularSize - Used as a multiplier for the Prefab Data loaded for the proxy cubes. NOTE: This data should probably come from the Theme Building but for now it uses this manual option).
    • BuildingTheme - BuildingTheme is a drop down for selecting premade BuildingModGen data that will be used for the random buildings generated on this city path.
    • PrefabFilterPrefix - PrefabFilterPrefix works the same as before in the BuildingGenMod object to filter the building data loaded.
    • LoadBuildingSettings - Bool used to execute the loading process.


    BuildingSettings
    • BuildingSpacing - Sets the spacing between buildings
    • StreetWidth - Sets the offset that the Left and Right Blocks are away from the center RootPath
    • L_BlockActive - Enables or Disables the Left block from being generated
    • R_BlockActive - Enables or Disables the Right block from being generated
    • CurrentBuildState - Used to move back and forward through the building process: Proxy/Generate/Tweaking/Bake/Dormate
    • ShowProxy - Used to enable or disable the proxy generation.

    Video:

    BuildingData only displays the data collected from proxy state. This data is used in the Generate state.

    TerrainSettings
    • RoadMesh - The mesh to use for the road tool.
    • RoadScale - The scale to use for the scale of the road. (Only used X and Y Scale)
    • RoadUpDir - Modifier for the Up direction (Defaults to ZUp) (Note that the forward vector for the road is X default)
    • NumberOfRoads - The number of roads to stretch accross the length to the spline.
    • TerrTarget - The terrain that will be the target for the terrain modifification.
    • RoadTerrWidth - Terrain Flatten settings
    • RoadTerrFalloff - Terrain Flatten settings
    • BuildingTerrWidth - Terrain Flatten settings
    • BuildingTerrFalloff - Terrain Flatten settings
    • UpdateTerrain - Applys the terrain to the splines. (Only works in blueprint and only in 4.8+)


    The workflow for the tool. Does not show the smart objects in this version there are also a few defects with the road calculations fixed now:


    Scene Information:
    The example is 2GB extracted.
    The RPG Toolkit source for the Building Generator module is in the Content\Data folder. It was created using VS2013 C# Forms. If you do not have this compiler there is a EXE already built in the folder:
    Content\Data\RPG Toolkit Data Manager\RPG Toolkit Data Manager\bin\Debug\RPG Toolkit Data Manager.exe


    Modular Parts:

    As for the modular parts they are all made for 400x400x400 space. Things like walls are made to be applied on the mid of the edge of the cutoff plane so that the walls could fit at perpendicular angle to each other. This is another reason the edges of the wall have a 45% angle to them to create a stylistic edgle to the corners of the walls.

    3DS Max 2014: Building Modular Parts

    Mesh List:
    In the example I only used the main meshes needed for the mase building, though all test meshes for the interrior decoration and furnature are in the build. Here is a list of the meshes as they should appear in the mesh list:
    1. BLANK
    2. Floor
    3. FloorSL
    4. INT_NORM_WALL
    5. INT_CORN_WALL
    6. INT_ANGL_WALL
    7. INT_DOUB_WALL
    8. INT_END_WALL
    9. INT_DOOR
    10. INT_STAIRS
    11. INT_WINDOW
    12. EXT_NORM_WALL
    13. EXT_CORN_WALL
    14. EXT_ANGL_WALL
    15. EXT_DOUB_WALL
    16. EXT_END_WALL
    17. EXT_DOOR
    18. EXT_STAIRS
    19. EXT_WINDOW
    20. EXT_SLIDEDOOR
    21. EXT_WIDEWINDOW
    22. RF_SIDE
    23. RF_CORN
    24. RF_INSI
    25. RF_ANGL
    26. RF_DOUB
    27. RF_END
    28. RF_TOP
    29. RF_SL
    30. EX_BDTrimDecoFloor
    31. EX_BDTrimDecoMid
    32. EX_BDTrimDecoCorner
    33. EX_Lattice
    34. EX_LatticeCorner
    35. DEC_RailMid
    36. DEC_RailCorner
    37. DEC_RailBare
    38. DEC_Column
    39. DEC_Blinds
    40. DEC_Chandelier
    41. DEC_Curtains
    42. DEC_HangLamp
    43. DEC_FLLamp
    44. DEC_Frame1
    45. DEC_Frame2
    46. DEC_Frame3
    47. DEC_Rug
    48. DEC_BowlLamp
    49. DEC_OutDoorLamp1
    50. DEC_OutDoorLamp2
    51. DEC_WallLamp1
    52. DEC_WallLamp2
    53. FUR_BreakfastTable
    54. FUR_SofaChair
    55. FUR_Counter
    56. FUR_Desk
    57. FUR_DinningTable
    58. FUR_Sofa
    59. FUR_TV
    60. FUR_VicBed
    61. FUR_BookShelf
    62. FUR_Crate
    63. FUR_CrateStack
    64. FUR_DresserShort
    65. FUR_ForierTable
    66. FUR_Shelf
    67. FUR_TallDresser


    Run through of level (Shows off the smart objects for the buildings door:






    Notes:
    I will try to make a video over how to use the RPG Toolkit Data Manager for the Building Generator.
    Don't make a crazy long path as generating the BuildingModGen can eat some memory.
    As always I hope this helps some people with tool creation and/or help some of you indie people create enviorments faster and efficently.
    Editor Memory clean up from deletion process issues, when generating building parts even though I call the destruction of all child components I think these things are being stored in the editors memory, maybe for undo purposes? Either way it causes a memory eat to happen so after baking something you like if memory get high for you make leave the CityPathBuilder in the Dormate state after bake and restart the editor.





    Screenshots:







    Attached Files
    Last edited by Shoiko; 03-02-2016, 11:52 PM.
    12 CatBlack Studios - One man with a dream, to create amazing things...
    RPG Engine Toolkit: https://www.unrealengine.com/marketp...engine-toolkit
    Auto Terrain Cover V3: https://forums.unrealengine.com/show...ver-V3-Release
    Youtube: https://www.youtube.com/channel/UCuT...VDuzeIeJ6_j1pA
    Facebook: https://www.facebook.com/pages/12-Ca...52913014823124

    #2
    Very nice share! Will have a look as soon as I get the time.
    ______________________________________________
    https://www.facebook.com/madhousesoftware
    Where sanity is a virtue

    Comment


      #3
      Ok, real talk here:

      Can we get this saintly man some spotlight for this? Please?
      @thereisnoscotty
      Grand Marshal of the Parade of Madfellows

      Comment


        #4
        awesome job xD

        Comment


          #5
          I removed the textures from the building parts in the release because I'm not sure if these are efficient textures as everything is world aligned...

          Building Parts Textured:

          Click image for larger version

Name:	MODULAR3__0012_Layer-1.png
Views:	1
Size:	840.0 KB
ID:	1078542
          Click image for larger version

Name:	MODULAR3__0001_Layer-12.png
Views:	1
Size:	860.0 KB
ID:	1078545
          Click image for larger version

Name:	ModularHouse__0002_Layer 6.jpg
Views:	2
Size:	272.7 KB
ID:	1078546
          Click image for larger version

Name:	MODULAR2__0003_Layer-9.png
Views:	1
Size:	830.4 KB
ID:	1078547
          Attached Files
          12 CatBlack Studios - One man with a dream, to create amazing things...
          RPG Engine Toolkit: https://www.unrealengine.com/marketp...engine-toolkit
          Auto Terrain Cover V3: https://forums.unrealengine.com/show...ver-V3-Release
          Youtube: https://www.youtube.com/channel/UCuT...VDuzeIeJ6_j1pA
          Facebook: https://www.facebook.com/pages/12-Ca...52913014823124

          Comment


            #6
            This is insanely impressive. Good work man.

            Comment


              #7
              Nice.... little more become AAA

              Comment


                #8
                Thant's great there a 3ds max script that does approximatly the same thing "https://www.youtube.com/watch?v=ngIcipqrEI0" but i think it's way more better to have it inside the engine

                Comment


                  #9
                  Yes ive used ghost town before. But I was aiming for something simular to the tool they used in Assassin Creed Unity. That was pretty awesome being able to drag out a city block and loop it around on itsself.
                  Go to: 5m36s

                  12 CatBlack Studios - One man with a dream, to create amazing things...
                  RPG Engine Toolkit: https://www.unrealengine.com/marketp...engine-toolkit
                  Auto Terrain Cover V3: https://forums.unrealengine.com/show...ver-V3-Release
                  Youtube: https://www.youtube.com/channel/UCuT...VDuzeIeJ6_j1pA
                  Facebook: https://www.facebook.com/pages/12-Ca...52913014823124

                  Comment


                    #10
                    oh man that's quite intresting, ver beauiful actually

                    Comment


                      #11
                      Yeah, if you do that it will be absolutely awesome.
                      Did you will let this script for free or sell it?
                      thank Epic for this amazing engine !!

                      Comment


                        #12
                        Originally posted by Charles View Post
                        Yeah, if you do that it will be absolutely awesome.
                        Did you will let this script for free or sell it?
                        The Download link is above. It's free sir.
                        12 CatBlack Studios - One man with a dream, to create amazing things...
                        RPG Engine Toolkit: https://www.unrealengine.com/marketp...engine-toolkit
                        Auto Terrain Cover V3: https://forums.unrealengine.com/show...ver-V3-Release
                        Youtube: https://www.youtube.com/channel/UCuT...VDuzeIeJ6_j1pA
                        Facebook: https://www.facebook.com/pages/12-Ca...52913014823124

                        Comment


                          #13
                          Yeah thank you but I was tallking for next updates and if you manage to create a plugin like in the assanssins creed engine?
                          thank Epic for this amazing engine !!

                          Comment


                            #14
                            Right now im letting this sit as is I'm working on some other aspects of my game currently.
                            12 CatBlack Studios - One man with a dream, to create amazing things...
                            RPG Engine Toolkit: https://www.unrealengine.com/marketp...engine-toolkit
                            Auto Terrain Cover V3: https://forums.unrealengine.com/show...ver-V3-Release
                            Youtube: https://www.youtube.com/channel/UCuT...VDuzeIeJ6_j1pA
                            Facebook: https://www.facebook.com/pages/12-Ca...52913014823124

                            Comment


                              #15
                              OK good luck !
                              thank Epic for this amazing engine !!

                              Comment

                              Working...
                              X