Logo by stardust4ever - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Support us via Flattr FLATTR Link
 
*
Welcome, Guest. Please login or register. November 26, 2025, 01:36:49 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Yet another new person  (Read 1370 times)
0 Members and 1 Guest are viewing this topic.
Derakon
Guest
« on: November 24, 2009, 11:03:14 PM »

Hello! I'm here from Daniel White's article on mandelbulbs, which seems to be getting a lot of traffic lately. I've always appreciated fractals aesthetically, but the furthest I've gone with making them myself was making a simple colorized 2D Mandelbrot. However, these 3D fractals are something else again, and they're enough to inspire me to come here and take a look around. My own focus is in general software development; I'm good at a lot of things but not great at anything, basically. So I'm pretty sure I understand broadly how fractals work, but I could be wrong. smiley

I've seen the massive thread on 3D fractals but haven't gotten around to reading it yet. Am I correct in my understanding that these fractals are generated by doing an inclusion/exclusion test for each 3D point in a given area, and generating a voxel if the point is in the volume? And then you get more detail by decreasing the distance between 3D points and/or increasing the number of iterations for each point.

My idea was to try to write a script for Blender (a 3D modeling program I use) to generate models of the fractals. This would make flybys trivial, and Blender has plenty of support for near material effects, though dynamically increasing zoom levels would be difficult. If you make a cube for each voxel, and then combine the cubes and remove interior faces, you can apply smoothing to create "landscapes" which should theoretically be amenable to inclusion in other 3D projects.

My second, impractical-due-to-cost idea was to make a 3D model of a fractal, and then find a 3D printing service to make a model that I could put on my desk. Painting it might be a bit tricky, though. smiley

My third, impractical-due-to-time idea was to make a roguelike game set on a fractal, where the game gets more difficult as you increase your zoom level. That of course runs into problems like "how should equipment and enemies be fractal" but it's a neat concept to think of.
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #1 on: November 24, 2009, 11:59:15 PM »

welcome to the forum

basically you got the idea right ... create voxels for inside and do not create voxels for outside ... the main problem is to get it "really" smooth, and doing it by a scripting language could take ages for a simple model .. when you are using a distance estimator it is most likely to get a smoothed surface ... but still there is a lot of work for determining the right normals for the faces ...

enjoy your stay and inspire us !
 angel afro
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Derakon
Guest
« Reply #2 on: November 25, 2009, 12:30:09 AM »

Yeah, I know scripting languages can be slow. Awhile back I wrote a dumb Perl script to generate 2D Mandelbrot images; at 800x800 with 10 iterations per pixel it took 17 seconds on my computer.

Fortunately, there's a trick you can use with Python (which is the scripting language that Blender uses) to compile it to much faster code without losing the beauty of scripting languages. It's called Cython; basically it's just Python with predeclared types. I have a game project I'm working on that was running slowly during map generation; when I switched the vector class over to Cython I got a 35% speedup of the entire program -- I don't know how much faster the vector class itself got because it stopped showing up in my profiling reports. smiley

For the 3D voxels -- do you try to create a 3D shell, or do you "fill" the interior with voxels? If the former, how do you detect if a given voxel is on the border? By examining the adjacencies? If the latter, how did Daniel White make his "inside the fractal" shots?

EDIT: did a bit more research, I'm guessing you create a 3D shell using something like the marching cubes algorithm. Fine by me; I've used marching squares in the past for 2D...
« Last Edit: November 25, 2009, 12:40:50 AM by Derakon » Logged
Derakon
Guest
« Reply #3 on: November 26, 2009, 06:38:13 PM »

Whelp, I've written a Python script to make meshes of 3D fractals...and it's a bit limited. The big problem is that I have to calculate every single voxel in the volume I want to draw, even if it's going to be hidden from view from the camera's perspective. This puts a big limit on voxel size; I can't push it down small enough to get acceptable smoothness without generation taking ages (and making a mesh that Blender can't handle very well). The actual render time is great, mind you, but the images I'm getting aren't:




The banding I'm getting is, I suspect, due to a bug causing the program to generate redundant faces, which confuses Blender's rendering.

