![]() |
| [[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]] |
|
|
#1 |
|
Senior Member
Join Date: Aug 2004
Location: Thornhill, ON
Posts: 993
|
Just thought I'd bring up the interesting subject of fractals and procedurally generated content. Over the past two weeks I've been doing some work on various fractals and iterated function systems. I didn't know what to expect at first, but having gotten my feet wet I'm surprised at how simple these systems are. In some ways, I've always been interested in fractals since I heard about fractal landscapes and procedural generation of textures (see Terragen). I suppose too that since I've played Spore my interest in the subject has been vastly rejuvenated. Proof that there is a strong future for those systems. And with the ever-expanding multi-core computers, it's a blast just watching how fast these things can be produced now.
So far I've dabbled around with mandelbrot, fractal flames, and the use of perlin noise and plasma clouds. The most difficult challenge actually is colouring the output. So many ways, but finding the nicest requires a bit of trial and error. This leads to my next goal, which is to improve on my colouring scheme. To make better use of noise and colours for textures. As a test, I'm aiming to produce something like Tarragen. See how far I can get with high quality textures and bring my GPU down to its knees ![]() A couple shots of my system so far.
![]() As a fun side project, I've been rendering a couple 1080p mandelbrot videos too. Aside from being nauseous, it's quite a trip. Anyone else have experiences to share?
___________________________________________
http://www.nutty.ca - Being a nut has its advantages. |
|
|
|
|
#2 |
|
Senior Member
Join Date: Sep 2005
Location: Jönköping, Sweden
Posts: 646
|
Not really my own experience, but you can't talk about procedurally generated terrain without mentioning Infinity:
http://www.infinity-universe.com/Inf...mid=90&catid=4
___________________________________________
Topmost webbyrå i Jönköping - webbutveckling & design |
|
|
|
|
#3 |
|
Senior Member
Join Date: Aug 2004
Location: Thornhill, ON
Posts: 993
|
Whoa, impressive. I'm totally inspired. Just the fact that you see a Saturn like planet from the ground, knowing full well that if you left the planet's orbit you could fly over to that planet. Jesus, and one man too. This guy is an animal. The graphics are just tack sharp.
Alright, no sleep for the next week ![]()
___________________________________________
http://www.nutty.ca - Being a nut has its advantages. |
|
|
|
|
#4 |
|
Senior Member
Join Date: Sep 2005
Location: .nl
Posts: 573
|
And it is real-time (where terragen isn't). You might want to take a look on his journal too.
Regarding "classic" fractals: the buddhabrot is one of my favourites: http://www.steckles.com/buddha/ or here: http://www.superliminal.com/fractals/bbrot/bbrot.htm . And the 4d Julia's are cool too ![]() |
|
|
|
|
#5 | |
|
Senior Member
Join Date: Sep 2005
Location: Jönköping, Sweden
Posts: 646
|
Quote:
I wrote a few fracta renderers. The first one was written in VB, and rendered a Dragon or Koch kurve. The second one was also VB, but drew a mandelbrot. I did it mostly because I got bored in a VB class in school. The third one I wrote in C with OpenGL for rendering large "empty" areas as simple interpolated gradients. (I think I just checked if each corner of the quad differed from the others more than some low threshold, and recursively split the quad.) It was slow, even with all that OpenGL "acceleration". The fourth was plain C, pixel, by pixel. Worked well, but not very quickly. There should be immense possibilities to optimize something like this. Some SSE and threaded rendering so our dual quadcores have some work to do for once? How about yourself? Can you tell us anything on the technical side? rendering high-res fractal videos sounds time consuming...
___________________________________________
Topmost webbyrå i Jönköping - webbutveckling & design |
|
|
|
|
|
#6 | |
|
DevMaster Staff
Join Date: Sep 2005
Location: The Netherlands
Posts: 1,573
|
Quote:
![]() (Here in the Netherlands a certain bank provides the service that you can put your own picture on the card)
___________________________________________
C++ addict - Currently working on: the 3D engine for Deus Ex 3. |
|
|
|
|
|
#7 | |
|
Senior Member
Join Date: Aug 2004
Location: Thornhill, ON
Posts: 993
|
I looked over his journal the other day and it was quite informative. I'm surprised how things are really that easy. He also got me thinking about Voronoi diagrams, which I completely forgot about. Very cool stuff that I'm working on implementing.
The buddhabrot is interesting. The nebulabrot (lol, who comes up with these names) makes me think of space invaders. I've seen some YouTube videos where they've animated the colours, but if it's possible to slightly animate the shape (slight rotations and what not), it would make for an interesting addition to my video. The video itself is quite time consuming. I'm rendering it on a dual core 1.8GHz. Some scenes take 2-3 days of processing to film the full zoom on one section at roughly 2048 max iterations (though it varies on what I'm targeting). And if I make a mistake, I smash myself into the wall head first.. To make things worse, I'm producing the videos at 60fps and downsampling the output images from 3840x2160 to 1920x1080. It's really worth it though. I wrote the thing in C++ so there's no fancy assembly going on (see QuickMAN), but I am taking advantage of multithreading. I'm even contemplating adding a network renderer to get my other PCs to join in. Hmm, I should also get the GPU to help out too. Heh, the funny thing is my PC can't even playback the final video. 60fps HD is to much for my crummy PC to handle. The fractal flame algorithm is a lot worse too since it requires tons of iterations to converge the result. I'd love to do videos with that because it's so fluidic and beautiful, but it would take a month just to do a 1 minute video. Quote:
![]()
___________________________________________
http://www.nutty.ca - Being a nut has its advantages. |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Aug 2004
Location: Brasil
Posts: 324
|
very nice!
|
|
|
|
|
#9 |
|
Senior Member
Join Date: Aug 2004
Location: Thornhill, ON
Posts: 993
|
So I decided to port my Mandelbrot renderer over into a fragment shader and... WHOA! Talk about insane speed. It doesn't have the precision or quality I get on the CPU, but just to navigate around is incredible. Because it's the week of the Mandelbrot, I'll post my shader code if anyone is interested in trying it out themselves or wants to improve their overall shader knowledge. I'll also post my fractal test app I've been working on soon. It generates some pretty nice desktop wallpaper. Every day is a new image
![]() ![]() CPU quality is obviously better, but GPU kicks my Intel's butt in speed. Feel free to use the shader code below however you see fit. You could trim it down some more given that your application would be different than mine. Code:
___________________________________________
http://www.nutty.ca - Being a nut has its advantages. |
|
|
|
|
#10 |
|
Senior Member
Join Date: Sep 2005
Location: .nl
Posts: 573
|
I'm looking forward for your app!
|
|
|
|
|
#11 |
|
Senior Member
Join Date: Aug 2004
Location: Thornhill, ON
Posts: 993
|
Here you go. I included links to download the program for either Windows or Linux. I had to spend some time brushing up the interface, but it should be good enough to get around. Instructions are included in the readme.txt file. You'll find all the mouse and keyboard controls in there, as well as how to add your own gradients. One thing I didn't mention is that you can edit resources/gui.xml and add your own resolutions and max iterations (if you really want to go psycho on your computer). Also, you can't take screenshots while in Shader mode. I was to lazy to get the frame buffer and setup all that jazz ![]()
___________________________________________
http://www.nutty.ca - Being a nut has its advantages. |
|
|
|
|
#12 |
|
Senior Member
Join Date: Sep 2005
Location: .nl
Posts: 573
|
I had (Fractal) Fun indeed
Too bad that my videocard doesn't do GLSL though. |
|
|
|
|
#13 |
|
Senior Member
Join Date: Aug 2004
Location: Thornhill, ON
Posts: 993
|
What video card do you have? My netbook has an Intel 945GME that supports shader model 2.0, but not GLSL. I'm thinking about returning back to Cg to get that added support. I'm sure even on that Intel chip rendering via the GPU would show a great deal of added performance.
___________________________________________
http://www.nutty.ca - Being a nut has its advantages. |
|
|
|
|
#14 |
|
Senior Member
Join Date: Sep 2005
Location: .nl
Posts: 573
|
I have a Radeon 9600 All In Wonder
And yes, it also supports sm 2.0. |
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|