Announcement

Collapse
No announcement yet.

Dungeon Architect

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

    (this topic is to big to search for these... )
    - Anyone know how to make door cell size bigger than default grid? Can't find any variation.
    - How to check where is start so I can teleport player there?
    - How to check where is end so I can spawn exit doors in there?
    Last edited by intoxicat3; 01-11-2018, 07:07 AM.
    How to create first person shooter game from scratch. Lots of tutorials: http://www.shootertutorial.com - celebrating 50th Tutorial!

    My Marketplace Assets

    Comment


      Good graphics

      Comment


        Originally posted by Ali Akbar View Post

        rctorres Try increasing the collision test value from to a higher number. The default value of 100 is too low (In the sample videos I use 500)
        Thanks Ali, I tried this and when I click build dungeon, the editor crashes completely, at this point 100% of the time. It would be really useful to see an example project/video or walkthrough of a basic initial set up with this. I'd like to see how you set up the modules, how you made the connections, if you did anything in the persistent level in regards to composition, basic settings on the builder to get it running.

        In the discord channel I also asked if there were plans to allow to offset where the snap dungeon is currently built from. I'm currently using the blueprint version for my project. Right now, no matter where you place the dungeon actor in a level, the snap dungeon is always built from the origin. It would be nice to be able to move the dungeon. For example, if I wanted to have a miniboss, currently I would have one dungeon for the first half, ending at the miniboss fight, and then start a second dungeon/level from there to the end of the level. I know there were plans for some kind of level flow editor or a new builder that could do this? Or adding a midpoint module to the snap builder? If there is a way to do this with the current implementation, please show an example.

        Thanks for your hard work as always!

        Comment


          Originally posted by rctorres View Post

          Thanks Ali, I tried this and when I click build dungeon, the editor crashes completely, at this point 100% of the time. It would be really useful to see an example project/video or walkthrough of a basic initial set up with this. I'd like to see how you set up the modules, how you made the connections, if you did anything in the persistent level in regards to composition, basic settings on the builder to get it running.

          In the discord channel I also asked if there were plans to allow to offset where the snap dungeon is currently built from. I'm currently using the blueprint version for my project. Right now, no matter where you place the dungeon actor in a level, the snap dungeon is always built from the origin. It would be nice to be able to move the dungeon. For example, if I wanted to have a miniboss, currently I would have one dungeon for the first half, ending at the miniboss fight, and then start a second dungeon/level from there to the end of the level. I know there were plans for some kind of level flow editor or a new builder that could do this? Or adding a midpoint module to the snap builder? If there is a way to do this with the current implementation, please show an example.

          Thanks for your hard work as always!
          I too get a crash 100% of the time using the snap builder. I have tried both map and blueprint. BP works some of the time. Ali, which one will be supported going forward? I would would to see more on the snap builder as well.

          As for how to having the dungeon build where you want. Just place it in a negation volume and invert the volume.

          Comment


            I am sure Ali is working on some cool features for DA, but it feels like DA hasn't been in active development lately

            Comment


              I can't seem to get stairs to work in floorplan. does anyone have any suggestions? I put the stairs in and it generates in every room. I just want the stairs to generate in the far left corner of every floor of the building. Great tool, thanks for it.

              Comment


                Originally posted by zouking View Post
                Hello, I am working on creating small houses with floor plan builder, I have a wall with inner texture and outer texture, I cant figure out how to keep the inner texture inside and the outer texture outside, is there a way to rotate the building walls in a way to keep the inner texture inside?
                zouking I'll fix this in the next update
                Dungeon Architect | Prefabricator

                Discord Support

                Comment


                  Originally posted by Raverix View Post
                  Hello, I just purchased the Dungeon Architect, and when I go into 'Paint Mode', I'm expecting to see blue and green tiles representing the path, but neither show, just a black outline as I move the cursor, suggestions?
                  Raverix I'll fix the paint cursor issue in the next update
                  Dungeon Architect | Prefabricator

                  Discord Support

                  Comment


                    Originally posted by MarkcusD View Post
                    Which assets were used for this city demo: https://www.youtube.com/watch?v=FC3Bs6T-xfI&t=21s
                    ?
                    MarkcusD I've used Industrial Area Hangar. I didn't find the roads are not modular and had to create some modifications my self in blender to have it working
                    This set is perfect for creation of locations in open areas, urban or industrial character.
                    Dungeon Architect | Prefabricator

                    Discord Support

                    Comment


                      Originally posted by Hevedy View Post
                      Hey @Ali Akbar got another question, its possible generate a dungeon limited by axis ? In my case lets say I want a game 2.5D or like the old side scrollers, where you see the world from side.

                      Its possible generate the dungeon just in vertical that join different rooms, and special ones with stairs or ladders to connect bottom ones and top ones ? I mean like build a house with many floors aswell define the number of rooms per floor all aligned in the same lets say X or Y to be aligned to the camera that is "2.5D"?

                      Ty.
                      Hevedy, do you mean something like this (attached)?

                      Let me know what you'd like to see and I'll try to code a new builder




                      Attached Files
                      Dungeon Architect | Prefabricator

                      Discord Support

                      Comment


                        Originally posted by TechLord View Post
                        Hello Ali Akbar and DA users. As crazy as the following may sound. I've reviewed the DA User Guide's Generation overview and would like to apply to Two-phased generation method to Entities such as Characters, Weapons, Vehicles, etc. for Procedural Generation. Marker Emitters are attached to the Skeletal Mesh Bones and Sockets. Any recommendations on how I can pull this off?

                        Dungeon Knight Architect
                        Click image for larger version

