Welcome to Fractal Forums

Fractal Software => Announcements & News => Topic started by: phtolo on April 28, 2015, 06:49:31 PM




Title: StyrofoamIFS
Post by: phtolo on April 28, 2015, 06:49:31 PM
A program to render 3D IFS images/animations.

Requires OpenCL 1.1 and 64-bit Windows.

Download:
http://phtolo.se/fractals/StyrofoamIFS.zip (http://phtolo.se/fractals/StyrofoamIFS.zip)

Some teasers:

Images/animations by me in this thread:
http://www.fractalforums.com/ifs-iterated-function-systems/3d-barnsley-ferns-and-firs/15/ (http://www.fractalforums.com/ifs-iterated-function-systems/3d-barnsley-ferns-and-firs/15/)

http://phtolo.deviantart.com/art/Spyglass-501021867 (http://phtolo.deviantart.com/art/Spyglass-501021867)

http://phtolo.deviantart.com/art/Barnsley-Fern-518833507 (http://phtolo.deviantart.com/art/Barnsley-Fern-518833507)

http://phtolo.deviantart.com/art/Inverting-Tetrahedron-505513293 (http://phtolo.deviantart.com/art/Inverting-Tetrahedron-505513293)



Title: Re: StyrofoamIFS
Post by: cKleinhuis on April 28, 2015, 09:05:55 PM
Hey phtolo, super nice, hav not looked into it because i am mobile right now


Title: Re: StyrofoamIFS
Post by: lycium on April 29, 2015, 02:36:27 AM
I still have that cool postcard from you from the Fractal Art Symposium (where you kicked all of our asses at ping pong!) :)

You've made some awesome progress since then judging from these images, well done :D I'll check out the program sometime soon.


Title: Re: StyrofoamIFS
Post by: cKleinhuis on April 29, 2015, 07:37:22 AM
i get an error when clicking on "rerender":
seems to be some directories in the configs, which defaults to the user directory ...
Code:

Total:0:00:00.12
Raytrace:0:00:00.11
Error opening file C:\Users\ckleinhuix\Downloads\StyrofoamIFS\StyrofoamIFS\cache\_raytrace_cl_parameters.txt 07:36:08
Error opening file C:\Users\ckleinhuix\Downloads\StyrofoamIFS\StyrofoamIFS\cache\_raytrace_cl_parameters.txt 07:36:08
Raytracing: 07:36:08
Start: 07:36:08

*edit*
ah i got it, clicking "render ifs" before "re-render" does the "trick" :)

where are the IFS transform control interactive sliders?! :D ???
and how is the animation defined?


Title: Re: StyrofoamIFS
Post by: phtolo on April 29, 2015, 09:47:54 AM
Thanks guys :)

I'll add a proper error message for the retrace thing.

There are no interactive sliders on the horizon.

Animations are defined through the anim variable. Check out either the tetrahedron_rotate.ifs example or the lo-res_rotate.scene.



Title: Re: StyrofoamIFS
Post by: ellarien on April 29, 2015, 11:41:04 AM
I tried this on my system (nVidia GeForce GTX 750 Ti with the latest drivers) and I just get black images. Fragmentarium works fine, so what am I missing? As far as I can make out openCL is built into the drivers, so I shouldn't need to install anything else.


Title: Re: StyrofoamIFS
Post by: phtolo on April 29, 2015, 12:32:26 PM
I tried this on my system (nVidia GeForce GTX 750 Ti with the latest drivers) and I just get black images. Fragmentarium works fine, so what am I missing? As far as I can make out openCL is built into the drivers, so I shouldn't need to install anything else.

The program will tell you if OpenCL is not installed. If you switch to the Log tab directly at startup you should see info about the OpenCL installation on your system.

That being said, I haven't tested on any nVidia cards (I have a Radeon myself and also tested with the Intel Core driver at work), there might be a differences.

Can you select any other OpenCL device than the one selected by default and try ?



Title: Re: StyrofoamIFS
Post by: phtolo on May 03, 2015, 03:17:58 PM
I think I managed to reproduce the problem you had ellarien when compiling my OpenCL scripts for version 1.0.

