ENG New site

Advanced search

[ New messages · Forum rules · Members ]
  • Page 1 of 1
  • 1
Mandelbrot Rivers by Psauce
PsauceDate: Sunday, 11.05.2014, 06:27 | Message # 1
Space Tourist
Group: Users
United States
Messages: 25
Status: Offline
I have seen this experimented with before. Here's my own version.
I added code to tg_height shaders that generates a Mandelbrot set and indents it into the terrain to create rivers. I didn't really edit code or parameters in the shader as much as just added a section to it, so this new terrain is fairly distinguishable on the SE landscape.
Currently there is minor/no performance impact, and I think it looks pretty nice.
There are issues that may be visible in some of the pictures (contour lines for example) but they are likely addressable.

Shader has been uploaded so you can try it out yourself!













Space Engine smile

It might not look totally realistic yet but this is kind of a first implementation and I think could be improved quite a bit.

Here is what it looks like so far:

Code


/// Mendelbrot offset ///

vec2  position;    
vec2  complex;
float    tr;
float  ti;

float scale = 17.0; //Adjust this parameter to change the deepness the fractal

float  quality = 45.0;       
float    fdist = 0.0;
float    pass = 0.0;

    position.x = point.x;
    position.y = point.y;
    complex.x = position.x;
    complex.y = position.y;
       
    while (pass<=quality && fdist<2.0)

    {
    tr = complex.x*complex.x - complex.y*complex.y + position.x;
    ti = 2*complex.x*complex.y + position.y;
       
    complex.x = tr;
    complex.y = ti;

    fdist = sqrt((position.x-complex.x)*(position.x-complex.x)+(position.y-complex.y)*(position.y-complex.y));
       
    pass += 1;
     }
       
    height.x = height.x-sqrt(scale*pass) / 100.0 + 0.006*scale;

/// It has been done! ///



The main advantage of this method I have noticed so far is that seems to be very cheap computationally.
Improvements likely to come in the future.

Let me know what you guys think!

Attachments: 1809397.jpg (116.5 Kb) · 1396374.jpg (295.6 Kb) · 0481338.jpg (122.9 Kb) · 8614923.jpg (175.6 Kb) · 1886500.jpg (476.2 Kb) · 6991878.jpg (86.0 Kb) · tg_terra_height.glsl (9.2 Kb)


Edited by Psauce - Tuesday, 13.05.2014, 00:25
 
ZackGDate: Sunday, 11.05.2014, 10:04 | Message # 2
Space Pilot
Group: Users
United States
Messages: 113
Status: Offline
its definitely a Mandelbrot type of fractal which is an unusual way to create rivers. pretty creative if I do say so. could you make it more course so it doesnt look weird and that it looks like a delta ?




MOBO:ASUS Sabertooth Mark I
CPU:Intel I7 4790 3.6Ghz
GPU:NVIDIA GTX960 4GB
Memory:32GB 1600Mhz (Corsair 4x8GB)
 
VoekoevakaDate: Sunday, 11.05.2014, 13:06 | Message # 3
World Builder
Group: SE team
France
Messages: 1016
Status: Offline
I will try this, I want to explore a mandelbrot planet.




Want some music of mine ? Please go here !

 
PsauceDate: Sunday, 11.05.2014, 18:26 | Message # 4
Space Tourist
Group: Users
United States
Messages: 25
Status: Offline
Quote ZackG ()
could you make it more course so it doesnt look weird and that it looks like a delta ?


I believe so. Currently the entire fractal is placed onto the planet but if it was limited to using only certain sections it would look more realistic. I will try working on this.

Something really bizarre and taken to the extreme (this one uses new colors also) :



Quote Voekoevaka ()
I will try this


Okay I will upload the code in a bit. May do some tweaking first.

Attachments: 1607751.jpg (170.1 Kb)
 
BetelgeuzeDate: Sunday, 18.05.2014, 08:49 | Message # 5
Space Pilot
Group: Banned
Belgium
Messages: 118
Status: Offline
Nice rivers smile

only terra or other planets have rivers?
 
PsauceDate: Saturday, 24.05.2014, 00:06 | Message # 6
Space Tourist
Group: Users
United States
Messages: 25
Status: Offline
Quote Betelgeuze ()
Nice rivers


Thanks

Quote Betelgeuze ()
only terra or other planets have rivers?


Just terras but it would be very easy to apply to other planets. Not many would have liquids forming rivers besides terras though
 
SlamminKhanDate: Tuesday, 20.10.2015, 15:48 | Message # 7
Observer
Group: Users
United States
Messages: 12
Status: Offline
Doesn't look too nice when surrounded by bumpy terrain. Could it be generated on flatter areas only?
 
parameciumkidDate: Tuesday, 20.10.2015, 20:50 | Message # 8
Explorer
Group: Users
United States
Messages: 277
Status: Offline
Dude guys... looking at that made me suddenly imagine something silly:
What if the "heart" on Pluto is actually a giant orange Mandelbrot graph placed by an ancient alien civilization as a sign they were there? But due to erosion it's just a vague heart shape now xD





Intel HD Graphics 4000 ;P
 
AlekDate: Tuesday, 20.10.2015, 21:54 | Message # 9
Pioneer
Group: Users
United States
Messages: 326
Status: Offline
Quote parameciumkid ()
due to erosion


For erosion to have masked it like it is now they would have had to put it there like 5 minutes after pluto became non-molten so?





Living among the stars, I find my way. I grow in strength through knowledge of the space I occupy, until I become the ruler of my own interstellar empire of sorts. Though The world was made for the day, I was made for the night, and thus, the universe itself is within my destiny.
 
PlutonianEmpireDate: Saturday, 14.05.2016, 18:12 | Message # 10
Pioneer
Group: Users
United States
Messages: 475
Status: Offline
I wonder how this would look when merged or mixed with Rodrigo's Mod, since his also tweaks the rivers for better realism?




Specs: Dell Inspiron 5547 (Laptop); 8 gigabytes of RAM; Processor: Intel® Core™ i5-4210U CPU @ 1.70GHz (4 CPUs), ~2.4GHz; Operating System: Windows 7 Home Premium 64-bit; Graphics: Intel® HD Graphics 4400 (That's all there is :( )
 
  • Page 1 of 1
  • 1
Search: