FractGen 3d fractals in 2d

Recently I wrote a shader that used a 2d representation of 3d fractal to texture a surface then I realized that it rendered so fast that it would be worth making a comp to generate these patterns in realtime to just display on their own. So I thought it would be worth posting this component that has 6 3d fractal shapes to choose from then renders and colors them in 2d. It runs extremely fast for fractals I won’t get a drop below 60fps unless the iterations get cranked up to the 200ish range and I’ve found anywhere from 10 to 30 iterations is mostly sufficient.

Most of the parameters are self explanatory :wink: One thing to note is that you can use ctrl, alt, ctrl-alt left click to adjust sliders in fine, finer, finest increments.

Some fractals will display nothing if the settings aren’t at an appropriate range, there are about 50 presets that you can use as starting points if you can’t get an image with a fractal type. Also LFOs are synced to the Touch tempo.

Btw the only post processing are a level and hsv adjust TOP, there is no feedback being used, everything is entirely generated in the shader.

cheers
Keith
FractGen.zip (3.11 MB)

WOW this is amazing!!
Thank you for sharing Keith!

Thanks for the shared work. It reminds me sound synthetizers, and it’s a good place for learning GLSL.

ZOMGWTFBBQ! about sums up my feelings right now.

thanks for sharing such a deep and complex project. I can’t wait to clear some stoopid deadlines, open up this project and dive down this particular rabbithole.

I’ve been putting off learning GLSL and Python so this has strengthened my resolve to set time each day to learn and do a little until I’m comfortable with them.

It’s also strengthened my resolve to do stuff and share stuff more. touch has a great and generous community and the culture of sharing is periodically dampened by our realisation that we might actually be able to make money with TouchDesigner! :slight_smile:

OK, I guess we need to be proprietary about some things but what goes around comes around. I get so much help from others here that I try to share as much as I can.

thanks again!

Rodney

Thanks guys, I’m always happy to share interesting ideas.

Yeah I come from a music production background so almost all the visual/components I build are designed in an audio synthesis style.

No problem Rod I am happy to share. Actually it didn’t take that long to build. All the UI stuff comes from some other projects and the shader is just a bunch of code put together from some other shaders that I wrote.

Hope you guys get lots of use out of it. Sometime in the near future I’ll post a new version with a better method for the fine control of the sliders.

Hi Keith,

I’d love to look at this but I just get the grid. This message is in the info dat - Program Link Results:
Fragment shader(s) were not successfully compiled before glLinkProgram() was called. Link failed.
Any suggestions ?

Best
Colm

Hmm that’s a bummer. Are you running an ATI card? That might be the problem, I had another person have a problem with a shader compiling, it turn out he had an ATI card and it wasn’t stoked when using an integer to set a float. This might be the case. I’ll take a look.

cheers
Keith

Did you try changing formulas? If it only happens in one formula that will help narrow it down.

thanks

Yeah there are bunch of variable being set using an int when it should be a float. I don’t have time to go through all the shaders at this moment, I’ll make some time in the next day or two to fix it.

In the meantime if you are running an ATI card and want to get running you can go through the different formula dats and the “out” dat and make sure any line such as:

float someName = 0;

to

float someName = 0.0;

I noticed right away also there were some if statements such as if ( Tile.w == 1) ...
should be == 1.0;

Apologies my bad for the lazy code
hopefully that gets it going though
cheers
Keith

Hi Keith,

Yeah - 2GB AMD Radeon HD 7730M
Changed a bunch of them but not sure I got 'em all.
So still not working, some presets now show black :slight_smile:

Still curious to see it though!

Best
Colm

So I just uploaded a version that should work. I don’t have a Radeon to test but I think I found all the incorrect values.

viewtopic.php?f=22&t=4673&p=19604#p19604

If all the formulas work then great if not please let me know which ones and I’ll fix them.

cheers
Keith

getting this -
view the image in a new tab

C

What’s it doing in performance mode. Those TOPs aren’t part of the main network,they are just a formula (that’s in the main area also) with a bunch of presets. Only the network to the right counts.

In performance mode you should be able to select various presets that use different formulas from there we’ll know if a particular formula is working or not.

cheers
Keith

Wow! :open_mouth:
Thank you for sharing!!

Brain.

I have an ATI card and I also get the GRID and pretty much nothing else.

Sounds like an interesting piece but I can’t seem to get anything useful out of it :frowning: - I’ve tried the numerous different presets and also different fractal formulas - just a grid - or on 1 preset I got a blank screen.

Anyhow ~ Just checking to see if there have been any updates - or if I just do not know how to interpret this UI?

thanks.

The red/blue grid means a shader compile error. If you drop down an Info DAT and point it one of the GLSL nodes, you’ll see what the compile errors are. Maybe paste them here?

I thought I had fixed the ATI error obviously not… Yeah if you can drop down an info DAT like Malcolm suggested and send the info that would help.

cheers
Keith

So it’s been a while since I’ve thought about this. After reading what you suggested I notice I can’t even get into the network…

3 consecutive times now after letting it load up, I hit escape and TouchDesigner crashes.

I am using TD 88. Hmmm maybe that’s part of the problem…

Strange not sure why your having a problem. It was built in 088. Just tried downloading the posted version though and when I unzip it the .toe is 0kb and has nothing in it. I wonder if there are still some problems with downloading files on the forum?

I’m posting another for you to try. If that doesn’t work let me know and I’ll upload another that doesn’t open in perform mode. Other than that I’m not sure I don’t have an ATI card to test with…

I’m sorry it’s not working for you
Keith
FractGen.zip (3.11 MB)

Can you post the dmp files from the crash to the bugs forum?