Changed the announcement and uploaded a new version which won't run unless the OpenCL is at least version 1.1.


Title: Re: StyrofoamIFS
Post by: ellarien on May 03, 2015, 08:45:13 PM
Thanks for looking into it.

The program will tell you if OpenCL is not installed. If you switch to the Log tab directly at startup you should see info about the OpenCL installation on your system.
It says:

StyrofoamIFS by Per Olofsson
Version 28/04/2015
Dir:C:\Users\Rachel\programs\StyrofoamIFS

Name:GeForce GTX 750 Ti
OpenCL version:OpenCL C 1.2
Driver version:350.12
Global Memory:2147483648 bytes
Local Memory:49151 bytes
Constant buffer:65536 bytes
Max memory allocation:536870912 bytes
Max parameter size:4352 bytes
Max workgroup size:1024
Max compute units:5
Global memory cache size:81920 bytes
Global memory cache line size:128 bytes
Little Endian:True
Min align size:128 bytes
Mem base addr align:4096 bytes


Quote
That being said, I haven't tested on any nVidia cards (I have a Radeon myself and also tested with the Intel Core driver at work), there might be a differences.

Can you select any other OpenCL device than the one selected by default and try ?

It isn't offering me any other devices on the desktop. I also tried on my laptop, which also claims to have OpenCL 1.2. That offered me the choice of the integrated GPU, which crashed the display driver early in the render, and the Core i5 CPU, which took nearly two-and-a-half minutes to render a black screen, where the GPU on the desktop took 7.5 seconds to do the same thing. The new version doesn't make any difference. :(






Title: Re: StyrofoamIFS
Post by: phtolo on May 05, 2015, 12:53:25 PM
I was clearly on the wrong track here:
...
OpenCL version:OpenCL C 1.2
...

If you haven't given up on me, could you please check the cache folder after rendering, it should contain 9 files:
Code:
_ifs_cache_0.tmp
_ifs_cache_1.tmp
_ifs_cache_2.tmp
_ifs_cache_3.tmp
_ifs_cache_4.tmp
_ifs_cache_5.tmp
_ifs_cache_6.tmp
_ifs_cache_7.tmp
_raytrace_cl_parameters.txt

After rendering, the log should look something like this:
Code:
Total:0:00:39.47
Raytrace:0:00:38.47
autosave_20150505_1227.png
cpu ray:0.05 sec 12:27:51
background:0.019 sec 12:27:51
shadow:2.852 sec 12:27:51
GPU slice:1.123 sec 12:27:51
offset spheres:0 sec 12:27:51
wait for load:0.003 sec 12:27:51
disk:0.13 sec 12:27:51
distmap:31.436 sec 12:27:51
Ray eye:34.364 sec 12:27:51
init:0.044 sec 12:27:51
aa 3 12:27:42
aa 2 12:27:33
aa 1 12:27:25
aa 0 12:27:16
Raytracing: 12:27:12
Creating cache 7:12:27:12
Creating cache 6:12:27:12
Creating cache 5:12:27:12
Creating cache 4:12:27:12
Creating cache 3:12:27:12
Creating cache 2:12:27:12
Creating cache 1:12:27:12
Creating cache 0:12:27:12
Start: 12:27:11


Title: Re: StyrofoamIFS
Post by: KRAFTWERK on May 05, 2015, 01:15:39 PM
Cool stuff Per, keep up the great work!  :beer:


Title: Re: StyrofoamIFS
Post by: ellarien on May 05, 2015, 01:57:25 PM
I was clearly on the wrong track here:
If you haven't given up on me, could you please check the cache folder after rendering, it should contain 9 files:

Those files are there; the ifs_cache ones are about 1.4Mb each and raytrace_parameters.txt just lists the other files with semi-colons after each. Here is the log for my latest attempt:

Code:
Total:0:00:16.70
Raytrace:0:00:13.57
autosave_20150505_1250.png
cpu ray:0.015 sec 12:50:24
background:0 sec 12:50:24
shadow:0 sec 12:50:24
GPU slice:0.359 sec 12:50:24
offset spheres:0 sec 12:50:24
wait for load:0 sec 12:50:24
disk:0.031 sec 12:50:24
distmap:10.734 sec 12:50:24
Ray eye:10.749 sec 12:50:24
init:0.045 sec 12:50:24
aa 3 12:50:20
aa 2 12:50:17
aa 1 12:50:15
aa 0 12:50:12
Raytracing: 12:50:10
Creating cache 7:12:50:10
Creating cache 6:12:50:10
Creating cache 5:12:50:10
Creating cache 4:12:50:10
Creating cache 3:12:50:10
Creating cache 2:12:50:10
Creating cache 1:12:50:10
Creating cache 0:12:50:08
Start: 12:50:08


Title: Re: StyrofoamIFS
Post by: phtolo on May 05, 2015, 02:38:02 PM
Those files are there; the ifs_cache ones are about 1.4Mb each ...

A lead! They should be about 300k each (I'm assuming the default .ifs and .scene files here, 1_tetrahedron.ifs and lo-res.scene).

Will take a look at my code what could cause them to grow after work tomorrow.
Thank you for helping me out with this !!!


Title: Re: StyrofoamIFS
Post by: ellarien on May 05, 2015, 04:41:47 PM
Ah, sorry! That was CrossIFS -- I've been trying different ones in the hope of finding one that works. The default one gives files 200-300kB.



Title: Re: StyrofoamIFS
Post by: phtolo on May 06, 2015, 10:08:07 PM
Ah, sorry! That was CrossIFS -- I've been trying different ones in the hope of finding one that works. The default one gives files 200-300kB.

Back to square one. Could you please check a few more things for me ?

1) Look in the autosave directory, there should be a png for each rendered attempt. Are the previous rendered attempts all 4kb each ?

2) Start the program and hit the Retrace button. This renders what is present in the cache directory. Same result as before ?

