Announcement

Collapse
No announcement yet.

Fractals in UE4

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

    [PLUGIN] Fractals in UE4

    HOW I STARTED WITH BINARY TREES AND FRACTALS SHAPES:

    On Sept2016 I posted 'explore fractals with a dragon': that was my 1st tentative to take fractals into UE4.

    Here my 1st demo test generating shapes via bprint starting from the basic 'V' fractal tree algorithm.
    Fractaltree.rar

    Here my first video on this youtube channel
    Attached Files
    Last edited by VerumBit; 01-02-2018, 12:53 PM.

    #2
    This is super cool! I've had some ideas recently about VR and hallucination machines... I think your plug in could help!

    Comment


      #3
      Thanks, I like the 'hallucination machines' definition!
      Here some new tests on a ring mesh I did with UE geometry tool + standard UE materials.
      The Fractal Bprint can mix more meshes together.
      Next step->add particles such as fire, clouds...see what comes out.

      Click image for larger version

Name:	fractaltree1.jpg
Views:	1
Size:	81.0 KB
ID:	1122930

      Click image for larger version

Name:	fractaltree2.jpg
Views:	1
Size:	74.9 KB
ID:	1122931

      Click image for larger version

Name:	fractaltree3.jpg
Views:	1
Size:	265.0 KB
ID:	1122932

      Comment


        #4
        More tests: all created with a code modification to the brpint algorithm...I'm using a few RDT 8K materials this time to engage a real effect...huge memory size but still great speed when moving around!
        Preparing a new video tomorrow...

        Click image for larger version

Name:	4.jpg
Views:	1
Size:	149.5 KB
ID:	1122937

        Click image for larger version

Name:	2.jpg
Views:	1
Size:	369.4 KB
ID:	1122941

        Click image for larger version

Name:	Image4.jpg
Views:	1
Size:	148.9 KB
ID:	1122938

        Click image for larger version

Name:	Image6.jpg
Views:	1
Size:	374.9 KB
ID:	1122939

        Click image for larger version

Name:	Image18.jpg
Views:	1
Size:	370.0 KB
ID:	1122940
        Last edited by VerumBit; 02-11-2017, 08:12 AM.

        Comment


          #5
          New video: testing the bprint when instancing meshes+particles+skeletons+DestructMeshes.

          Comment


            #6
            After testing the fractal brpint on various meshes, skeletons and effects you see in the above 2 videos, my next goal is to generate a fractal scene similar to the one in the pic below (generated with mandelbulb).
            I'll post a new video soon that will report my first tentative. Every mesh will be created via the fractal parametric bprint as instanced mesh. The difficulty in reproducing these kind of complex fractals via bprint rules is to avoid overlapping meshes, find the correct rotating angles of each branch and adjust the scale mesh dimensions keeping under control the GPU speed.
            Hope to create a UE playable scene like this image! If I succeed I'll package a demo, like the one available in the 1st video Fractaltree.rar

            Click image for larger version

Name:	fractals_goal1.jpg
Views:	1
Size:	167.2 KB
ID:	1123152
            Last edited by VerumBit; 02-27-2017, 05:38 AM. Reason: changed Fractaltree.rar link

            Comment


              #7
              I so so hope you succeed in making that happen. Is the idea that having the geometry generated procedurally will allow for actual fractal infinite zoom?
              Derek Kaplan
              Owner/Founder
              OpenFlame.ca

              Comment


                #8
                Yes, procedurally instanced level streamed geometry meshes are the one I'm using and for me the best solution for an "infinite zoom" effect.
                The only issue about infinity fractal is how to manage all the finite objects around, such as the actor mannequin that I use to run on the fractal branches...he has a dimension: actually I prefer to create a fractal that has a very big variable scale dimension but is also playable with other objects around such as actors, skeletons and so on.
                The infinite effect is my last goal and I think is good only for exploration....nothing more at the moment.
                Before that I prefer to be able to use the bprint plugin to give the possibility to realize any possible fractal mesh scene like the one in the picture above and scale it from a very very small dimension (ten times smaller than the actor finger) to a huge dimension where the actor can run on a single branch for a long time.

                To realize such a fractal picture scene I need to go through some steps:
                1. control the direction of a branch, where is going to grow, by setting volumes where it can not grow outside
                2. control the branch twist angle (not just a plane set of branches with planar angles)
                3. control the size of each single 'V mesh' and increase or decrease it during the growth...it's all sin cos calcs and UE v.4.15 has all these math...so possible!
                4. give an AI to each branch so that during the growth it changes direction based on a possible collision with another obstacle mesh

                After all these points solved inside the brpint, it will be possible to set all the parameters and make each actor branch grow to a specific direction, with a specific volume perimeter and so on.....and the pic above should not be impossible to generate...I hope!
                Actually I'm working on step 1: control the direction of a branch, where is going to grow by setting perimeters volumes. Here below a few pics, a branch growth with and without volumes perimeters.

                Click image for larger version

