Logo by jodyvl - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit us on facebook
 
*
Welcome, Guest. Please login or register. March 29, 2024, 12:13:43 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Fragmentarium 2.0 beta  (Read 2819 times)
Description: Doubles!!!
0 Members and 1 Guest are viewing this topic.
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« on: June 28, 2017, 04:13:14 AM »

Moving Fragmentarium to 2.0 beta for the end of an era!

This is for testing double dvec2 dvec3 dvec4

I added to the Parser, GUIParameter and VariableWidget classes uniform type sensing for the above mentioned double types, these are set using GL calls in DisplayWidget class instead of the QtShaderProgram object in VariableEditor class.
Sliders have 7 decimal places for floats and 14 for double types. Also comming soon in 2.0... saving "Deep" EXR format images.
Here is the 2.0.beta source for anyone that wants to try it out wink

Test shader code...
Examples/Experimental/DoubleTest.frag
Examples/Include/BufferShader-4.frag
Examples/Include/Progressive2D-4.frag

Your gfx card must support GL 4.0 or greater.

Running from console will output vars, types and values used.
« Last Edit: July 02, 2017, 11:06:45 PM by 3dickulus, Reason: link » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #1 on: June 28, 2017, 04:02:45 PM »

oh shiny  A Beer Cup
Logged

No sweat, guardian of wisdom!
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #2 on: June 29, 2017, 03:47:28 AM »

Yes, shiny, but still needs polishing  undecided  I also reworked the 'uniform setting algorithm' so they only get set once per frame instead of every subframe (except the subframe counter) this should be a tiny speedup but has raised a couple of bugs like image area doesn't always render after setting a preset, need to give the GL area focus by clicking it, and the sliders for the buffershader (Post tab) don't all get enabled with 14 decimal places even though they are reported as double types huh? strangely Exposure does show up with 14 but the others don't huh? I think it's because buffershader vars are defined as sliders in the main shader and then again as uniforms in the buffershader, this 'shadowing' trick works fine at the frag code level but the GUI seems to have some issues with rendering the widgets properly.

Input is always appreciated  A Beer Cup
« Last Edit: July 05, 2017, 04:21:26 AM by 3dickulus, Reason: correction » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #3 on: June 29, 2017, 12:56:47 PM »

the ilmbase stuff is missing so the mklinux.sh doesn't work out of the box - I just deleted all the exr stuff from it and got it compiled.  only tested briefly, but seems shiny indeed.  cheers!

also tested on laptop, had to comment out glUniform4d etc (4 lines total) because they weren't defined when compiling.  laptop has no double support, but the non-double stuff seems to still work fine.
« Last Edit: June 29, 2017, 01:30:21 PM by claude, Reason: laptop test » Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #4 on: June 30, 2017, 03:02:37 AM »

@claude yes, the OpenEXR stuff is not included, this is the Fragmentarium sources only, it is intended as a "drop in" replacement for the existing 1.0.31 sources and should look and smell just like 1.0.31 with the added bonus of double type support cheesy I did set the USE_OPEN_EXR flag to OFF as default in the CMakeLists.txt file.

I also altered the BufferShader-4.frag, it seems that it doesn't need gl_ProjectionMatrix in the vertex fragment???

old vertex code...
Code:
out vec2 coord;

void main(void)
{
gl_Position =  gl_Vertex;
coord = (gl_ProjectionMatrix*gl_Vertex).xy;
}
new vertex code....
Code:
out vec2 coord;

void main(void)
{
gl_Position =  gl_Vertex;
coord = gl_Vertex.xy;
}

This appears to work perfectly, I guess it's because the matrix was identity (1s) so no real transformation was going on when rendering from the buffer anyways.

EDIT: Progressive2D-4.frag doesn't need gl_ProjectionMatrix in the vertex fragment either???
old vertex code...
Code:
out vec2 coord;
out vec2 aaScale;
out vec2 viewCoord;
// Use this to adjust clipping planes
uniform dvec2 Center; slider[(-100,-100),(0,0),(100,100)] NotLockable
uniform double Zoom; slider[0,1,50000] NotLockable

uniform vec2 pixelSize;

void main(void)
{
double ar = pixelSize.y/pixelSize.x;
gl_Position =  gl_Vertex;
viewCoord = gl_Vertex.xy;
coord = (((gl_ProjectionMatrix*gl_Vertex).xy*vec2(ar,1.0))/vec2(Zoom)+  vec2(Center));
aaScale = vec2(gl_ProjectionMatrix[0][0],gl_ProjectionMatrix[1][1])*pixelSize/vec2(Zoom);
}
new vertex code....
Code:
out vec2 coord;
out vec2 aaScale;
out vec2 viewCoord;
// Use this to adjust clipping planes
uniform dvec2 Center; slider[(-100,-100),(0,0),(100,100)] NotLockable
uniform double Zoom; slider[0,1,50000] NotLockable