This mesh took over 4 hours to generate, and about 45 seconds to render. And it doesn't look all that great. I calculated 27,000,000 voxels in the range ([0, 1], [0, 1], [0, 1]) for the eighth-order Mandelbulb (at least, it should be the eighth-order Mandelbulb; I grant there's not much resemblance...).

I guess the next step is to switch to a direct raytracing approach. Any suggestions for good resources for learning to make your own raytracer? I know there are existing programs for this kind of thing, but that's not really what I'm after here.
Logged
twinbee
Fractal Fertilizer
*****
Posts: 383



WWW
« Reply #4 on: December 04, 2009, 04:53:35 PM »

Quote
For the 3D voxels -- do you try to create a 3D shell, or do you "fill" the interior with voxels? If the former, how do you detect if a given voxel is on the border? By examining the adjacencies? If the latter, how did Daniel White make his "inside the fractal" shots?

For my approach, I use the 'shell' approach, yes. To create the inside, I simply reverse the definition of 'inside', so that the inside is the outside and vice versa.
Logged
kram1032
Fractal Senior
******
Posts: 1863


« Reply #5 on: December 04, 2009, 08:41:11 PM »

twinbee:
could you by that also define the "inside" to only be the hull and the "outside" to be the inside and the outside? - just a strange thought^^

Derakon: I wonder why you don't just use Blender's new voxels?
This I guess is the IDEAL excuse to learn them smiley
And it's most likely way faster than using cubes or a single mesh hull...

If you use cubes, I hope, you also use instances?

And while they add more faces to it, maybe spheres would be a better variant?
Or could it work to use planes which point into the direction of the Set at that point?
Logged
twinbee
Fractal Fertilizer
*****
Posts: 383



WWW
« Reply #6 on: December 11, 2009, 09:38:43 PM »

Quote
could you by that also define the "inside" to only be the hull and the "outside" to be the inside and the outside?
In theory, I suppose one could yes. You would need to find the surface normal. The inside would then be defined as the volume within a certain distance from the surface point, and at the normal's angle.
Logged
xenodreambuie
Conqueror
*******
Posts: 124



WWW
« Reply #7 on: December 12, 2009, 01:06:52 AM »

Quote from: Derakon
Whelp, I've written a Python script to make meshes of 3D fractals...and it's a bit limited. The big problem is that I have to calculate every single voxel in the volume I want to draw, even if it's going to be hidden from view from the camera's perspective. This puts a big limit on voxel size; I can't push it down small enough to get acceptable smoothness without generation taking ages (and making a mesh that Blender can't handle very well). The actual render time is great, mind you, but the images I'm getting aren't:

The banding I'm getting is, I suspect, due to a bug causing the program to generate redundant faces, which confuses Blender's rendering.


When you use binary voxels to create a mesh, it results in exactly that kind of banded quantization. The only practical way to improve it is to use a filter on the mesh (or possibly a mesh generation method that has built in relaxation). An ordinary smoothing filter won't do, as it erases detail and shrinks the mesh. Google mesh denoising. Many of the early methods only work well if you have greyscale data, and are crap for binary. Bilateral filtering works well enough, and also two step filters.
Logged

Regards, Garth
http://xenodream.com
Nahee_Enterprises
World Renowned
Fractal Senior
******
Posts: 2250


use email to contact


nahee_enterprises Nahee.Enterprises NaheeEnterprise
WWW
« Reply #8 on: January 06, 2010, 04:20:45 PM »

    Hello!  I'm here from Daniel White's article on mandelbulbs.....
    I've always appreciated fractals aesthetically, but the furthest I've gone with making them myself was making a simple colorized 2D Mandelbrot.

    Whelp, I've written a Python script to make meshes of 3D fractals.....
    and it's a bit limited.  The big problem is that I have to calculate every single voxel in the volume I want to draw.....

Greetings, and a belated Welcome to this particular Forum !!!     cheesy

That is an interesting experiment using Python script to make your 3-D fractals.
 
« Last Edit: September 17, 2013, 06:13:37 AM by Nahee_Enterprises » Logged

Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
New person, help+idea General Discussion DakarV 2 484 Last post November 08, 2016, 11:57:55 PM
by DakarV

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.493 seconds with 24 queries. (Pretty URLs adds 0.01s, 2q)