Name:	without_volume_perimeters.jpg
Views:	1
Size:	223.1 KB
ID:	1123621

                Click image for larger version

Name:	parameters.jpg
Views:	1
Size:	181.2 KB
ID:	1123623

                Click image for larger version

Name:	volume_perimeters_active.jpg
Views:	1
Size:	113.8 KB
ID:	1123622
                Last edited by VerumBit; 02-20-2017, 10:49 AM.

                Comment


                  #9
                  With the fractal bprint it is possible to instance everything is inside a level stream and till today I created a branch mesh.....this time I wanted to do something different:
                  - inside one fractal tree, instead of a branch mesh I instanced one skeleton warrior bprint with active ragdoll, blood collisions, movements and a simple AI to catch and kill the player
                  - inside another fractal tree I instanced a metal sphere bprint that I found in the marketplace ragdoll package...basically brpint launching a sphere

                  When placed the 2 fractal tree one opposite the other in the scene, for each branch there was a warrior on a tree and a metal sphere on the other tree.
                  The rest is in the video below, I also added a short time delay when the player hits a warrior to appreciate the ragdoll effect!

                  This was just a different kind of a test...but creating a realistic fractal tree scene remains still the main goal to reach!

                  Comment


                    #10
                    Looking forward to see your fractal scene. Imagine a spaceship flying through a fractal landscape shooting things, could be fun

                    Comment


                      #11
                      Fractal scene is coming out step by step...let's say brick by brick.....in these days I'm working on the branch selection (right and left activation or deactivation) and twist angle of each single mesh.
                      About your phrase 'Imagine spaceship flying through a fractal landscape shooting things' .....let's say that when you put the word 'Imagine' for an UE4 scene, I already agree on it!

                      Comment


                        #12
                        Very interesting. =)


                        Project Reverie Game | SEJonF.com | Twitter | ArtStation | WIP | UE4 SciFi Assets - Season 1 & Season 2 Discount Bundles Free Asset Demo | Ice Shader

                        Comment


                          #13
                          For those of us who don't know what fractals would be used for, could you explain in laymen's terms? Is it just a generation method for procedural placement of geometry? I'm very confused about the video of the warriors AI and how it uses fractals.
                          -TorQueMoD
                          www.torquemod.com

                          Comment


                            #14
                            The warrior video is an extreme example just to show that even a bprint skeleton warrior with it'ìs own AI logic, can be placed inside a fractal branch.
                            At this stage is not easy to see the final pic because fractal branches have only a 'V tree' planar shape, but when will be completed, it will be possible to model a fractal branch via parameters and create one or more different branches that cover a specific volume of space.
                            For example, five branches that start from 5 different locations and that converge all to the same volume space in a sort of blob volume, generating a sort of fractal complex cave: at this point the fractal AI logic will not only let you generate the shape you want but you will also be able to instance any actor you want inside that specific volume of space...actors like static meshes, brpint or animated skeletons like the warrior above. That's the fractal AI logic. Then every instanced actor can have it's own indipendet logic like the warrior bprint.

                            If for example you want to have a battle like the one in the video, but inside a volume created with fractal branches (I really hope to reach a level of fractal shape similar to the mandelbub pic above), you will be able to do it via the fractal bprint AI logic.

                            Consider that every actor instanced via the fractal plugin is not visible during the parameter construction...is not just instancing a mesh, is instancing a level stream mesh...so you don't see the fractal generated until of course you launch the ingame brpint and you set the branch to be Loaded and Visible: in order to place any other actor in the generated fractal scene, I'll set some sort of 'volume traps' (like a sphere net or a cube net or a cilinder net) that will be used to trap and limit the fractal branch in a specific volume. Like when you grow a plant giving it the shape you want using some wire shaped form....and this idea came from real plants like the pic below! Setting a volume trap, the branch inside will start growing and will at a certain point have a collision with a border of the volume and the branch angle and direction will be corrected in order to stay inside the volume, in extreme cases also the branch size will progressively be reduced to be able to stay inside the volume.
                            Hope is more clear...perhaps future pics and videos will explain it better than words

                            Click image for larger version

Name:	plants.jpg
Views:	1
Size:	47.9 KB
ID:	1123776
                            Last edited by VerumBit; 02-22-2017, 01:53 PM.

                            Comment


                              #15
                              The idea should be this:

                              Click image for larger version

Name:	theIdea.jpg
Views:	1
Size:	112.4 KB
ID:	1123807

                              Comment

                              Working...
                              X