### Problem with brute (non DE) renderer

• 4 Replies
• 190 Views

0 Members and 1 Guest are viewing this topic.

• Posts: 62

#### Problem with brute (non DE) renderer

« on: November 19, 2018, 12:01:11 AM »
Hi all,

I don't know if anyone is maintaining Fragmentarium these days, but if they are, I have a problem with the brute force renderer.

It uses screen-space ambient occlusion using the depth buffer. This causes stripes down the borders of the tiles when you make a high resolution rendering.

I can think of a few solutions:

1. the tiles could be made to overlap, so it removes the artefact
2. an option for no tiling? (or is this mandatory?)
3. a modification to the ambient occlusion which doesn't change shading at image edges

Is anyone able to help?

many thanks

#### Sabine62

• Fractal Freak
• Posts: 663

#### Re: Problem with brute (non DE) renderer

« Reply #1 on: November 19, 2018, 12:27:58 AM »
TGlad, you could use either 1 tile (if your image is not too big for your GPU), or use 100% padding. The last one would increase your render time by 2
On my nvidia 980Ti I can happily render 1920x1280 images with 1000 subframes if the render is not tooooooo heavy. Have no clue about your machine, of course.
100% padding is the safe option, but I would test even that on a smaller render...

And yes, Fragmentarium is very much maintained by 3Dickulus  We are currently at FragM 2.5 https://fractalforums.org/index.php?action=downloads;sa=view;down=4
To thine own self be true

• 3f
• Posts: 1484

#### Re: Problem with brute (non DE) renderer

« Reply #2 on: November 19, 2018, 01:52:42 AM »
@TGlad I'm maintaining (hacking) the code but the frags are the responsibility of their respective authors. Tiling is mandatory in that 1 tile is the lowest number of tiles to make an image, however, presumably the brute tracer (with brute3D and depthBufferShader) will also have a border around a single tile, @Sabine62 is correct, add padding, but you only need enough to cover the flawed pixels which is about 3% @ 1920x1080 ?

edit: also the depthbuffershader is reading values from the alpha channel in frontbuffer

Code: [Select]
 // xyz is color, w is depth. vec4 tex = texture2D(frontbuffer, pos);
in the color() funtion in brute-raytracer it reads the 'depth' value from backbuffer alpha channel

Code: [Select]
 float dist = texture2D( backbuffer,  position + pixelSize*vec2( dx, dy ) ).w;
the actual gl_FragDepth value (in the GL_DEPTH buffer) is calculated at the end of the color() function
by adding a bool DepthToAlpha widget to your frag you should be able to save  depth values in EXR format images as the alpha channel.

the reason for the gl_FragDepth stuff at the end of the color() function is because we render to a flat plane that is the size of the viewport and that makes GL put the depth value of the plane in the depth buffer, not the value from the fractal, this bit of code allows camera paths (rendered by GL post fractal) to be occluded by the fractal object.

hope that helps, feel free to ask me stuff about the internals of FragM C++
« Last Edit: November 19, 2018, 02:30:21 AM by 3DickUlus »
Fragmentarium is not a toy, it is a very versatile tool that can be used to make toys

https://en.wikibooks.org/wiki/Fractals/fragmentarium

• Posts: 62

#### Re: Problem with brute (non DE) renderer

« Reply #3 on: November 19, 2018, 03:08:31 AM »
Ah! thanks both of you.

I kind of glossed over the padding field because I didn't know what it did. So if that means it kind of adds some extra width to each tile so they effectively overlap, then that sounds perfect to solve the problem.

Thanks! and I'm glad it is being maintained, it is pretty much the best way to experiment with cool procedural structures.

By the way, if I wanted to contribute a structure or .frag file back into fragmentarium how would I do that? Presumably you vet them and the interesting ones get added into the examples?

• 3f
• Posts: 1484

#### Re: Problem with brute (non DE) renderer

« Reply #4 on: November 19, 2018, 03:35:38 AM »
I have a "tglad" folder in my Examples folder with Tetrahedral.frag in it,  can add that to the github repo and you can make contributions there, after some testing of course I can also place files there for you

### Similar Topics

###### Re: Problem with brute (non DE) renderer

Started by Robert Badaracco on Fragmentarium

2 Replies
92 Views
October 23, 2019, 06:49:22 AM
###### The Beginnings of a Renderer

Started by blue_knight on Programming

5 Replies
262 Views
May 18, 2019, 03:19:37 PM
by mclarekin
###### I'm about to make a Mandelbrot set renderer

Started by galac on Programming

0 Replies
192 Views
May 05, 2019, 03:16:22 PM
by galac
###### Nanobrot Fractal Renderer

Started by vasyan on Other

8 Replies
204 Views
January 21, 2020, 03:09:07 AM
by vasyan
###### A little problem?

Started by Know That Fractal! on Fractal Image Gallery

2 Replies
356 Views
December 25, 2017, 09:37:27 AM
by Fraktalist