Logo by fractalwizz - 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 the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. January 11, 2026, 11:22:26 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 ... 10 11 [12] 13 14 ... 16   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: updating of DE-Raytracer  (Read 49769 times)
Description: adding features in DE-raytracer: volumetric light, kaliset3d, clouds...
0 Members and 2 Guests are viewing this topic.
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #165 on: May 20, 2016, 03:28:02 PM »

I make blending for Frag a-la photoshop  roll eyes from here link of ContrastSaturationBrightness code. So simple funktions works well. I have problem with this:
Code:
vec3 BlendLinearLightf(vec3 base, vec3 blend) {
return (blend < vec3(.5))?BlendSubstractf(base,(2.0*blend)):BlendAddf(base,(2.0*(blend - 0.5)));
}
Code:
ERROR: 2:317: '<' :  wrong operand types  no operation '<' exists that takes a left-hand operand of type 'in 3-component vector of float' and a right operand of type 'const 3-component vector of float' (or there is no acceptable conversion)
how else rewrite this?
Logged

hobold
Fractal Bachius
*
Posts: 573


« Reply #166 on: May 20, 2016, 03:43:54 PM »

how else rewrite this?

There is no standard definition for "is greater than" or "is less than" for vectors. What are you trying to accomplish? If that computation is meant to be done per vector component, you'll probably have to explicitly write it for every coordinate, and then combine the results into a vector variable again.
Logged
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #167 on: May 22, 2016, 09:19:03 PM »

hobold, thank you, it helps )


I added photoshop blending modes and hue correction from PhotoshopMathFP.glsl by Romain Dura. LinearBurn, LinearDodge, Lighten, Screen, Darken, LinearLight, Overlay, SoftLight, ColorDodge, ColorBurn, VividLight, PinLight, Reflect, Phoenix. #define BLENDING to call.
Two gradients and simple mixing, hue in buffershader.frag (i don't know is that right...). Attached testing renderer.


* example Files.zip (17 KB - downloaded 78 times.)
Logged

3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #168 on: May 22, 2016, 11:10:32 PM »

... in buffershader.frag (i don't know is that right...)
yes, nice work, good to see the buffershader.frag getting filled up with some code  afro
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 #169 on: May 23, 2016, 10:47:59 AM »

 shocked Amazing... PS fused with Fragmentarium!? A Beer Cup
Logged

No sweat, guardian of wisdom!
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #170 on: May 23, 2016, 12:19:05 PM »

shocked Amazing... PS fused with Fragmentarium!? A Beer Cup
it's simple arithmetic functions applied as Post-tab features. And from the same source )

I want add anamorphic streaks for direct light  roll eyes  roll eyes  roll eyes
And I really don't know how to do that  head batting
« Last Edit: May 23, 2016, 01:45:33 PM by Crist-JRoger » Logged

Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #171 on: May 23, 2016, 02:16:54 PM »

Need somebody help. I created blurred glow which always horizontal directed on the screen. It's simple. I can't link this to light source coordinates  undecided
It seems not so easy. This horizontal glow must be foreground as post-effect...



* horiz_glow.jpg (6.6 KB, 440x310 - viewed 229 times.)
Logged

3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #172 on: May 23, 2016, 08:15:37 PM »

not sure exactly what you mean...

1. horizontal glow at light position?
2. god ray from light resulting in horizontal glow?

this might help huh? I added a little bit of code in DE-Kn2.frag for one image, not sure if it works in other cases, meant for clouds at sunset or sunrise...
Code:
vec4 clouds(vec3 p0, vec3 p1){

       ....

// add fog anisotropy to clouds 3Dickulus 05/14/16
#ifdef KN_VOLUMETRIC
for(int j=0;j<HF_FogIter;j++) sum.xyz+=(ptLightGlow3(ro, p1)*(1./float(HF_FogIter)));
#endif

        return clamp(sum,0.0,1.0);
}

these images have the same number of subframes and  the same settings the only difference is one line in #ifdef KN_VOLUMETRIC ... #endif before return

edit: the reason I did this is because I found that clouds affected fog (looking through clouds at fog) but fog did not affect clouds (looking through fog at clouds) so objects like bulb and surface had fog effect on them but sky/clouds did not so it looked strange.


* PrimordialSchmooze-1.jpg (62.05 KB, 640x360 - viewed 144 times.)

* PrimordialSchmooze-2.jpg (70.03 KB, 640x360 - viewed 315 times.)
« Last Edit: May 23, 2016, 09:14:02 PM by 3dickulus » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #173 on: May 23, 2016, 10:02:45 PM »

Nice sunrise  smiley

I mean pseudo lens effect like horizontal glow (anamorphic flares) in Star Trek film by JJ Abrams
Logged

3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #174 on: May 23, 2016, 10:45:52 PM »

for the full effect see the big picture http://www.fractalforums.com/index.php?action=gallery;sa=view;id=19150

hmmm... so need light and camera pos.xyz and view direction passed to buffershader.frag ?

this should be easy to do on C++ side by reading the values required and setting uniforms in the buffershader before executing
will try this with...

vec3 LightPos;
vec3 CamPos;
vec3 ViewDir;

can anyone tell me what else might be important to pass to the buffershader.frag this way ? maybe light color too ?

edit:
Quote from: Blazelight link=http://blazelight.net/en/articles/anamorphic-lens-flare-tutorial-english.php
Technically, the method is only a modified simple bloomshader
according to this blog the code is already there, copy or modify the bloom code, just stretch on the axis
I may still add the uniforms mentioned above for more complex stuff wink
« Last Edit: May 24, 2016, 12:10:11 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 #175 on: May 24, 2016, 06:13:14 AM »

ok did some mucking about and found something that works on single image but not tiles... yet wink
image 1 has the sun in the centre, image 2 is just off centre, it's a bit rough and not fully/properly implemented
code goes in buffershader.frag, if you have better math and glsl skills than I, please have a look at the link
modified from glsl code found at http://john-chapman-graphics.blogspot.ca/2013/02/pseudo-lens-flare.html

with some refinements I think this could work and it's very fast, needs to be modified to work with tiles and subframes properly


* lensflare-test1.jpg (8.83 KB, 512x288 - viewed 137 times.)

* lensflare-test2.jpg (18 KB, 512x288 - viewed 131 times.)
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #176 on: May 24, 2016, 06:49:09 AM »

3dickulus, image2 - you got chromatic abberation  shocked That's really cool!
I saw this blog, but did'n understand..
Logged

Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #177 on: May 24, 2016, 08:10:40 AM »

I think it can be like this: https://www.shadertoy.com/view/4lBXR1  smiley
Logged

3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #178 on: May 24, 2016, 08:14:36 AM »

I'll have a closer look at that tomorrow,
from initial look it might be better but testing will tell...
still need to consider tiles and subframes
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #179 on: May 24, 2016, 11:08:17 AM »

Ok, now i found by educated guess method  grin regulated DoF for background  joy
Code:
uniform sampler2D BG; file[tex.jpg]
//............
vec3 p=SRCurrentPt(Ray);
backColor += equirectangularMap(BG, Ray.Origin-p);
Logged

Pages: 1 ... 10 11 [12] 13 14 ... 16   Go Down
  Print  
 
Jump to:  


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.249 seconds with 27 queries. (Pretty URLs adds 0.024s, 2q)