Fractals/Computer graphic techniques/3D

Rendering

edit
  • API ( C++, JS ...)
  • Backends (Renderer Back-End Architecture):
    • OpenGL 4.1+ for Linux, macOS and Windows
    • OpenGL ES 3.0+ for Android and iOS
    • Metal for macOS and iOS
    • Vulkan 1.0 for Android, Linux, macOS, and Windows
    • WebGL 2.0 for all platforms

Rendering

  • image-order rendering ( CPU-based ray tracing )
  • object-order rendering ( GPU-based rendering. Faster since we can apply the same instructions, but on different vertices in parallel.)


 "A single frame in Toy story 4 could take anywhere between 60 to 160 hours to render using CPU based ray tracing."Brendan Galea The Math behind (most) 3D games - Perspective Projection by  Brendan Galea

Elements

edit
  • mesh
  • texture ( map )
  • geometric transform
  • pipline


3D graphics have more in common with vector graphics than with raster graphics. The content of an image is specified as a list of geometric objects. The technique is referred to as geometric modeling.

Rendering the scene = creating 2D image of 3D object/world[1]

Light and shadow

edit

3d still images

edit

The task of a 3D graphics program is to turn the specification of a 3D environment to 2D pictures. [2]

There are two ways to generate such pictures:

  • real-time rendering (interactive graphics applications such as video games or simulations)
  • non-real-time rendering ( non-interactive graphics applications such as film).


Programming languages for host programs ( CPU) using API

  • C
  • C++

Special APIs

  • OpenGL
  • WebGl
  • Direct3D
  • Vulkan
  • OpenCl
  • CUDA

programming languages for shader programs ( GPU)

  • GLSL ( OpenGl)
  • HLSL ( DirectX)
  • Cg (NVIDIA's shading language)

Pipeline or workflow

edit
 
3D Rendering

The 3D pipeline contains:

  • a hardware pipeline ( main memory, CPU, a PCI Express bus, GPU, and GPU memory)
  • a software pipeline


software pipelines:

  • Host program on CPU ( The 3D programs that run on the CPU )
  • Shader programs on GPU ( The bulk of the 3D data processing )

The job of the host program includes :

  • Initialization
  • Set up or reconfigure the 3D software pipeline
  • Build shader programs
  • Transfer shader programs to GPU
  • Data management
  • Load 3D data
  • Process the 3D data
  • Update 3D data
  • Transfer the 3D data to GPU
  • Send commands to GPU
  • Process user inputs and update the 3D data

Shader programs:

  • vertex shaders
  • fragment shaders
  • geometry shaders


Each APi has it's own pipeline

mesh

edit
  • MeshLab - the open source system for processing and editing 3D triangular meshes.

It provides a set of tools for editing, cleaning, healing, inspecting, rendering, texturing and converting meshes. It offers features for processing raw data produced by 3D digitization tools/devices and for preparing models for 3D printing.

Converting 2D images to 3D

edit
  • 2D fractals mapped onto a Riemann sphere


For height of each pixel one can use :

  • distance to boundary : "I'm using the distance estimate method (DEM) as the basis of my height values. (inverted, the log, scaled and streched, etc.)" Duncan C [3]
  • fractional iteration values [4]

3D to 2D

edit
  • project the points in 3D space into cylindrical surface that can be unwrapped, to a flat surface[5]

video or animation made from 2D images

edit

What is the difference between video and animation ?

Software used to do the conversion :

parameter plane

edit

One can make videos using :

  • going along some paths on parameter plane ( for example internal and external rays )
  • Poincaré half-plane metric for zoom animation[7]
  • zoom into parameter plane[8][9][10] using automatic determination of Iteration Max number[11]
  • changing coloring scheme ( for example color cycling - Fractint)
  • changing some parameters of algorithm, for example :
    • maximal iteration of escape time algorithm
    • bailout value [12]

path

edit
  • straight line from c=-0.75+i to c=-0.75-i. It is mostly in the exterior of Mandelbrot set ( then Julia set is disconnected with no interior). There is only one point c=-0.75 where c belongs to the boundary of Mandelbrot set ( root point between period 1 and 2 hyperbolic components). In that point Julia set has interior ( parabolic ).[13]
  • from c=-2 to c=1.65 ( real slice of Mandelbrot set ) [14]
  • around a circle centred at -1 and with a radius of 0.25
  • around main cardioid [15]
  • parameter traces a circle centred at -0.29848658+0.65843271i and with a radius of 0.004. On the parameter plane, this does a circle around a point of the Mandelbrot fractal that is radiating 11 strands in a very loose spiral.[16]
  • races a circle centred at -1.57621921451761 and with a radius of 3.6 x 10^-10. On the parameter plane, this does a circle around a minibrot at that location without passing through the minibrot itself.[17]

References

edit