Announcement

Collapse
No announcement yet.

[WIP] Procedural fractal mesh generation

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

    [WIP] Procedural fractal mesh generation

    Hi everyone!

    Like a few other people here I have been learning how to generate meshes using code (C++), and my goal is to use fractals to aid in generation of various assets.

    I'm building these as part of a toolbox I need to work on a hobby VR project, which relies heavily on procedurally generated landscape and world assets.

    I recently moved my code over to using the ProceduralMeshComponent that ships as part of Unreal 4.8, and managed to get a nice speed improvement from that.

    I still have a fair way to go but already got some nice results so I wanted to start a thread to show my progress as I go through this.

    I have made a few simple generators, like the Sierpinski triangle and one version of the pyramid.

    Recently I tried setting up a branching generator that can be use to generate tree-like meshes, and will use the basis of that for my landscape generation as well (nothing to show there yet).

    I haven't finished the stitching logic that connects the different sections together, so you can see visible gaps in the thicker tree example below.

    Here are a few pictures to start off with, I hope you like it and it would be great to hear if anyone here is doing similar things

    Some of the tasks I'm working on next:
    • Stitching logic for branching generator
    • Different UV mapping options
    • Figure out a better way to not save the generated mesh with the maps (data gets HUGE!). Only way I've found so far is mark parts of the ProceduralMeshComponent as Transient.
    • Figure out a way to snapshot these into static mesh assets (going to be useful for instanced mesh rendering)
    • Fast way to animate these, stream vertexes to the GPU
    • Consider GPU-based generation
    • Landscape generation, using branching generator as basis for subdivision of a skeletal structure
    • L-System parser and generator
    • And more types of fractals



    Click image for larger version

Name:	sierpinski_pyramid2b.jpg
Views:	2
Size:	109.6 KB
ID:	1149781
    Sierpinski Pyramid built with lines (will do a filled version soon)

    Click image for larger version

Name:	fractal_foilage_1.jpg
Views:	2
Size:	123.1 KB
ID:	1149782
    One of the first tests of my branching generator

    Click image for larger version

Name:	fractal_trees_1.jpg
Views:	1
Size:	73.5 KB
ID:	1149783
    And a few example "trees" and coral-like structures

    Click image for larger version

Name:	fractal_exampleParams_1.jpg
Views:	1
Size:	38.4 KB
ID:	1149784
    Example settings for the branching generator. It's fast enough on my computer that it's pretty much realtime in the editor when changing values. I'll try to update a gif example of this later on
    Last edited by SiggiG; 05-13-2015, 06:04 AM.
    Programmer at Klang Games | Ex-CCP (EVE Valkyrie / Sparc) | @SiggiGG
    Check out my procedural mesh examples

    #2
    That is neat.

    [ATTACH=CONFIG]39226[/ATTACH]
    Carlos Montero | @cman2k | Technical Art Director @neoglyphic
    Working on Sunborn Rising and the Neofur Plugin | I made Black Mesa

    Comment


      #3
      wow, this is really pretty amazing.
      Current Projects -Cat Interstellar
      Lead Developer - Ionized Games

      Comment


        #4
        wow nice
        Dungeon Architect | Prefabricator

        Discord Support

        Comment


          #5
          This looks awesome!

          I look forward to the day when we can generate/manipulate fractals in-game, in real time, sort of like http://sub.blue/fractal-lab

          Looking forward to more

          SINGMETOSLEEP / PARASOMNIA / DARKDRIFT / ETERNAL APEX / PRETTY ABRASIVE MUSIC / TWITTER @ACATALEPT

          Comment


            #6
            This looks great!

            Comment


              #7
              Hi SiggiG

              Genius!

              Do not forget a way to generate foliage, vines (leaves) and interactive deformation using deformation tools like bend, twirl, twist, taper, scale and bones for trunks, branches, and physics (wind and gravity influence). And you will be at the cutting edge!


              -luny
              lunybunny.com
              lunybunny.com

              Comment


                #8
                dude this ***** insane lol imagine the particle effects you could make with this

                Comment


                  #9
                  i know C++ but i dont have a compiler nor VS2015 lol so i cant really work on something like this unless i do it in blue prints

                  Comment


                    #10
                    Could we have a download for this?

                    This is something I am really interested in, more for an abstract exploration type game than for generating assets. I'm a model maker mostly so I'm not interested in fractals for generating assets, I'm content to make them by hand however the potential for fractals is to be able to generate real-time, as they are needed, allowing for infinite levels or levels that morph real time! Anyone here done anything with fractals they wish to share or want to work together towards this goal?
                    My website: www.jaspercousins.co.uk

                    Comment


                      #11
                      How do you do this! I want it

                      Comment


                        #12
                        +1 to MarketPlace !!

                        Comment


                          #13
                          Hi all,

                          I'm back to working on my personal projects again. Rewriting this + examples on how to make procedural meshes as a plugin. Planning to publish it for free on Github.

                          I'll give you an update soon once I have something to share.. planning on doing a simple release and keep adding more stuff to it. Could even accept other contributions if more people are interested.
                          Programmer at Klang Games | Ex-CCP (EVE Valkyrie / Sparc) | @SiggiGG
                          Check out my procedural mesh examples

                          Comment


                            #14
                            Originally posted by SiggiG View Post
                            Hi all,

                            I'm back to working on my personal projects again. Rewriting this + examples on how to make procedural meshes as a plugin. Planning to publish it for free on Github.

                            I'll give you an update soon once I have something to share.. planning on doing a simple release and keep adding more stuff to it. Could even accept other contributions if more people are interested.
                            you are a saint
                            Email: tessaro.unrealdeveloper@hotmail.com
                            BP/C++ Programmer.
                            WIP Portfolio: https://filipetessaro.wixsite.com/portfolio
                            UE Marketplace: https://unrealengine.com/marketplace...ions-rts-style

                            Comment


                              #15
                              I've posted the code as a plugin for free here: https://forums.unrealengine.com/show...-Examples-free!
                              Programmer at Klang Games | Ex-CCP (EVE Valkyrie / Sparc) | @SiggiGG
                              Check out my procedural mesh examples

                              Comment

                              Working...
                              X