Name:	DungeonKnightArchitect.png
Views:	6
Size:	52.4 KB
ID:	1403997
                        TechLord You'll need to first determine how you'll need to emit the markers on your skeletal mesh. One way to do it is to sample the points in the skeletal mesh's geometry and then filter them based on how you'd like to lay them out. Here and example I worked on a while ago with static meshes (the red dots are the sample points that can be used as markers)

                        https://www.youtube.com/watch?v=JGielIkvEYE

                        Code:
                        bool SampleTriangle(const FVector& v0, const FVector& v1, const FVector& v2, const FVector& Offset, float Density, TArray<FGrowthNetworkSamplePoint>& OutSamples) {
                            int32 RandomSeed = GetTypeHash(v0) ^ GetTypeHash(v1) ^ GetTypeHash(v2);
                            FRandomStream Random;
                            Random.Initialize(RandomSeed);
                        
                            float TriangleArea = 0;
                            float DesiredInstances = 0;
                            float DensityMultiplier = 5000000;
                            {
                                FVector AB = v1 - v0;
                                FVector AC = v2 - v0;
                                TriangleArea = FVector::CrossProduct(AB, AC).Size() / 2.0f;
                                TriangleArea = FMath::Max(TriangleArea, 1.0f);
                                DesiredInstances = FMath::RoundToInt(TriangleArea * (Density / DensityMultiplier));
                            }
                        
                            bool bStateModified = DesiredInstances > 0;
                            while (DesiredInstances > 0) {
                                FVector Location;
                                GetRandomPointOnTriangle(v0, v1, v2, Random, Location);
                        
                                FGrowthNetworkSamplePoint Sample;
                                Sample.Location = Location + Offset;
                                OutSamples.Add(Sample);
                                DesiredInstances--;
                            }
                            return bStateModified;
                        }
                        
                        bool SampleStaticMeshPoints(AStaticMeshActor* MeshActor, float NormalOffset, float Density, TArray<FGrowthNetworkSamplePoint>& OutSamples) {
                            bool bStateModified = false;
                        
                            UStaticMeshComponent* StaticMeshComponent = MeshActor->GetStaticMeshComponent();
                            if (!StaticMeshComponent) return bStateModified;
                        
                            UStaticMesh* StaticMesh = StaticMeshComponent->GetStaticMesh();
                            if (!StaticMesh || !StaticMesh->RenderData) return bStateModified;
                            if (StaticMesh->RenderData->LODResources.Num() == 0) return bStateModified;
                        
                            TArray<FVector> Vertices;
                            const FStaticMeshVertexBuffer& VertexBuffer = StaticMesh->RenderData->LODResources[0].VertexBuffer;
                            const FPositionVertexBuffer& PositionVertexBuffer = StaticMesh->RenderData->LODResources[0].PositionVertexBuffer;
                            FVector MeshLocation = MeshActor->GetActorLocation();
                            FTransform MeshTransform = MeshActor->GetActorTransform();
                            const int32 VertexCount = PositionVertexBuffer.GetNumVertices();
                            for (int32 i = 0; i < VertexCount; i++)
                            {
                                const FVector WorldSpaceVertexLocation = MeshLocation + MeshTransform.TransformVector(PositionVertexBuffer.VertexPosition(i));
                                //const FVector WorldNormal = MeshTransform.TransformVector(VertexBuffer.VertexTangentZ(i));
                                Vertices.Add(WorldSpaceVertexLocation);
                            }
                        
                            const FRawStaticIndexBuffer& IndexBuffer = StaticMesh->RenderData->LODResources[0].IndexBuffer;
                            TArray<uint32> Indices;
                            IndexBuffer.GetCopy(Indices);
                            int NumIndices = IndexBuffer.GetNumIndices();
                            for (int i = 0; i < NumIndices; i += 3) {
                                uint32 i0 = Indices[i + 0];
                                uint32 i1 = Indices[i + 1];
                                uint32 i2 = Indices[i + 2];
                        
                                const FVector& v0 = Vertices[i0];
                                const FVector& v1 = Vertices[i1];
                                const FVector& v2 = Vertices[i2];
                        
                                FVector Normal = FVector::CrossProduct(v1 - v0, v2 - v0);
                                Normal.Normalize();
                                FVector Offset = Normal * NormalOffset;
                        
                                bStateModified |= SampleTriangle(v0, v1, v2, Offset, Density, OutSamples);
                            }
                        
                            return bStateModified;
                        }

                        Finally, when adding the component, you'll need to find the nearest socket, calculate the offset, then attach to it
                         
                        Dungeon Architect | Prefabricator

                        Discord Support

                        Comment


                          Originally posted by intoxicat3 View Post
                          (this topic is to big to search for these... )
                          - Anyone know how to make door cell size bigger than default grid? Can't find any variation.
                          - How to check where is start so I can teleport player there?
                          - How to check where is end so I can spawn exit doors in there?
                          intoxicat3 for Start / End rooms, have a look at the sample maps under DA_Query_Examples/Grid folder in the quick start examples

                          The door should be the same size as the grid, larger doors are not supported


                          Attached Files
                          Dungeon Architect | Prefabricator

                          Discord Support

                          Comment


                            Originally posted by Ali Akbar View Post

                            Hevedy, do you mean something like this (attached)?

                            Let me know what you'd like to see and I'll try to code a new builder

                            That exactly!

                            Can be cool if work like that with rooms but aswell dungeon style with rooms and connections etc...
                            Hevedy - Instance Tools: https://hevedy.itch.io/hevedyinstances
                            Hevedy - Image Tools: https://hevedy.itch.io/imagetools

                            Comment


                              Ali Akbar Are you still going to post a tutorial how to create a larger City Scene in DA? I cannot figure out how to add the Larger buildings and create a City Block. I been trying to figure out how to make this happen. Any help would be appreciated.

                              Comment


                                Ali Akbar

                                I appreciate you taking time to respond. The Procedural Growth Network looks really neat (and kind of creepy). Working with Procedural Meshes is definitely on my to list. I'm a blueprints scripter so ill have to figure out how to translate the C++ into a blueprints equivalent.

                                Originally posted by Ali Akbar View Post

                                TechLord You'll need to first determine how you'll need to emit the markers on your skeletal mesh. One way to do it is to sample the points in the skeletal mesh's geometry and then filter them based on how you'd like to lay them out. Here and example I worked on a while ago with static meshes (the red dots are the sample points that can be used as markers)

                                https://www.youtube.com/watch?v=JGielIkvEYE

                                Code:
                                bool SampleTriangle(const FVector& v0, const FVector& v1, const FVector& v2, const FVector& Offset, float Density, TArray<FGrowthNetworkSamplePoint>& OutSamples) {
                                int32 RandomSeed = GetTypeHash(v0) ^ GetTypeHash(v1) ^ GetTypeHash(v2);
                                FRandomStream Random;
                                Random.Initialize(RandomSeed);
                                
                                float TriangleArea = 0;
                                float DesiredInstances = 0;
                                float DensityMultiplier = 5000000;
                                {
                                FVector AB = v1 - v0;
                                FVector AC = v2 - v0;
                                TriangleArea = FVector::CrossProduct(AB, AC).Size() / 2.0f;
                                TriangleArea = FMath::Max(TriangleArea, 1.0f);
                                DesiredInstances = FMath::RoundToInt(TriangleArea * (Density / DensityMultiplier));
                                }
                                
                                bool bStateModified = DesiredInstances > 0;
                                while (DesiredInstances > 0) {
                                FVector Location;
                                GetRandomPointOnTriangle(v0, v1, v2, Random, Location);
                                
                                FGrowthNetworkSamplePoint Sample;
                                Sample.Location = Location + Offset;
                                OutSamples.Add(Sample);
                                DesiredInstances--;
                                }
                                return bStateModified;
                                }
                                
                                bool SampleStaticMeshPoints(AStaticMeshActor* MeshActor, float NormalOffset, float Density, TArray<FGrowthNetworkSamplePoint>& OutSamples) {
                                bool bStateModified = false;
                                
                                UStaticMeshComponent* StaticMeshComponent = MeshActor->GetStaticMeshComponent();
                                if (!StaticMeshComponent) return bStateModified;
                                
                                UStaticMesh* StaticMesh = StaticMeshComponent->GetStaticMesh();
                                if (!StaticMesh || !StaticMesh->RenderData) return bStateModified;
                                if (StaticMesh->RenderData->LODResources.Num() == 0) return bStateModified;
                                
                                TArray<FVector> Vertices;
                                const FStaticMeshVertexBuffer& VertexBuffer = StaticMesh->RenderData->LODResources[0].VertexBuffer;
                                const FPositionVertexBuffer& PositionVertexBuffer = StaticMesh->RenderData->LODResources[0].PositionVertexBuffer;
                                FVector MeshLocation = MeshActor->GetActorLocation();
                                FTransform MeshTransform = MeshActor->GetActorTransform();
                                const int32 VertexCount = PositionVertexBuffer.GetNumVertices();
                                for (int32 i = 0; i < VertexCount; i++)
                                {
                                const FVector WorldSpaceVertexLocation = MeshLocation + MeshTransform.TransformVector(PositionVertexBuffer.VertexPosition(i));
                                //const FVector WorldNormal = MeshTransform.TransformVector(VertexBuffer.VertexTangentZ(i));
                                Vertices.Add(WorldSpaceVertexLocation);
                                }
                                
                                const FRawStaticIndexBuffer& IndexBuffer = StaticMesh->RenderData->LODResources[0].IndexBuffer;
                                TArray<uint32> Indices;
                                IndexBuffer.GetCopy(Indices);
                                int NumIndices = IndexBuffer.GetNumIndices();
                                for (int i = 0; i < NumIndices; i += 3) {
                                uint32 i0 = Indices[i + 0];
                                uint32 i1 = Indices[i + 1];
                                uint32 i2 = Indices[i + 2];
                                
                                const FVector& v0 = Vertices[i0];
                                const FVector& v1 = Vertices[i1];
                                const FVector& v2 = Vertices[i2];
                                
                                FVector Normal = FVector::CrossProduct(v1 - v0, v2 - v0);
                                Normal.Normalize();
                                FVector Offset = Normal * NormalOffset;
                                
                                bStateModified |= SampleTriangle(v0, v1, v2, Offset, Density, OutSamples);
                                }
                                
                                return bStateModified;
                                }

                                Finally, when adding the component, you'll need to find the nearest socket, calculate the offset, then attach to it
                                GOD of DREAMs: A Unique FTPS/RPG Sandbox MMO

                                Comment

                                Working...
                                X