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: Follow us on Twitter
 
*
Welcome, Guest. Please login or register. April 19, 2024, 07:44:36 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] 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: Mandelbulb-Gnarl  (Read 2999 times)
0 Members and 1 Guest are viewing this topic.
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« on: October 30, 2015, 09:47:55 PM »

I just played with mandelbulb.frag and decide to post frag file. It is very similar to the gnarl 3d but it is not really gnarl  grin I added z.x=abs(z.y) in DE(vec3 pos). The idea is not mine, i found the same change on DA - originally it was z.x=cos(z.x). It can be changed to z=abs(z.y). Maybe somebody will be interested and will make "really" 3D gnarl.




* Mandelbulb_another.frag (8.62 KB - downloaded 346 times.)
Logged

LMarkoya
Strange Attractor
***
Posts: 282



« Reply #1 on: October 30, 2015, 11:33:21 PM »

Nice, I like it!...and nice render
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #2 on: October 30, 2015, 11:43:37 PM »

Totally different from gnarl but nice smiley
Logged

No sweat, guardian of wisdom!
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #3 on: October 31, 2015, 09:01:36 AM »

LMarkoya, thank you!

DarkBeam i know that gnarl is spiral, so it just looks similar to the gnarl. Maybe exist formula for real gnarl in fragmentarium  roll eyes
Logged

DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #4 on: October 31, 2015, 10:57:03 AM »

of course is possible as heightfield smiley
You simply calculate the formula for x and y, you extract the magnitude then for the DE add to z that mag - edventually corrected with some log() wink

Example
magold = x*x + y*y;
For (i=0; i<16; i++) {
Xn = x - 0.1 sin(y + 5 sin (2y-0.2*x)); yn = ...; // pick whatever you like with sin cos etc add more sines do it yourself wink
X= xn; Y= yn;
}
Mag = Magold - x*x - y*y;
Mag = log( 1.5+ mag); // smooth
Return z-Mag;
« Last Edit: October 31, 2015, 11:06:16 AM by DarkBeam » Logged

No sweat, guardian of wisdom!
Patryk Kizny
Global Moderator
Fractal Fertilizer
******
Posts: 372



kizny
WWW
« Reply #5 on: October 31, 2015, 01:14:43 PM »

That's cool! What raytracer did you use for it?
Logged

Visual Artist, Director & Cinematographer specialized in emerging imaging techniques.
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #6 on: October 31, 2015, 05:15:51 PM »

DarkBeam, i'm really not sure what to do with your formulas in fragmentarium  head batting I do not know glsl or other programming language  help
So i write that

float Mag(vec3 pos) {
vec3 z=pos;
int i=0;
float magold = z.x*z.x + z.y*z.y;
for (i=0; i<16; i++) {
float xn = z.x - 0.1* sin(z.y + 5*sin(2*z.y-0.2*z.x));
float yn = z.y - 0.1* sin(z.x + 5*sin(2*z.x-0.2*z.y));
z.x= xn; z.y= yn;
}
float mag = magold - z.x*z.x - z.y*z.y;
mag = log(1.5+ mag); // smooth
return z-mag;
}

How add Mag to DE?


Patryk Kizny, it was long time ago, used first mod by knighty with "3DKn-1.0.0.frag"
Logged

DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #7 on: October 31, 2015, 10:57:12 PM »

Mag should already be a DE. Try to see what comes ... wink
Logged

No sweat, guardian of wisdom!
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #8 on: November 01, 2015, 12:31:09 AM »

 sad I tried to do as you say before asking you. So i got very very smooth mandelbulb like glued balls. Something wrong.
Maybe i wrote something incorrectly. How add mag to z? DE in mandelbulb already has a return. And as i understand, return z-mag must be replaced with something.
Logged

DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #9 on: November 01, 2015, 10:07:06 AM »

Probably I did a mess try again this embarrass
You should get a plane ... but extruded

