Page 1 of 2 12 LastLast
Results 1 to 20 of 23
  1. #1
    Member
    Join Date
    Nov 2013
    Location
    Local Coordinates 0,0,0
    Posts
    259

    Visualize Fractals in Blender

    Hi,

    wanna show you an attempt to create a Mandelbrotset in 3d in blender game engine(Low Res).

    Putting it in this section in the hope to discuss how it can be improved,
    so that we maybe one day could use it to visualize fractals in Blender.

    I used the OSL script from tree3d to render slice planes from the MandelBox Volumetric Shader.
    Then I composed them to an image and put it in the "Volume Ray Casting" script by martinsh.

    I think this is the first Fractal (3d) in Blender (Game Engine).


    Pic
    Click image for larger version. 

Name:	Mandelset1.jpg 
Views:	315 
Size:	149.6 KB 
ID:	419599


    Vid

    https://youtu.be/Kdc97BsGidg


    Blend File

    Mandelbrotmenge3Dpacked.blend

    credits go to:

    MandelBox Volumetric Shader by tree3d

    Volume Ray Casting in BGE by martinsh

    Enjoy



  2. #2
    Member SterlingRoth's Avatar
    Join Date
    Mar 2006
    Location
    Portland, OR
    Posts
    2,000
    Pretty cool, thanks for sharing



  3. #3
    Member
    Join Date
    Sep 2012
    Posts
    2,834
    it's just a fraction of a fractal... Nice work nevertheless!



  4. #4
    Member
    Join Date
    Nov 2013
    Location
    Local Coordinates 0,0,0
    Posts
    259
    Originally Posted by SterlingRoth View Post
    Pretty cool, thanks for sharing
    You are welcome.

    Originally Posted by burnin View Post
    it's just a fraction of a fractal... Nice work nevertheless!
    Thanks, you are absolutely right, in a limited space it is always only a piece of the fractal, of course.



  5. #5
    Member
    Join Date
    Nov 2013
    Location
    Local Coordinates 0,0,0
    Posts
    259
    You can change the number of slices in line 56 of the "vol_raycast" script to get different patterns.
    Here are some examples: 12,24,120,192,220 slices:

    Click image for larger version. 

Name:	12_24Slices.jpg 
Views:	122 
Size:	240.7 KB 
ID:	419713
    Click image for larger version. 

Name:	Slices.jpg 
Views:	106 
Size:	199.3 KB 
ID:	419712



  6. #6
    This is really cool, where do you learn how to make fractals? Like the maths behind it and what not? Any good recommendations?



  7. #7
    Member
    Join Date
    Sep 2012
    Posts
    2,834
    Thanks, you are absolutely right, in a limited space it is always only a piece of the fractal, of course.
    In laymen terms:
    For fractals there's no limited space as they are kinda like 'inner-dimensional' (Fractal dimension). Is what a name 'Fractal' implies.

    This is really cool, where do you learn how to make fractals? Like the maths behind it and what not? Any good recommendations?
    Wiki is a good start.



  8. #8
    Member
    Join Date
    Nov 2013
    Location
    Local Coordinates 0,0,0
    Posts
    259
    Originally Posted by RealityFox View Post
    This is really cool, where do you learn how to make fractals? Like the maths behind it and what not? Any good recommendations?
    Look at the OSL script from the MandelBox Volumetric Shader linked in post #1, this is not too complex, I guess.
    Other than that, this could be a good start:
    Mandelbulb
    I have not coded anything myself, I am more of a visual guy and I have more questions than answers.

    For example, how is the Volume Ray Casting script calculating the 3d object out of the image(s)???
    There are 96 pictures a 400px x 400px.

    My goal is to get a better/finer quality, so I tried different formats, for example: TGA, PNG, but I dont really get better results in the final output.

    Double the size of the image 8192 x 8192, 96 pictures a 800px x 800px, still didnt get better.
    Any help would be appreciated.
    Last edited by DERBENDER; 21-Jan-16 at 05:26.



  9. #9
    Thanks for that link! Sorry can't help you with

    Wiki is a good start.
    Not the best though. Already tried that. Khan academy is pretty good but I haven't had the time recently to complete it.



  10. #10
    Member
    Join Date
    Nov 2013
    Location
    Local Coordinates 0,0,0
    Posts
    259
    Wanna make some clouds, change the opacity factor in the "Volume Ray Casting" script in line 53 to 0.5-10.


    Click image for larger version. 

Name:	cloud.jpg 
Views:	79 
Size:	170.3 KB 
ID:	421692

    Click image for larger version. 

Name:	Wolken.jpg 
Views:	62 
Size:	157.0 KB 
ID:	421693


    Playing araund with the OSL script:

    Click image for larger version. 

