Logo by KRAFTWERK - Contribute your own Logo!
News: Visit UltraFractalWiki for hints & tutorials on UltraFractal5
 
*
Welcome, Guest. Please login or register. March 27, 2015, 04:39:22 PM


Login with username, password and session length



Pages: 1 [2]   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: True 3D Julia  (Read 19191 times)
0 Members and 1 Guest are viewing this topic.
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 6055


formerly known as 'Trifox'


WWW
« Reply #15 on: October 24, 2009, 04:53:34 AM »

as i said in the gallery, the first of the last 2 really looks like a coral water plant ... actually REALLY IN the water!  Elvis Presley
Logged

---

divide and conquer - iterate and rule - chaos is No random!
JColyer
Guest
« Reply #16 on: December 04, 2009, 02:36:56 PM »

@buddhi - i've been working on a similar rendering technique to yours for about the past week or so, biggest difference is that I'm storing my pre-render data in a DB instead of JPEG files.  I've gotten quite far in the ray-tracing process but i'm having a devil of a time trying to figure out how to come up with the normals?  any suggestions or guidance you can offer?

thanks!

JC
Logged
Buddhi
Fractal Molossus
**
Posts: 678



WWW
« Reply #17 on: December 04, 2009, 05:44:55 PM »

@JColyer - bellow is some fragment of code from my program where is procedure for calculation normal vector. This algorithm calculates average gradient for some small area near calculated point.
Code:
for(int k=-smooth; k<=smooth; k++)
{
for(int j=-smooth; j<=smooth; j++)
{
for(int i=-smooth; i<=smooth; i++)
{
double delta2X = Interpol3D(x+0.5+i,y+0.5+j,z+0.5+k,fractal3D)
            -Interpol3D(x-0.5+i,y-0.5+j,z-0.5+k,fractal3D);
double delta2Y = Interpol3D(x+0.5+i,y+0.5+j,z+0.5+k,fractal3D)
            -Interpol3D(x-0.5+i,y-0.5+j,z-0.5+k,fractal3D);
double delta2Z = Interpol3D(x+0.5+i,y+0.5+j,z+0.5+k,fractal3D)
            -Interpol3D(x-0.5+i,y-0.5+j,z-0.5+k,fractal3D);
deltaX+=delta2X;
deltaY+=delta2Y;
deltaZ+=delta2Z;
        }
        }
}
                   
//length of vector (normalization factor)
double modul = sqrt(deltaX*deltaX + deltaY*deltaY + deltaZ*deltaZ);
           
if(modul>0.001)
{
      //normalization of normal vector
        normalX = deltaX/modul;
        normalY = deltaY/modul;
        normalZ = deltaZ/modul;
}

Interpol3D function calculates linear interpolation between adjacent points of 3D array which consist fractal slices. It is for more smooth results.

I know that it is not optimal algorithm but this is only one I know. Maybe it helps you.

I resigned from pre-calculating slices into array, because it is not effective (program have to calculate points also inside Mandelbulb) and needs lots of memory. Maximum array size which I achieved was 1500x1500x1500 (3,2GiB of RAM). Unfortunately it is not enough for any perspective views. Now I'm calculating fractal iterations directly in 3D view and it is about 10 times faster than with calculated fractal slices. It is faster because program have to calculate only visible points.
Logged

JColyer
Guest
« Reply #18 on: December 05, 2009, 01:01:08 AM »

@buddhi - ah thank you, i had read about using a linear gradient function but hand't quite been able to get my brain wrapped around it.  as of last night I built a very crude fractal ray tracer and it works ok, but needs a load of work.  I'm working with dataset driven rendering as I'm rendering the interior structures of julia sets and the method I use requires post-generation data mapping to get full quality and detail from the data.  I'll get some pics posted asap!

thanks for pointing me in the right direction!

JC
Logged
Pages: 1 [2]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
My First Mandelbrot...Okay not true. Images Showcase (Rate My Fractal) Zephitmaal 3 1364 Last post January 07, 2012, 04:30:36 PM
by Pauldelbrot
Another true 3D fail ? Theory David Makin 6 788 Last post January 08, 2013, 12:36:46 PM
by jehovajah
true 3D Julia set Fractal Images Showcase (Rate My Fractal) hgjf2 9 500 Last post December 28, 2012, 12:19:44 PM
by hgjf2
True 3D Mandelbrot ? The 3D Mandelbulb « 1 2 ... 7 8 » David Makin 112 3776 Last post February 16, 2015, 07:35:11 PM
by KRAFTWERK
The One True Path Mandelbulb3D Gallery Sockratease 0 148 Last post July 19, 2014, 02:49:15 PM
by Sockratease

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines

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