float Mag(vec3 pos) {
vec3 z=pos;
int i=0;
float Xold = z.x;
float Yold = z.y;
float xn = 0.0;
float yn = 0.0;
for (i=0; i<16; i++) {
xn = z.x - 0.1* sin(z.y + 5*sin(2*z.y-0.2*z.x));
yn = z.y - 0.1* sin(z.x + 5*sin(2*z.x-0.2*z.y));
z.x= xn; z.y= yn;
}
xn = Xold-z.x;
yn = Yold-z.y;
float mag = 1.5 + xn*xn+ yn*yn;
mag = log(mag); //smooth
return z.z-mag;
}
« Last Edit: November 01, 2015, 10:21:38 AM by DarkBeam » Logged

No sweat, guardian of wisdom!
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #10 on: November 01, 2015, 11:48:46 AM »

I am sorry, i don`t know what to do with this code...
What means
You should get a plane ... but extruded
?
Logged

DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #11 on: November 01, 2015, 05:56:36 PM »

The resulting DE (of Mag() ) should be an horizontal plane (like the water you use often)
Cannot help further... I wrote the script for you so you can use it. smiley
You can also display it in a mandelbulb surface. Do few iters then do return Mag(z)...
If it does not work ask further
Luca
Logged

No sweat, guardian of wisdom!
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #12 on: November 01, 2015, 09:03:32 PM »

Okay, i get result... if i may say... It looks terrible  vomit; feeling sick  FudgeFactor less than 0,01 for decrease noise

upd.: Okay. With pseudo-kleinian it looks much better! Thank you for gnarl in Frag!

* Mandelbulb_gnarl_1.frag (6.09 KB - downloaded 102 times.)

* 1.jpg (83.66 KB, 700x450 - viewed 261 times.)

* 2.jpg (113.41 KB, 700x450 - viewed 266 times.)
« Last Edit: November 01, 2015, 09:39:04 PM by Crist-JRoger » Logged

DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #13 on: November 01, 2015, 11:21:44 PM »

No problem. The formula is just an example not really the correct one!
 But use it as a base ... change the numbers ... the functions... everything. wink
Because you will surely find a better one I just made it by memory...
The formula itself is like that...
xn = z.x +- (small number)* sin( put some function of y here... use nested sines... add a grain of x ... etc)
Interesting variants with cos instead of sin.
Fantasy has no limits in gnarly! wink
Logged

No sweat, guardian of wisdom!
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #14 on: November 02, 2015, 08:26:26 PM »

Spend some time played with gnarl on a simple surface. To understand how it works. And i find that geometry of spirals is perfect and may be changed by different variables.
So, all that related to 3D - is bad especially when increases height, when 3d small it looks not so bad.
- need very low fudge factor(0.2-0.01). It follows that we need a lot of maxraysteps (2000-4000), or reduce detail, or both.
- shadows are noisy with crazy banding ever when dithering=1. Normal view when detail=2-2.5, so it`s too much.
Maybe you can tell how optimize code...
Interesting result when return z.z-abs(mag);

A few renders. I attached frag with some presets and my version of renderer.





* Gnarl.zip (15.71 KB - downloaded 115 times.)
Logged

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

Related Topics
Subject Started by Replies Views Last post
Tentacles - Gnarl power bulb Mandelbulb3D Gallery Tahyon 0 838 Last post December 13, 2011, 12:57:43 PM
by Tahyon
Gnarl Rose Images Showcase (Rate My Fractal) Alef 0 576 Last post June 12, 2012, 07:10:08 PM
by Alef
Gnarl Mechanincs Ultrafractal Jimmie 0 919 Last post August 07, 2013, 09:59:48 PM
by Jimmie
Coronal Flare - HD animated "gnarl" Chaotica lycium 1 1060 Last post December 17, 2013, 07:25:46 AM
by cKleinhuis
Gnarl fireball Movies Showcase (Rate My Movie) cyseal 0 533 Last post October 14, 2015, 08:17:23 PM
by cyseal

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.163 seconds with 27 queries. (Pretty URLs adds 0.013s, 2q)