Welcome to Fractal Forums

Fractal Software => Programming => Topic started by: David Makin on July 04, 2011, 08:44:05 PM




Title: Translucency/Refraction in the "bulb" software
Post by: David Makin on July 04, 2011, 08:44:05 PM
Who's gonna be first Jesse or Buddhi ?


Title: Re: Translucency/Refraction in the "bulb" software
Post by: lycium on July 04, 2011, 09:05:58 PM
Fun fact: the very first perspective 3D Mandelbulb render had full global illumination; matte / metal / glass, you name it.


Title: Re: Translucency/Refraction in the "bulb" software
Post by: Syntopia on July 04, 2011, 10:11:29 PM
Suggestion: What about embedding the new Intel Embree raytracer in one of these apps? It's Apache licensed, cross-platform, SSE and even AVX optimized, supports physically based materials, and has progressive (interactive) rendering: http://software.intel.com/en-us/articles/embree-photo-realistic-ray-tracing-kernels/

It should be doable to wrap the fractal calculation inside a primitive shape, as long as you can calculate the ray-intersection and normal. But of course, it always sound easier than it is...


Title: Re: Translucency/Refraction in the "bulb" software
Post by: David Makin on July 04, 2011, 10:37:11 PM
Fun fact: the very first perspective 3D Mandelbulb render had full global illumination; matte / metal / glass, you name it.

I know, but that wasn't publicly available ;)


Title: Re: Translucency/Refraction in the "bulb" software
Post by: Tabasco Raremaster on July 06, 2011, 12:18:04 AM
There is one of Budhi`s renders where he did some trick to make the top layer of the box it`s surface semi-transparent so it was possible to look in the box from the outside a while ago and it was cool.

I`ve tried to use a plasma and flame render with alpha channel as background to see the effects when reflections are used but it doesn`t allow me to import the image .

Sure the wizards gathered in this forum can do the trick  :drink:








Title: Re: Translucency/Refraction in the "bulb" software
Post by: Sockratease on July 06, 2011, 02:48:48 AM
This seems like a good place to remind everyone how easy that would be if there was a program that could easily export the obj files used in 3D Software like Carrara, Bryce, Maya, etc...

I know Terry Gintz's software can, but I never got it to work for me.

Same with the stl file trick in Mandelbulb 3D.

Oh well...  Maybe one day   :ugly:


Title: Re: Translucency/Refraction in the "bulb" software
Post by: taurus on July 06, 2011, 01:06:39 PM
...I know Terry Gintz's software can, but I never got it to work for me.

i worked quite a while with fractal zplot and even with a whipped cream quat you had to be careful. depending on parameters an exported obj could easily reach 3 million polygons, to get a clean and detailed surface. bulbs and boxes are much more complex, so i think only a 64 bit app with loads of ram might handle these, if any.


Title: Re: Translucency/Refraction in the "bulb" software
Post by: Kali on July 06, 2011, 03:18:33 PM
Translucency would be great for "all inside" formulas...


Title: Re: Translucency/Refraction in the "bulb" software
Post by: Jesse on July 06, 2011, 10:28:56 PM
This seems like a good place to remind everyone how easy that would be if there was a program that could easily export the obj files used in 3D Software like Carrara, Bryce, Maya, etc...

I know Terry Gintz's software can, but I never got it to work for me.

Same with the stl file trick in Mandelbulb 3D.

Oh well...  Maybe one day   :ugly:

I agree fully with you, stopped that voxel export because there was no file type that supported it satisfyingly (looks grammatically not that right).
And a real mesh export is just to much work for now, itso.  :beer:

Translucy with CPU inside rendering using (not working) DE's is the least efficience way i could imagine, wouldnt expect to find it in m3d.
If you export a scene, you could use single precision and GPU stuff, and there are plenty of programs that are specialised for it.


Translucency would be great for "all inside" formulas...

The ones with only surfaces and all outside renderings.. shiny fractal bubbles floating around (i still vote for exporting  :dink:)


Title: Re: Translucency/Refraction in the "bulb" software
Post by: Tabasco Raremaster on July 10, 2011, 05:49:09 PM
Exporting is cool but it doesnt show the detailed inside of the object when given a transparrent color in another program as it would do if M3d or Mandelbulber have the translucency on board.

Incendia does STL Mesh export and it`s easy to convert to an OBJ-file but it`s not showing details inside the object when using transparency.


Title: Re: Translucency/Refraction in the "bulb" software
Post by: ker2x on July 13, 2011, 08:54:16 AM
Who's gonna be first Jesse or Buddhi ?

could be done using Nvidia's OptiX ?


Title: Re: Translucency/Refraction in the "bulb" software
Post by: cbuchner1 on July 13, 2011, 11:03:08 PM
could be done using Nvidia's OptiX ?

raises hands.

http://forums.nvidia.com/index.php?showtopic=150985

I did some reflections against an environment map. Optix supports multiple ray bounces, but it's hard to really see them on fractal surfaces.

Refraction is hard because there is no known reliable way to do distance estimation to the surface from the inside of the object.


Title: Re: Translucency/Refraction in the "bulb" software
Post by: David Makin on July 20, 2011, 12:58:15 AM

Refraction is hard because there is no known reliable way to do distance estimation to the surface from the inside of the object.


I think the (convergent smooth iteration) delta method could be made reasonably "reliable" just not particularly fast, though of course "fast" 5 years ago is slow now ;)


Title: Re: Translucency/Refraction in the "bulb" software
Post by: eiffie on July 22, 2011, 12:04:35 AM
The typical distance estimating functions we all use work fairly well on the inside. They are a bit slow "pulling away" from the surface. No worse than doing reflections. Just flip the "distanceMultiplier" to its negative whenever a surface is hit.
I tested this by doing some fractal xrays. Search fractal xrays on youtube if interested.


Title: Re: Translucency/Refraction in the "bulb" software
Post by: David Makin on July 22, 2011, 12:33:33 AM
Not even close:

(http://nocache-nocookies.digitalgott.com/gallery/7/141_22_07_11_12_31_09.jpeg)

Unless of course you're going to correct the bias across the bulbs and the variation in values dependent on the bulb periods.


Title: Re: Translucency/Refraction in the "bulb" software
Post by: Tabasco Raremaster on July 22, 2011, 03:19:32 AM
The typical distance estimating functions we all use work fairly well on the inside. They are a bit slow "pulling away" from the surface. No worse than doing reflections. Just flip the "distanceMultiplier" to its negative whenever a surface is hit.
I tested this by doing some fractal xrays. Search fractal xrays on youtube if interested.

@ eiffie
Awesome examples you`ve got there. Can you please show some images made inside those objects too?


Title: Re: Translucency/Refraction in the "bulb" software
Post by: eiffie on July 22, 2011, 08:23:56 PM
Here is a refraction and translucency example using simple fractals:
The same technique will work on boxes and bulbs you just need more patience than I have.
Something for your CPU cores to ponder.
http://www.youtube.com/watch?v=pzkofBNsZV0


Title: Re: Translucency/Refraction in the "bulb" software
Post by: eiffie on January 24, 2012, 07:09:00 PM
I haven't seen any examples of transparency yet besides my own. Not sure what is holding people up. Maybe I haven't given good enough examples of explained the few hangups/workarounds. Maybe I just haven't been watching all that close. Surely this can be implemented in fragmentarium. When I write a complete material script with reflection, refraction and occlusion I will try to port it to fragmentarium unless Syntopia beats me too it.
http://www.youtube.com/watch?v=5sytDncBpU4


Title: Re: Translucency/Refraction in the "bulb" software
Post by: marius on January 24, 2012, 07:26:21 PM
I haven't seen any examples of transparency yet besides my own. Not sure what is holding people up. Maybe I haven't given good enough examples of explained the few hangups/workarounds. Maybe I just haven't been watching all that close. Surely this can be implemented in fragmentarium. When I write a complete material script with reflection, refraction and occlusion I will try to port it to fragmentarium unless Syntopia beats me too it.

I tinkered with translucency a bit a while ago but never committed anything.

Currently looking into double precision shaders.
Appear mostly useful to slow the rendering down, not so much reveal more interesting structure..


Title: Re: Translucency/Refraction in the "bulb" software
Post by: eiffie on January 24, 2012, 07:42:19 PM
You are right there is a speed hit but not more than multiple reflections if the DE is properly constructed. Detail is also lost but the gain is artistic. So I think the problem IS a lack of good examples and us coders not being the best artists :)


Title: Re: Translucency/Refraction in the "bulb" software
Post by: marius on January 24, 2012, 08:44:59 PM
You are right there is a speed hit but not more than multiple reflections if the DE is properly constructed. Detail is also lost but the gain is artistic. So I think the problem IS a lack of good examples and us coders not being the best artists :)

Ah, I meant the double precision shaders that I'm playing with take a performance hit.
Yes, the reflecting / refracting not too much, delta limiting # of rays.

True that, not being much of an artist vs. coder. You're miles ahead of me though ;-)

All the GPU renderers appear more coder / tinkerer friendly than artist friendly.
I figure the software renderers need to pick up refracting, like they did w/ reflection.


Title: Re: Translucency/Refraction in the "bulb" software
Post by: xenodreambuie on January 24, 2012, 09:48:34 PM
Reflection and refraction only look good when much of the object is sufficiently smooth; or if composed of small blobs or facets, they're not too small. Otherwise it tends to look too noisy. So it works best if iterations are limited, or the detail is limited or smoothed in obj export, or perhaps using different materials for areas of fine fractal detail.

More generally, for aesthetics, all colouring and lighting should be chosen to work with any fractal structure rather than against it.

I know this is secondary to implementing the possibilities in the first place.


Title: Re: Translucency/Refraction in the "bulb" software
Post by: ker2x on January 26, 2012, 09:00:42 AM
that's one of the reason i wanted to code a pathtracer(marcher?) that work with distance estimation (all free/commercial available pathtracer are tracing against polygon (eg : luxrender, indigorenderer, ...).

But it's much harder to do (for me) than i hoped :(
And yes, one of the first rendering (the first?) of mandelbulb was using pathracing (hello lycium  ;D )


Title: Re: Translucency/Refraction in the "bulb" software
Post by: Syntopia on January 26, 2012, 09:49:55 AM
that's one of the reason i wanted to code a pathtracer(marcher?) that work with distance estimation (all free/commercial available pathtracer are tracing against polygon (eg : luxrender, indigorenderer, ...).

In the GitHub version of Fragmentarium, there is now support for accumulated/progressive rendering to a float (HDR) buffer (with a second pass by another custom pixel shader for tonemapping/gamma correction and post processing), so making a path tracer is not that complicated. I'm working on a new "soft"-raytracer using this, and I get  good results - using multiple rays per pixel, you get high quality anti-alias, better ambient occlusion, soft shadows without using DE hacks, and depth-of-field. And since it is progressively rendered, it is still possible to navigate interactively. I've attached a test render.

Currently looking into double precision shaders.
Appear mostly useful to slow the rendering down, not so much reveal more interesting structure..

I've also tried double precision, but was discouraged when I realized several math functions (e.g. sin, exp) were not available in double precision even in the latest GLSL specification. And on the examples where I got it working, the quality didn't visibly improve - so there must have been other issues. Besides, on consumer Nvidia hardware, doubles are very slow (1/8 speed of singles).


Title: Re: Translucency/Refraction in the "bulb" software
Post by: ker2x on January 26, 2012, 10:22:30 AM
yay !

Code:
git pull --rebase

what raytracer should i include ? The Soft-Raytracer.frag ?



Title: Re: Translucency/Refraction in the "bulb" software
Post by: Syntopia on January 26, 2012, 10:49:28 AM
yay !

Code:
git pull --rebase

what raytracer should i include ? The Soft-Raytracer.frag ?


Yes - it should be compatible with the other raytracer. The Knot.frag example uses it per default, I think.
You must set the render mode to 'Continous' to render accumulated frames - otherwise only one ray is rendered per pixel.

Be aware, that it is still very experimental :-)
 


Title: Re: Translucency/Refraction in the "bulb" software
Post by: ker2x on January 26, 2012, 10:57:12 AM
You must set the render mode to 'Continous' to render accumulated frames - otherwise only one ray is rendered per pixel.

Haaaaa now i understand what was the problem. thank you :)

--
Keru