3) Click edit on the lo-res.scene file. This should open up the file in notepad or similar text editor.
Change row 38 from:
Code:
background_solid_color 0,0,0,1  //color used if background_type is solid (RGBA)
to:
Code:
background_solid_color 1,0,0,1  //color used if background_type is solid (RGBA)
Just change the first zero to a one.
Save the file overwriting the old lo-res.scene file.
Hit the Retrace button again.
This should cause the background to be rendered in red instead of black.
Is if the resulting image all red now ?


Title: Re: StyrofoamIFS
Post by: ellarien on May 06, 2015, 11:22:45 PM
Back to square one. Could you please check a few more things for me ?

1) Look in the autosave directory, there should be a png for each rendered attempt. Are the previous rendered attempts all 4kb each ?

3.19 kB, actually -- all 800x600 solid black PNG files.

Quote
2) Start the program and hit the Retrace button. This renders what is present in the cache directory. Same result as before ?
Yes.

Quote
3) Click edit on the lo-res.scene file. This should open up the file in notepad or similar text editor.
Change row 38 from:
Code:
background_solid_color 0,0,0,1  //color used if background_type is solid (RGBA)
to:
Code:
background_solid_color 1,0,0,1  //color used if background_type is solid (RGBA)
Just change the first zero to a one.
Save the file overwriting the old lo-res.scene file.
Hit the Retrace button again.
This should cause the background to be rendered in red instead of black.
Is if the resulting image all red now ?
Yes.


Title: Re: StyrofoamIFS
Post by: SCORPION on May 07, 2015, 01:51:19 AM
I confirm that I have all the same.
If the background background_type skydome put it turns out that's such a picture:


Title: Re: StyrofoamIFS
Post by: phtolo on May 07, 2015, 08:51:11 AM
I confirm that I have all the same.
If the background background_type skydome put it turns out that's such a picture:

What graphics card do you use ?


Title: Re: StyrofoamIFS
Post by: phtolo on May 08, 2015, 09:41:15 PM
New version is up, I hope the problems should be fixed now!


Title: Re: StyrofoamIFS
Post by: ellarien on May 09, 2015, 02:27:57 AM
New version is up, I hope the problems should be fixed now!

Yay! It works!  :joy: :w00t: Now to learn how to use it ...