uniform vec2 pixelSize;

void main(void)
{
double ar = pixelSize.y/pixelSize.x;
gl_Position =  gl_Vertex;
viewCoord = gl_Vertex.xy;
coord = (gl_Vertex.xy*vec2(ar,1.0))/vec2(Zoom)+vec2(Center);
aaScale = pixelSize/vec2(Zoom);
}
« Last Edit: June 30, 2017, 06:47:41 AM by 3dickulus, Reason: investigating... » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #5 on: July 24, 2017, 04:38:33 AM »

Added EXR tools menu, shows some help about usage. (used exrenvmap to make this)
Added samplerCube uniform cheesy

NEGATIVE_X=0
POSITIVE_X=1
POSITIVE_Y=2
NEGATIVE_Y=3
NEGATIVE_Z=4
POSITIVE_Z=5

to use the samplerCube just...
Code:
#define providesBackground
#group Skybox
uniform samplerCube skybox; file[cubemap.png]
vec3  backgroundColor(vec3 dir) {
    return textureCube(skybox, dir).rgb;
}
...before #include Raytracer.frag

sources at https://github.com/3Dickulus/FragM

Ditch-River Panorama HDR example in Fragmentarium.
It is authored by 'Blotchi' and copyrighted by http://www.hdrlabs.com/sibl/archive.html
It is licensed under a CC3.0 license: http://creativecommons.org/licenses/by-nc-sa/3.0/us/



* cubemap.jpg (42 KB, 256x1536 - viewed 399 times.)

* SkyboxTest.jpg (28.33 KB, 900x480 - viewed 417 times.)
« Last Edit: July 24, 2017, 05:40:32 AM by 3dickulus » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #6 on: July 25, 2017, 02:34:11 AM »

Skybox works great!!!

add some refraction....

before #include DE-Raytracer.frag...
Code:
#define  providesColor
after #include DE-Raytracer.frag...
Code:
uniform float RefractiveIndex; slider[0,1,10]
vec3 baseColor(vec3 point, vec3 N){
    float ratio = 1.00 / RefractiveIndex;
    vec3 I = normalize(point - from);
    vec3 R = refract(I, N, ratio);
    return textureCube(skybox, R).rgb;
}

some values for RefractiveIndex...
Air    1.00
Water    1.33
Ice    1.309
Glass    1.52
Diamond    2.42

...using Glass for this image


* SkyboxTest2.jpg (74.47 KB, 900x480 - viewed 394 times.)
* SkyboxTest.frag (8.55 KB - downloaded 213 times.)
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #7 on: October 21, 2017, 05:15:25 PM »

I think I've managed to stabilize that (apparently) random crash that would happen after writing more than 100 messages to the log window and a couple of other things like wrong first tile when under script control. cheesy

As FractalForums.com is winding down I thought a closing post with a link to the downloads section on the new site would be appropriate, this is also a big thank you post swing  to all the folks that make FF possible and to all of the users who have contributed ideas and code, and, most importantly, to the original creator of Fragmentarium, Mikael Hvidtfeldt Christensen a.k.a. Syntopia. 

You can find packages for Win, Mac and linux here https://fractalforums.org/index.php?action=downloads;sa=view;down=4
You can find the source code here https://github.com/3Dickulus/FragM

 thanks sign

A little reminder that Fragmentarium is still developing and highly experimental.
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Mutatorkammer Beta Announcements & News « 1 2 3 4 5 » cKleinhuis 74 29070 Last post March 11, 2007, 11:31:22 AM
by cKleinhuis
Fractal Lab Beta Meet & Greet Fractalan 0 3165 Last post September 12, 2011, 05:48:49 PM
by Fractalan
Updated beta Ultrafractal David Makin 0 1273 Last post February 09, 2012, 08:44:56 PM
by David Makin
Fragmentarium 1.0 Beta 1 Fragmentarium « 1 2 3 4 » Syntopia 46 10235 Last post August 30, 2013, 05:23:33 PM
by 3dickulus
Beta Light Ultrafractal abbaszargar 1 1067 Last post October 24, 2013, 07:06:39 AM
by Nahee_Enterprises

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.199 seconds with 28 queries. (Pretty URLs adds 0.015s, 2q)