Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The 3-d mandelbrot set is very blurry #2

Closed
Cliche1998 opened this issue Jan 30, 2020 · 7 comments
Closed

The 3-d mandelbrot set is very blurry #2

Cliche1998 opened this issue Jan 30, 2020 · 7 comments

Comments

@Cliche1998
Copy link

Hey,
The rendered graph is really blurry and I'm getting a length mismatch message for distance, azimut and elevation

mandelbrot issue

@TilBlechschmidt
Copy link

TilBlechschmidt commented Jan 30, 2020

AFAIK the blurryness comes from the fact that by default the scene is rendered with 100x100x100 instead of 1000x1000x1000 voxels since live rendering is hugely resource intensive and not really possible at anything above a few frames per second even on high end machines. The blending of the voxels and probably AA too makes it look blurry because it is such a "low" spatial resolution.

You can change that at the end of the logistic_mandelbrot.py but prepare some Marshmallows ;)

@Cliche1998
Copy link
Author

What would be the recommended hardware requirements to get something as close as what's shown in the veritasium video or the sample gif

@TilBlechschmidt
Copy link

I’m not sure if there even is a hardware configuration that could handle this in real time since the code isn’t multi-threaded AFAIK. The video and sample GIF have been rendered over probably multiple hours.

@Cliche1998
Copy link
Author

Cliche1998 commented Jan 30, 2020

I tweaked the parameters as you said, I put D = 700, I = 1000 and 0max = 16
I used real time frames and this is the best I got
The 3d view was still blurry
image

I'll try and render it and create a .mov with it

Thank you

@ghost
Copy link

ghost commented Jan 30, 2020

No such file or directory: './data/fractal_mandelbrot_data1000_iter1500_ovs16.npz'

This shows up when i change the data and try to run.

@jonnyhyman
Copy link
Owner

jonnyhyman commented Jan 30, 2020

@TilBlechschmidt you hit it on the nose, thanks for your responses!
@Cliche1998, running at D=1000, I=1500, Omax=16 will reproduce the views seen in the gif and in the video.

D represents the dimensions of each voxel
I represents the number of mandelbrot iterations
Omax represents the number of oversampling iterations. If you want a draft rendering I would suggest setting this to 1. Omax increases the render time exponentially. (scales ~ O^2.7)

Speaking of speed, the final rendering was made in about 4 hrs with this system:

  • 16core Xeon CPU,
  • 128GB RAM; but only about 8GB was used for the rendering IIRC
  • Nvidia Quadro K5000 GPU

The code utilizes vispy which uses the GPU and OpenGL to do the volume rendering, so technically it is multithreaded, just on the GPU not the CPU!

The data generation task can also be parallel processed by turning on parallel=True in the simulate function's @numba.njit decorator.

@Shubh-Raj this is because you need to turn on data generation. Look for the parameter generate=0 and change it to generate=1

@jonnyhyman
Copy link
Owner

The solution to making the 3D mandelbrot set less blurry is to increase the number of voxels; ie. set D = 1000 or higher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants