SYN: First images

“Do you know that feeling of satisfaction when your program runs immediately without errors?”
“Me neither.”

Even if not at the first run, seeing your own program working is a big satisfaction. Today after several weeks of programming I finally got the skeleton of SYN working. Here is one of the first images I was able to render:

Power 8 Mandelbulb

It’s a simple Power 8 Mandelbulb raytraced with one directional light. The image itself is not impressive, but there are a couple of properties that make me consider it special:

The rendering time: The image was rendered at 16k x 10k pixels (160MP) in 77.6 seconds using all available resources on my PC: CPU Intel i7 2600k, GPUs NVIDIA GTX680 and GTX560Ti. I have no real comparison with other softwares at the moment and the code may not be optimized, but I believe this is a good result.

The flexibility of the rendering system: For casual users who just want to play with fractals, creating an image like this one  will be as simple as selecting the formula from a list, playing with the options and pressing Render. For advanced users who want to push their creativity to the limits or want to experiment with new formulas, SYN will be a huge playground. Do you remember the pipeline described in the first post? It’s designed to offer to the user the greatest customizability. The pieces of code that can be inserted at the different stages are now called bricks, since they can be assembled to build your world like LEGO bricks. Here is an example shader brick:

<SYN type="shader"
     author="Mattia Gollub"

      <float3 name="direction"/>
      <float3 name="intersection"/>
      <float3 name="normal"/>

      <float4 name="color"/>

      <float4 name="diffuse" default="0.0, 0.0, 1.0, 0.0" min="0.0, 0.0, 0.0, 0.0" display="Diffuse"/>

      <!--Shader code here-->

Objects are defined with the same XML syntax. The code must be written in OpenCL C Language (which is very similar to C). SYN will automatically check the bricks for compatibility, build visual controls for the parameters, and assemble the code fragments in a complete OpenCL program.

It’s all for today. In the next weeks I’ll fix some bug and improve the work balance between multiple devices. I will also try to add support to multiple objects in the same scene.

Until next time,


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s