Name:	mandelbrotOSL.jpg 
Views:	85 
Size:	443.7 KB 
ID:	421696



  11. #11
    Member
    Join Date
    Nov 2013
    Location
    Local Coordinates 0,0,0
    Posts
    259
    Here is a colored version using the "Thermal Vision" Script of Smoking_mirror.
    It is a custom filter with an always sensor attached to the camera.
    IF you wanna change the color, change the values in the line 13-16.


    Click image for larger version. 

Name:	coloured.jpg 
Views:	74 
Size:	447.3 KB 
ID:	421698

    Flying into some fractals in the mandelbulb program, it looks so cool:

    Click image for larger version. 

Name:	Mandelbulbred.jpg 
Views:	86 
Size:	348.1 KB 
ID:	421699

    Click image for larger version. 

Name:	Mandelbulbblue.jpg 
Views:	94 
Size:	1.12 MB 
ID:	421700



  12. #12
    Member
    Join Date
    Sep 2012
    Posts
    2,834
    Nice experiments, still
    Just stumbled upon another interesting article: Path Tracing 3D Fractals



  13. #13
    Member
    Join Date
    Nov 2013
    Location
    Local Coordinates 0,0,0
    Posts
    259
    Thanks, for sure an interesting read, but way over my head.
    As mentioned in another thread by KWD it could be possible to visualise fractals in blender with the right programming skills, if I understand correctly.

    Originally Posted by KWD View Post
    There is no real difference between Cycles and Fragmentarium as far as path tracing is concerned (let's not go into too much details here), except that Fragmentarium is GPU only (actually GLSL), which should explain the speed difference with OSL.

    The approach that Fragmentarium is using to render the fractals is based on distance fields, which tells for each shading point how far the surface is. This is similar to level sets, so when that is supported in Cycles (through OpenVDB e.g.), it will be able to render such fractals, in theory. In practice you would need a way to generate the distance field from Blender.



  14. #14
    Member
    Join Date
    Nov 2013
    Location
    Local Coordinates 0,0,0
    Posts
    259
    I find a way to get a piece of a fractal in the Viewport ( GLSL ).
    Instead of using the "Volume Ray Casting" script, I now use FIJI, an image processing package,
    which can stack image sequences together and export it as an .obj format.
    Neat little program, check it out.
    http://fiji.sc/Fiji
    here is a tutorial, at 11:30 he is explaining how it works.
    To increase quality you need lossless formats like Tiff or PNG, but the files could get really big in the end.
    Experiment with the settings to get a balanced result between quality and size.

    You can reduce the mesh with Instant Meshes or MeshLab.
    It is even available as an addon for blender:

    The first image is imported from it, still crappy, heh, jpg format and low quality settings for testing.
    Using the Remesh modifier, increasing the Octree Depth to 8,it gets looking better.
    Switching the mode blocks,smooth and sharp, you will get something out of it.
    On the second and third images you see the file with the RemeshModifier applied, a little
    bit of Ambient Occlusion for the contours and I have enabled the Open GL Lights Addon to directly light the scene in the viewport.
    The other images are colored with a matcap.

    Click image for larger version. 

Name:	Mandelset.jpg 
Views:	87 
Size:	379.2 KB 
ID:	421894

    Click image for larger version. 

Name:	Mandelset2.jpg 
Views:	87 
Size:	357.4 KB 
ID:	421893

    If you have got any questions, don`t hesitate to ask.
    If someone post their results I would be happy to see it.

    Happy Blending to all!
    Last edited by DERBENDER; 29-Jun-16 at 08:55.



  15. #15
    Member
    Join Date
    Jul 2014
    Location
    Copenhagen
    Posts
    727
    Hi

    This looking real good....And render in viewport is no render time...Pretty cool.

    The video is amazing Good work.

    Tai



  16. #16
    Nice Job! Looks pretty cool!



  17. #17
    I am also interested in this. http://blenderartists.org/forum/show...t=#post3002131

    What does it take to make serious project to rewrite Fragmentarium In Blender ?
    Where to start? KWD mentioned distance field. I assume this should be first attempt. To program it in python.



  18. #18
    Actually raytracing requires a different aproach than this, you have to estimate the distance where a given ray will be blocked by geometry, but space is virtually infinite so you have to point to a place and say, ok, my thing will happen about here around this place, so you begin to orbit your fractal at that point!



  19. #19
    Amazing work. Thanks for pushing the boundaries in Blender.



  20. #20
    Member
    Join Date
    Sep 2012
    Posts
    2,834
    An inspiration, food for thoughts... Fractal Lab (WebGL fractal explorer)



Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •