Title: updating of DE-Raytracer Post by: Crist-JRoger on January 28, 2015, 10:44:24 PM Hi! There is an idea of combining Kali's volumetric light and kaliset3d effects with tweaking DE-raytracer.frag and 3D.frag (http://knightyff.deviantart.com/art/WideInFocusRenderer-451604137)by Knighty.
I am not a programmer, but I love fragmentarium, fractals and possibilities of this program ) I tried to combine volumetric light by Kali to this DE. It was impossible for me. Problem in the end in vec3 trace and vec3 color. I dont know how add needed code. And then I tried to combine volumetric with stanrard DE-raytracer.frag. And it works, but without reflections... I just copied the same strings of code. Second idea - improve blending IQ-clouds (http://www.fractalforums.com/animations-showcase-(rate-my-short-animation)/iq-clouds/) with scene. Maybe somebody can help. Thank you in advance. Title: Re: updating of DE-Raytracer Post by: knighty on February 12, 2015, 09:37:35 PM Hi,
Here is a little update with smooth DOF transition. Integrating Kali's volumetric light will come soon (slowly :D). Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on February 17, 2015, 02:15:32 AM knighty, thank you very much!
Bloom effect looks amazing :love: Great results with multisteps reflections Here a test (1920x1080 2000 subframes) (http://fc01.deviantart.net/fs70/f/2015/047/1/9/bloom_test_by_crist_jroger-d8ibrub.jpg) (http://fc01.deviantart.net/fs70/f/2015/047/1/9/bloom_test_by_crist_jroger-d8ibrub.jpg) Title: Re: updating of DE-Raytracer Post by: DarkBeam on February 17, 2015, 08:59:18 AM :surprised: :surprised: :surprised:
Title: Re: updating of DE-Raytracer Post by: knighty on February 17, 2015, 12:26:24 PM New-Cr updated: Forgot to upgade it to fragmentarium v-1.0.0 (I'm still using v-9...)
Title: Re: updating of DE-Raytracer Post by: knighty on February 23, 2015, 09:47:51 PM Another update!
Title: Re: updating of DE-Raytracer Post by: eiffie on February 23, 2015, 10:18:18 PM Looking really nice!
Title: Re: updating of DE-Raytracer Post by: mclarekin on February 24, 2015, 01:29:39 AM I agree with eiffie, looking real sharp. :) :) :)
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on February 24, 2015, 04:41:27 AM Thank you! Height fog looks very nice ::)
I added Kali's surface mapping (http://www.fractalforums.com/3d-fractal-generation/kaliset-3d-fractal-used-as-coloring-and-bump-mapping-for-de-systems/) ) But need to write come strings in DE function. Don't know how make this all in raytracer file. (http://th06.deviantart.net/fs70/PRE/f/2015/054/8/b/sunrise_in_the_forest_by_crist_jroger-d8j7lak.jpg) Title: Re: updating of DE-Raytracer Post by: cKleinhuis on February 24, 2015, 10:00:25 AM people, that iks enormous improvement, i think you all will love the synthclipse ide, with syntax hilighting and code hinting build upon eclipse java ide, although it can import fragmentarium scripts, try out the synthclipse editor its a pure charming experience, and rendering capable are identical to fragmentarium
http://www.fractalforums.com/synthclipse/ Title: Re: updating of DE-Raytracer Post by: knighty on February 25, 2015, 08:30:44 PM Thanks you.
Another update: - Corrected a bug that causes black dots sometimes. - Modified lighting: now the specular highlights are not too bright. - Now Iq's soft shadow is used by default, Eiffie's can be used be definig USE_EIFFIE_SHADOW. Any suggestion/modification is wellcome. :embarrass: Synthclipse seems very interesting but it requires a recent GC. I'll try it on @work PC. :devil: Title: Re: updating of DE-Raytracer Post by: DarkBeam on February 25, 2015, 09:01:05 PM Suggestion;
You should add some walking cows to the raytracer :dink: Awesome work :beer: Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on February 26, 2015, 01:00:21 AM Testing softshadows by Eiffie. No postwork
(http://fc02.deviantart.net/fs71/f/2015/056/e/9/frag_042_effie_shadow_by_crist_jroger-d8jid9q.jpg) (http://fc02.deviantart.net/fs71/f/2015/056/e/9/frag_042_effie_shadow_by_crist_jroger-d8jid9q.jpg) Title: Re: updating of DE-Raytracer Post by: cKleinhuis on February 26, 2015, 09:15:25 AM wow, i think i need to create some cool animations with that renderer ;)
Title: Re: updating of DE-Raytracer Post by: Tim Emit on February 27, 2015, 01:30:34 AM looking fantastic... thanks Knighty and Effie ... and Crist.
cKlein yes I also need to do some animations with this... anyone fancy telling me how to render between one area of julia constant to another or multiple changing julia points ? In other progs you set keyframes .it isn't apparent with Frag! Title: Re: updating of DE-Raytracer Post by: SCORPION on February 27, 2015, 01:36:33 AM Tim Emit,
http://www.fractalforums.com/fragmentarium/cat-mull-rom-spline-paths-cameraparameter-keyframes/ Title: Re: updating of DE-Raytracer Post by: Syntopia on February 27, 2015, 10:52:46 PM Great images! Looking forward to play with this raytracer.
Btw, I recently wrote a post about doing path tracing in Fragmentarium (and in general) that might be of interest: http://blog.hvidtfeldts.net/index.php/2015/01/path-tracing-3d-fractals/ Example (light from a Preetham sky model): (http://blog.hvidtfeldts.net/media/path2.jpg) Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on February 28, 2015, 12:52:58 PM Hi! I tried sky-tracer, thank you very much. It faster than GI and more clean, light so realistic and it's very simple to tune.
(http://fc06.deviantart.net/fs70/f/2015/032/8/1/frag_011_by_crist_jroger-d8gburg.jpg) (http://fc06.deviantart.net/fs70/f/2015/032/8/1/frag_011_by_crist_jroger-d8gburg.jpg) But there is some limits, when scene is open and need more distance, or increasing detail at the same time with reflections - a lot of black spots :sad1: maxraysteps=300 (http://fc02.deviantart.net/fs71/f/2015/059/8/1/frag_023_by_crist_jroger-d8jt8li.jpg) (http://fc02.deviantart.net/fs71/f/2015/059/8/1/frag_023_by_crist_jroger-d8jt8li.jpg) maxraysteps=350 (http://fc04.deviantart.net/fs71/f/2015/059/1/8/frag_023_1_by_crist_jroger-d8jth1m.jpg) (http://fc04.deviantart.net/fs71/f/2015/059/1/8/frag_023_1_by_crist_jroger-d8jth1m.jpg) Title: Re: updating of DE-Raytracer Post by: knighty on March 01, 2015, 01:16:52 PM Awesome renderers Syntopia!
I particularly like the stratified sampler. :) Thank you. :worm: :chilli: Title: Re: updating of DE-Raytracer Post by: eiffie on March 01, 2015, 05:30:28 PM Hey guys great render engines! The black dots are almost always the result of trying to normalize a zero length vector and getting NaN (for knighty's frag it happens in the normal function) so either recalc the normal with different deltas or just throw out that sample. For instance in knighty's code I did the following...
HitNormal=normal(blah blah); if(HitNormal!=HitNormal)HitNormal=vec3(0.0); //I think the rest of the code handles this fairly well. Title: Re: updating of DE-Raytracer Post by: Syntopia on March 01, 2015, 05:51:09 PM Yes, it is probably a NaN bug - but I cannot reproduce it on my machine. Even more weird, the attached scripts renders all pixel black for the included presets on my machine?
Christ-JRoger, do you also see these black dots when reflection = 0? Title: Re: updating of DE-Raytracer Post by: Syntopia on March 01, 2015, 06:17:51 PM Now I managed to run the attached frags. There was a weird bug in them: the 'Up' was not normalized (one component was larger than 1.0), which shouldn't be possible (Fragmentarium should correct this).
The error was indeed in the normal calculation as Eiffie said. Replacing the last line with something like: Code: vec3 normal(vec3 pos, float normalDistance) {One 'problem' with the path tracer is that for these infinite scenes there might not be any light coming in. There is no ambient lighting in the model. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on March 01, 2015, 06:30:11 PM I replaced code.
Strange, but when reflections=1 there is no black dots ) When value <1 it is. And when increasing RayDepth, black dots becomes more. And I don't know what means "NaN" Title: Re: updating of DE-Raytracer Post by: DarkBeam on March 01, 2015, 06:39:00 PM NaN is the result spitted by your PC when you divide 0 by 0, or raise 0 to 0th power or something alike :police: :dink: :dink: :dink:
Title: Re: updating of DE-Raytracer Post by: cKleinhuis on March 01, 2015, 06:41:29 PM hmm, when trying out the script from the second post "new-CR05" "Pseudokleinian03.frag" with the latest downloadable fragmentarium version, i just get a white screen, in progressive mode, the first pass of the progressive shows some pseudokleinian structures, but then it converges to a full white screen :(
Title: Re: updating of DE-Raytracer Post by: Syntopia on March 01, 2015, 06:52:51 PM hmm, when trying out the script from the second post "new-CR05" "Pseudokleinian03.frag" with the latest downloadable fragmentarium version, i just get a white screen, in progressive mode, the first pass of the progressive shows some pseudokleinian structures, but then it converges to a full white screen :( I also experienced this (you probably also see a compile error in the console). I think line 88 in BufferShader1.0.1.frag should be: Code: c+=BloomIntensity*pow(b.xyz,vec3(BloomPow)); Title: Re: updating of DE-Raytracer Post by: eiffie on March 01, 2015, 06:55:08 PM @Syntopia "One 'problem' with the path tracer is that for these infinite scenes there might not be any light coming in. There is no ambient lighting in the model."
I haven't looked at your code yet but one thing I have found helpful with GI is to assume after X number of reflections you escape the scene and light with the background lighting. It may seem counter intuitive but after that many bounces the lighting is usually minimal unless you have a material like glass (but much better to give it too much light than none at all). Maybe you do this already?? Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on March 01, 2015, 06:59:05 PM Syntopia, eiffie is this possible to better adapt IQ-clouds (http://www.fractalforums.com/animations-showcase-(rate-my-short-animation)/iq-clouds/) for DE-raytracer? Whether it is possible the that clouds gently wrap around an object and become part of the scene reacted to light, shadows, etc?
Title: Re: updating of DE-Raytracer Post by: eiffie on March 01, 2015, 07:09:15 PM Yes it is possible but that kind of march gets very slow as you have to calculate the cloud density at small steps. One thing that could be done with these highly sampled scenes is to jitter the cloud density march and take just a few samples of cloud (per frame sample). lol Syntopia will hopefully understand that.
It is one of those requests that gets put last on the bucket list. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on March 01, 2015, 07:22:29 PM I'm not a programmer, so I'm sorry if it seems nonsense, but I thought that this can be done like with fog. Add something like this, as 'height based fog' in last modified DE.
Title: Re: updating of DE-Raytracer Post by: Syntopia on March 01, 2015, 09:41:55 PM It may seem counter intuitive but after that many bounces the lighting is usually minimal unless you have a material like glass (but much better to give it too much light than none at all). Maybe you do this already?? Yes, if the ray doesn't hit anything after maxRaySteps, I assume it escapes. I believe, this is also why the black dots (which are no longer NaN - I cheked that) appears when cranking up the maxRaySteps: the ray progresses longer, and hits the ceiling. (But I'm a bit puzzled why this does not happen for pure reflection - there might still be a bug). Yes it is possible but that kind of march gets very slow as you have to calculate the cloud density at small steps. One thing that could be done with these highly sampled scenes is to jitter the cloud density march and take just a few samples of cloud (per frame sample). lol Syntopia will hopefully understand that. It is one of those requests that gets put last on the bucket list. You can get very nice and very fast results using a few samples: https://www.shadertoy.com/view/MtfGDB However, if you want truly participating media, you have to do proper lighting at each cloud sample, which is expensive. But you are right Eiffie, that if we just choose a few random samples we could converge to the true solution. Title: Re: updating of DE-Raytracer Post by: knighty on March 01, 2015, 10:51:42 PM Also this one: https://www.shadertoy.com/view/Xdf3zB
Another update! Last time I haven't updated the presets so there may be some problems when using them. Fixed now. I've also corrected the warnings. It should work on non Nvidia CGs. Here is a render with the tweaked AO: Title: Re: updating of DE-Raytracer Post by: knighty on March 01, 2015, 10:57:00 PM BTW! for the black dots, a workaroud is to do : return max(0.,col); in color() function. That worked for me.
Title: Re: updating of DE-Raytracer Post by: Syntopia on March 02, 2015, 12:18:18 AM I tried implementing some volumetric fog. The idea is simple: choose a random point on the primary ray, and check whether you can trace a ray to an arbitrary point on the sun disc.
The attached example uses Perlin noise for the fog field. Notice in particular the shadow of the closest sphere. This is reasonably fast. For an even less expensive solution, just sample the fog density at an arbitrary point w.o. checking visibility. Title: Re: updating of DE-Raytracer Post by: eiffie on March 02, 2015, 04:39:41 PM Here is a version of knighty's version of syntopia's shader :) with iq's fast clouds (no real shadows).
I didn't really optimize this but I thought since Crist-JRodger started the thread by asking for it someone should make it. You have to enable it with #USE_IQ_CLOUDS Look at the code for a brief explanation of the sliders. There are 2 files a new DE-Raytracer and a test scene. The clouds are dependent on MaxDistance (they fade out) and HF_Dir (for which way is up in the scene). Syntopia's version is more complete and with less sampling could be fairly fast. These clouds resolve in a few frames so you waste gpu cycles after that. Title: Re: updating of DE-Raytracer Post by: DarkBeam on March 02, 2015, 04:49:05 PM I tried implementing some volumetric fog. The idea is simple: choose a random point on the primary ray, and check whether you can trace a ray to an arbitrary point on the sun disc. The attached example uses Perlin noise for the fog field. Notice in particular the shadow of the closest sphere. This is reasonably fast. For an even less expensive solution, just sample the fog density at an arbitrary point w.o. checking visibility. And volumetric perlin more dense next to the objects? ;) Title: Re: updating of DE-Raytracer Post by: knighty on March 02, 2015, 09:22:17 PM Those are wonderful results with fog.
First results of my attempt. I'm not releasing yet the frag because I'm really confused by all those formulas and there are a lot of errors to correct. :-\ Title: Re: updating of DE-Raytracer Post by: Syntopia on March 02, 2015, 10:11:58 PM I played around with my volumetric fog thing and I don't think it is the right way to go. It will create some 'god ray' volumetric effects, but it will never look like clouds. For this, the clouds must be able self-shadow (see IQ's description: http://www.iquilezles.org/www/articles/dynclouds/dynclouds.htm), cast shadows on ground and receive shadows.
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on March 02, 2015, 10:26:33 PM eiffie, looks nice! :yes: need to create animation ) Thank you! Just some time to tune them, but it's fantastic )
knighty, wow ) real god-rays ::) How many times I dreamed about sun, clouds, bloom and god-rays ) and now i't s possible. Guys you make amazing things ) I played around with my volumetric fog thing and I don't think it is the right way to go. It will create some 'god ray' volumetric effects, but it will never look like clouds. For this, the clouds must be able self-shadow (see IQ's description: http://www.iquilezles.org/www/articles/dynclouds/dynclouds.htm), cast shadows on ground and receive shadows. I think it's different objects. Clouds - on the sky, god-rays 'closer' to scene and formed by fog or something more uniform.Title: Re: updating of DE-Raytracer Post by: DarkBeam on March 02, 2015, 11:31:07 PM Oh my such splendid images :beer:
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on March 03, 2015, 12:38:50 AM One more. Just couldn't resist :love:
Terrain, no postwork (http://fc09.deviantart.net/fs70/f/2015/061/b/c/cloud2_test1_by_crist_jroger-d8k6nrd.jpg) (http://fc09.deviantart.net/fs70/f/2015/061/b/c/cloud2_test1_by_crist_jroger-d8k6nrd.jpg) Title: Re: updating of DE-Raytracer Post by: eiffie on March 03, 2015, 05:37:12 PM I'm glad you were able to figure out the controls! They are "touchy". Looks nice and I think you all are right we do have to treat these (clouds and fog) as different beasts or it becomes much too slow. With fog you can take a few samples and let it converge but with clouds that self occlude you have to march in small increments :(
Title: Re: updating of DE-Raytracer Post by: knighty on March 03, 2015, 07:51:55 PM Great renders CJG!
Another update. Added Iq's like clouds that eiffie implemented and volumetric light. (Don't forget to set Aperture to a value!=0.) The volumetric noise takes some time to converge especially with anisotropy. There are two reasons: - I'm having troubles with using RNG. - Only "distance to light" -importance- sampling is implemented for now. That explains high variance when using anisotropy. - Stratified sampling would help a lot with reducing variance. That makes them three. And some pictures. Title: Re: updating of DE-Raytracer Post by: eiffie on March 03, 2015, 09:22:36 PM These renders get me excited about the compo!
Title: Re: updating of DE-Raytracer Post by: cKleinhuis on March 03, 2015, 09:27:51 PM and as a side note: I EXPECT STUFF LIKE THIS IN UTTER MOTION!"
Title: Re: updating of DE-Raytracer Post by: 3dickulus on March 04, 2015, 02:41:27 AM mmmmmm yum yum shadey shaders, very nice to see some activity on this front :dink: you guys continue to amaze!
Title: Re: updating of DE-Raytracer Post by: mclarekin on March 04, 2015, 08:32:26 AM Like Knightys God rays shining down.
Some what similar to fogs and cloud. On my wish list is "blocks of fog" that can be positioned in various places within the image. With colour, shape, rotation and density controls and edge thinning. The ultimate would be wisps, but that might be a bit difficult. Placement of localised fog would be nice in some still images BUT in animation having fog forming and/or moving would be really cool. I imagine moving ground fog (groundfog day, lol), fog parting as you zoom in, a ring of fog placed half way up a fractal tower, fog appearing in the shape of a pyramid with an internal light then it spins out of view, wispy fog crossing the moon, the sun rising above a fog layer, fog primitive shapes joined to construct a giant Bart Simpson, tubes of coloured fog, fog visualisation of the animation spline, a coloured fog rainbow etc . Ahhh, my imagination is only limited by current my inability. :) But just a single movable block of fog would be interesting. And then there are spotlights, lasers and particle beams :) Title: Re: updating of DE-Raytracer Post by: eiffie on March 04, 2015, 04:31:57 PM Not to complicate things for knighty but it would be cool (and his code is setup well to work this way) if there was a "providesFog" switch that would let the user implement their own fog which would return a color and occlusion from point P1 to P2. That way options can be explored with out messing up the nice code base.
Each type of fog can be an include file. But then nobody uses the providesNormal switch so... just a thought. Title: Re: updating of DE-Raytracer Post by: mclarekin on March 05, 2015, 09:27:20 AM With fog being generated as the inside volume of a primitive shape, a torus could produce cool smoke rings coming out of a shadertoy locomotive. Rocking on down the line in La La Land as the generated clouds float by, and then the particle generator mimics rain, followed by the appearance of a of a rainbow from several coloured half fog toruses (now what is the plural for torus, tori?)
Ahhh, the possibilities are infinite, but unfortunately I just checked out my warehouse, and as I suspected, it seems I'm running low on ability. Lord only knows when the next shipment will arrive, if it ever does! :D Title: Re: updating of DE-Raytracer Post by: knighty on March 05, 2015, 08:03:30 PM @eiffie:
You are right. We have to find a way to organize the different effects and allow for constructing a renderer from basic blocs. This is not a priority now. Such things are more diffucult than what they appear and need some thinking. BTW! you last shadertoy entry is awesome! :) @mclarekin: Not really everything is possible to do in fragmentarium :sad1: (at least at interactive rates) but many things are ;) My dream is that fragmentarium allows for multiple output buffers, chained (or better a graph of) buffer shaders, scripted uniforms/parameters, geometry and compute shaders... @ChrisJRodgers: Where are you? I hope you haven't burned your PC. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on March 06, 2015, 04:47:10 AM Sorry, a lot of work and had no time. I'll try your new update today...
upd: Okay I get it ) First render with new god-rays effect. Didn't expected but it's very quickly :o Fantastic light :happy: Knighty, I am grateful for your work! (https://farm9.staticflickr.com/8683/16548552980_d4bba59330_o.jpg) (https://farm9.staticflickr.com/8683/16548552980_d4bba59330_o.jpg) Title: Re: updating of DE-Raytracer Post by: knighty on March 07, 2015, 07:35:59 PM :wow: :mandel:
Another update: With colored reflexion and fog and much less black dots. Title: Re: updating of DE-Raytracer Post by: eiffie on March 07, 2015, 07:40:59 PM I need to go play with this right now! Thanks knighty.
Title: Re: updating of DE-Raytracer Post by: knighty on March 07, 2015, 07:52:35 PM ;D
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on March 07, 2015, 10:37:00 PM :o Niiiiiiice :joy: :love:
Title: Re: updating of DE-Raytracer Post by: DarkBeam on March 07, 2015, 11:35:22 PM Awesomeness has surpassed the bailout! :D
Title: Re: updating of DE-Raytracer Post by: Kali on April 09, 2015, 12:53:05 PM Wow, thanks God I found this thread!
Great work, guys! Have to check all the posts I missed in my absence :'( Title: Re: updating of DE-Raytracer Post by: SCORPION on April 09, 2015, 02:29:55 PM Kali, now's your raytracer option is needed to surround the light!
http://www.fractalforums.com/fragmentarium-gallery/bad-memories/ Title: Re: updating of DE-Raytracer Post by: Kali on April 09, 2015, 03:05:50 PM Kali, now's your raytracer option is needed to surround the light! http://www.fractalforums.com/fragmentarium-gallery/bad-memories/ Hehe... that implementation was so lame and sloooow that I don't think it deserves a place here after looking at such great results! But I have a yet unpolished Fragmentarium script based on eiffie's implementation of some papers knighty pointed out, for a very fast volumetric option using the backbuffer. I don't remember well but it has a nasty bug I never fixed. Also the quality is not that great but it's good for some really fast volumetric effects. Maybe that .frag exists already somewhere and I also missed it? eiffie used this technique here I think, using his rendering tool: https://www.youtube.com/watch?v=pY2PXQtoPOQ (damn, I love that video) Title: Re: updating of DE-Raytracer Post by: eiffie on April 09, 2015, 04:30:32 PM I think there was a bug in the way I defined the 360 camera (the first pass from the light's perspective) but with all the geometry it is hard to tell.
It is fast though! Here is a real-time example of a similar technique (if you have a fast GPU). https://www.shadertoy.com/view/lls3Wf (https://www.shadertoy.com/view/lls3Wf) ... and thanks to Knighty for that paper (I never understood but had pretty pictures)! Title: Re: updating of DE-Raytracer Post by: 3dickulus on April 10, 2015, 01:42:54 AM @eiffie for such a little bit of code... it's mesmerizing :crazyeyes:
Title: Re: updating of DE-Raytracer Post by: SCORPION on April 10, 2015, 01:50:06 AM eiffie code from running on shadertoy fragmentarium very good and fast !!!!
Code: //Pseudo Knightyan by eiffie Title: Re: updating of DE-Raytracer Post by: Kali on April 10, 2015, 02:42:28 AM I think I know from who I'm going to steal something for my next shadertoy :evil1:
Title: Re: updating of DE-Raytracer Post by: 3dickulus on April 10, 2015, 06:07:17 AM I did an interesting mod...
in Kn2-DE.frag @ line 588 add... Code: //wind direction and then change line 638 from... Code: vec3 ro=p0,rd=normalize(p1-p0),cloudDir=normalize(HF_Dir); Code: vec3 ro=p0 + (WindSpeed*(WindDir*time)),rd=normalize(p1-p0),cloudDir=normalize(HF_Dir); Code: #define USE_IQ_CLOUDS Code: #include "DE-Kn2.frag" when you select "Animation" "Play" buttons in Fragmentarium gui the clouds move :dink: Title: Re: updating of DE-Raytracer Post by: Kali on April 10, 2015, 06:41:44 AM Thanks SCORPION!
But return scn.xyz ;D Title: Re: updating of DE-Raytracer Post by: knighty on April 10, 2015, 08:06:52 PM Ooops! haven't finished that one. There are still lot of things to do. Any idea is welcome (Kali?).
Thank you 3Dickulus. I'll see what to steal from you modifications. ;D Eiffie, is it possible to take a look at your rain code (if applicable)? Title: Re: updating of DE-Raytracer Post by: Kali on April 10, 2015, 08:39:23 PM Hi knighty! I have the same idea as you: stealing eiffie's 3D rain code :evil1: :angel1:
Haha. But sure I'll come up with something when I found the time... Title: Re: updating of DE-Raytracer Post by: eiffie on April 10, 2015, 09:55:13 PM Oh I don't have it with me but start a ray at a distance from the camera and march into a stretched perlin noise accumulating an alpha. I did about 6 march steps.
If you don't need 3d stick with Dave Hoskin's 2d rain which looks convincing. https://www.shadertoy.com/view/4dsXWn (https://www.shadertoy.com/view/4dsXWn) Title: Re: updating of DE-Raytracer Post by: Kali on April 10, 2015, 10:18:20 PM Yeah, only some steps of volumetric renderings of fractals/noise and then animating and even adding distortions based on distance estimate or other functions, can do interesting effects and it's very fun to play with!
I did it in Hot Shower shadertoy and I have some .frags somewhere... when I posted flash anims here doing this some time ago, I'll look for this experiments back at home and share some ideas. Title: Re: updating of DE-Raytracer Post by: knighty on April 12, 2015, 11:23:20 PM Thank you eiffie! only a handful iterations for such awesomeness? chapeau!
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on September 14, 2015, 05:57:39 PM @Kali, did you shared your ideas? ) I'm very interested in improoving of fragmentarium renderer.
Title: Re: updating of DE-Raytracer Post by: Patryk Kizny on September 16, 2015, 07:24:15 PM @Crist - what do you need?
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on September 17, 2015, 07:18:11 PM @Crist - what do you need? - Improove Godrays - they very very slowly- Improove iq clouds - artifacts when increase distance. Maybe if that posible - combine clouds and godrays - More complex AO like SSAO or HBAO :embarrass: - Water effect on the floor? Or real water shader. - Particles... Title: Re: updating of DE-Raytracer Post by: Patryk Kizny on September 24, 2015, 02:05:15 PM Improove Godrays - they very very slowly
→ These can be improved but won't be fast. It takes computation. I am working now on implementing iteration fog similar to the one that is in the mandelbulber software. Will take some more time though. My version of the raytracer has also extra support for more light sources for the volumetric fog. - Improove iq clouds - artifacts when increase distance. Maybe if that possible - combine clouds and godrays → You can combine them with volumetric, but current clouds implementation is not volumetric. What I did was adding an extra layer of clouds (posted in my version of the raytracer). Moving these clouds to volumetric model will be a computing overkill. - More complex AO like SSAO or HBAO embarrass SSAO is not more advanced. It's simpler in fact. If you look at my raytracer I added a nice Dirt effect which makes use of the underlying AO. Currently (did not post this yet) you have already 3 modifiable effects based on AO which gives huge creative freedom and is not very computationally expensive. - Water effect on the floor? Or real water shader. → In the simplest option that's just a matter of adding a bump map to the floor. Or you mean full raytraced water? - Particles... → and what else ??? :D Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on October 03, 2015, 06:17:40 PM In first knighty`s version godrays faster because he used different way to create rays. I am not a programmer, so I don`t know details.
Yes I mean real volumetric clouds, which interact with light and objects. Water - yes, real water shader ) When i sayed about AO i mean more realistic occlusion, like global illumination or Sky-Pathtracer. Your dirt-effect is interesting, but not what is needed... I don't like this very dark borders and presence of AO in the lighted areas: DE/GI/Sky (http://orig04.deviantart.net/c640/f/2015/276/a/0/de_by_crist_jroger-d9bs4b5.jpg)(http://orig09.deviantart.net/c898/f/2015/276/5/c/gi_by_crist_jroger-d9bs4dm.jpg)(http://orig08.deviantart.net/236a/f/2015/276/2/c/sky_by_crist_jroger-d9bs4fy.jpg) Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on October 13, 2015, 12:35:20 PM Question to Knighty, i found commented code of SSS-effect in shadow script. Don't really understand how it works and what means "DE defined inside"?
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on November 07, 2015, 08:59:46 PM Need help with correction of little bug in IQ-clouds code. There is any restrictions or something interferes... just thinking out loud. Maybe somehow incorrectly identified 'CloudTops' and 'CloudBase'?
Title: Re: updating of DE-Raytracer Post by: 3dickulus on November 18, 2015, 08:36:12 AM got it, I think...
at line 589 in DE-Kn2.frag Code: float rand(vec3 co){// implementation found at: lumina.sourceforge.net/Tutorials/Noise.html43758.5453 is too big and causes bit precision loss, delete the first place use only 3758.5453 edit: only tested on this image/view not sure if it will cause problems elsewhere Title: Re: updating of DE-Raytracer Post by: 3dickulus on November 19, 2015, 03:37:19 AM I note that all of the raytracers in Examples/include folder use this float rand(vec3 co) function, should this value 3758.5453 be used instead of 43758.5453 in all of them or is this relevant only to IQ-Clouds :hmh:
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on November 19, 2015, 06:33:28 PM 3dickulus, thank you very much!
I replaced vec3(12.9898,78.233,112.166) to vec3 uniform and played with values for better result :) upd.: Now i understand how appears this horrible noisy parallel lines, especially on the floor, especially on the reflected floor after final rendering on high resolution ;D ;D ;D This noise is most visible when Dithering=1. For eliminate the noise we must change values in fract(......) line 280 in DE-Kn2.frag - because there is a dependence on the scale approximation Code: return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); Title: Re: updating of DE-Raytracer Post by: 3dickulus on November 20, 2015, 02:58:08 AM many things use Dither*rand(), shadow, ambientOcclusion, and trace functions
Title: Re: updating of DE-Raytracer Post by: 3dickulus on November 22, 2015, 04:10:49 AM I found another thing that eliminated banding in the clouds...
remove *0.123 so this line in rand(vec3)... Code: return fract(sin(dot(co*0.123,vec3(12.9898,78.233,112.166))) * 43758.5453); Code: return fract(sin(dot(co,vec3(12.9898,78.233,112.166))) * 43758.5453); these 2 modifications still need to be tested, maybe one of them can clean-up banding in other places Title: Re: updating of DE-Raytracer Post by: 3dickulus on November 22, 2015, 06:39:21 AM just did some testing...
changing 43758.5453 to 3758.5453 still has boxy artefacts, fewer but still there removing *0.123 does not :D so in DE-Kn2.frag @ line 603 (the vec3 rand function used by IQ-Clouds) remove *0.123 and keep 43758.5453 this seems to clean-up all of the boxy artefacts, can anyone else confirm? Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on November 22, 2015, 06:12:00 PM Yes it is! Thank you very much! Now clouds looks better
(http://orig09.deviantart.net/6e00/f/2015/326/e/9/cloud_test_surf_water_by_crist_jroger-d9hmod0.jpg) upd.: I replaced rand to wang (http://www.fractalforums.com/index.php?topic=22721.msg88910#msg88910) for dithering. This looks awesome and fantastic! :joy: I don't know what is zoom here, but it done with MaxDistance=0.003 and 38 iterations of AmazinfSurface. I think 'Wang hash' must be applied as a new update of DE-Raytracer :dink: (http://orig07.deviantart.net/2a3e/f/2015/326/d/0/rand_wang_hash_by_crist_jroger-d9hmugl.jpg) upd2.: Okay, i looked in code of DE-Kn2.frag many times, really don't know how it all works together, but when i commented some line and build to see what's happened - there is no changes, so i decide that this code is excess. For example line 506 Code: float stepFactor = clamp((fSteps)/float(GlowMax),0.0,1.0); Code: float ao = AO.w*stepFactor ; I tried to find the way for more ambient occlusion gain in shadowed areas from spotlight. And vice versa - decrease ambient occlusion in lighted areas. In other words, an increase in mutual influence of camlight and spotlight. Title: Re: updating of DE-Raytracer Post by: 3dickulus on November 23, 2015, 01:24:22 AM a little further down
Code: if (DetailAO<0.0) ao = ambientOcclusion(hit, hitNormal); Code: float ao = AO.w*stepFactor ; however, DetailAO is almost never 0.0 (in my frags at least) so it might be ok to drop some of these lines and set a minimum of -0.0001 for DetailAO slider really nice ocean scene btw :beer: I will make an effort to update ratracer.frags with 'wang_hash' but it does require a minimum of GLv3.3 it might be an idea to add another includes folder for the stuff that is being updated to use extensions and newer GL calls, older cards will not like wang_hash :( so in a future release you may see Legacy includes folder and NewGL includes folder or something like that. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on November 23, 2015, 08:08:15 AM Not sure that I understand you. ao is ambientOcclusion. No?
DetailAO is not = 0 you right, i always use value near -0.0001. It hard to explain, sorry for my English. But i like ao effect, i think this is main thing in 3d renderer. And i like a lot of ao, because it makes the scene is volumetric and helps to separate objects on the tones of lighting. About extensions and newer GL calls - it really helps to accelerate rendering? Newer versions of GL contains newer functions for graphic optimization? Maybe any ideas? :) Title: Re: updating of DE-Raytracer Post by: 3dickulus on November 23, 2015, 03:11:39 PM if DetailAO is always < 0.0 then we don't need the test...
Code: if (DetailAO<0.0) ao = ambientOcclusion(hit, hitNormal); Code: ao = ambientOcclusion(hit, hitNormal); Code: ao = min( ambientOcclusion(hit, hitNormal), AO.w*stepFactor); About extensions and newer GL calls - it really helps to accelerate rendering? Newer versions of GL contains newer functions for graphic optimization? Maybe any ideas? :) older code may not compile on newer cards and vice versa new code may not compile on older cards so we may need a transition state with 2 versions until older cards are phased out. :hmh: Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on November 23, 2015, 03:39:41 PM 3dickulus, thank you!
I found what i want :joy: :joy: :joy: Now i see that AO and hardshadows in not all shading elements. There is diffusion in lighting model. So i tried to decrease AO from lighted area and i think it can be done here adding (1.0+ao) to SpotLight : Code: return (FG*SpotLight.xyz*SpotLight.w*falloff*(diffuse+ specular)*(1.0+ao)+CamLight.xyz*CamLight.w*(ambient)*(1.-ao))*color; Now when we use AO and hard shadows both - the value of AO more increases in shadowed areas. Render does not claim to match the actual physical model, but with this code it looks more realistic. Maybe somebody has more elegant solution. I would be very glad what you think. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on November 23, 2015, 06:24:47 PM I found another little bug in shadow calculating when FudgeFactor<1 and object has good view, but shadow is wrong
Need to return DE(p)*FudgeFactor in Code: float DEF2(vec3 p) {Title: Re: updating of DE-Raytracer Post by: 3dickulus on November 24, 2015, 02:53:43 AM O0 can you post a couple of small images of an area showing the result of your changes ?
I won't get to really try it until this weekend :( Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on November 24, 2015, 08:26:54 AM Shadows fix.Mandelbulb.
1. FudgeFactor=1 2. FudgeFactor=0.4 3. Fixed shadows, FudgeFactor=0.4 AO fix works not so good as would like. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on November 24, 2015, 10:44:43 AM Now i will try to show what i want to fix in AO.
1. Image with AO=0. Hard shadows=1, camlight=1 2. AO=1. We see that effect added on full scene. 3. "Fixed" AO. AO still works in shadows. In lighted area AO works too but slower than picture #2 upd.: Better result when i deleted ao from hitColor=lighting(... ... ao) and added ambientOcclusion to diffuse in vec3 lighting. Sombody who knows math, please help to write well-working code :beer: Title: Re: updating of DE-Raytracer Post by: knighty on November 24, 2015, 02:24:08 PM It's good to know that things are moving forward! Good work team! ;o)
@Crist-JRoger: I thought that that AO issue was solved... :P The implemented AO is really really a hack so don't expect that it works like real AO because: - It assumes that DE is perfect or almost perfect. By perfect I mean that the magnitude of it's gradient is equal to 1. By almost perfect that the magnitude of it's gradient is <=1. This may not be always the case Which will give the AO a wiered look. - It works by chooting a shadow-like ray in the normal direction at the shaded point: this will also give some odd looking AO (for non convex objects). A workaround would be to use multiple directions around the normal (say... cosine weighted hemispherial samples just like what is done in path tracing). In the 8th version, The AO only affect the "ambiant" light. So why the AO effect still appeares? This is because ambiant light is too intense. In real world, direct light value is much bigger than the diffused one. In order to get "correct" results one have to use tone mapping (in Post tab, give ToneMapping a value 2,3 or 4 not 1 or 5) while giving a big value the spot light and reducing exposure. I hope this will help. :) Title: Re: updating of DE-Raytracer Post by: 3dickulus on November 24, 2015, 03:05:04 PM nicely done! :beer:
speaking of post, there are 2 image sized arrays from DE that should be available to buffershader, Depth (GL) Alpha (.w) , surely these can be exploited. buffershader compiles to about 208 lines of GPU asm so there is over 10000 lines of unused code space there. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on November 24, 2015, 03:40:48 PM Knighty, things are moving very slowly ))))
And i don't forget about ao bugs, i just accepted this. Your explanation about basic is very interesting and so very unclear for me. Ok, i agree with you that AO in frag is not real AO. But can we make AO approximated to real? I added AO to diffuse and it looks better. I just want to have more various ways for manipulations with scene. I always use spotlight and ambient light together. So, after that do post with tone mapping and bloom. Not for erasing disadvantages but for improving. Title: Re: updating of DE-Raytracer Post by: knighty on November 24, 2015, 04:41:36 PM But can we make AO approximated to real? Yes. By using multiple directions around the normal. The same is true for soft shadows.So, after that do post with tone mapping and bloom. Not for erasing disadvantages but for improving. I think it's better to choose a tone mapping method, setting lights intensities then do the coloring in that order. This is just the same as when using a 3D rendering software (do lighting before texturing).@:3dickulus: Ah! If only fragmentarium supported multiple targets rendering. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on November 24, 2015, 11:26:40 PM Tested "shaded AO", raw render of kalibox :)
(http://orig04.deviantart.net/5e94/f/2015/328/c/4/frag_25_11_2015_01_by_crist_jroger-d9hw3jp.jpg) Title: Re: updating of DE-Raytracer Post by: 3dickulus on November 25, 2015, 01:51:00 AM @knighty we are using one shader to generate an image and a second shader for post processing, so... a few textures, of the appropriate format, could be attached to the FBO and written with information like surface normals, depth, color, shadow mask, real 3d coords, whatever is needed, etc. and handed to the second shader for further 3D processing and then on to final image processing :hmh: seems logical to me, but I'm afraid I lack the math chops and a deeper understanding of GLSL to know exactly what might be possible... just a thought ;) http://gamedev.stackexchange.com/questions/59194/multiple-render-targets-multiple-fragment-shaders.
@Crist-JRoger the light play in the cave looks really good :D Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on November 30, 2015, 07:01:36 PM I have some banding artifacts on the floor when used spotlight or background when use gradient. They are not so visible, but there is! And sometimes it reduces the quality, looks like low-quality jpeg :-\
I think that need to apply dithering or little smooth, maybe it's a lack of accuracy of calculations... Any ideas? :) Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on November 30, 2015, 10:37:29 PM testing last changes in AO model
camlight, spotlight, ao and hard shadows (http://orig01.deviantart.net/1bff/f/2015/334/2/1/light_test_d3_3_by_crist_jroger-d9ilfd2.jpg) (http://orig01.deviantart.net/1bff/f/2015/334/2/1/light_test_d3_3_by_crist_jroger-d9ilfd2.jpg) Title: Re: updating of DE-Raytracer Post by: knighty on December 01, 2015, 09:30:18 PM Beautiful renderings.
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on December 04, 2015, 08:25:28 PM I replaced floor to terrain in DE-Kn2, so it works...more or less
Need help because my code is incorrect, i have problems with lighting: Title: Re: updating of DE-Raytracer Post by: knighty on December 11, 2015, 05:21:10 PM It looks like you forgot to compute the normal of the terrain.
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on December 14, 2015, 01:38:18 PM It looks like you forgot to compute the normal of the terrain. How? :headbatting: Can you look on this? Title: Re: updating of DE-Raytracer Post by: knighty on December 15, 2015, 11:10:49 AM Fast and ugly solution attached. :)
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on December 15, 2015, 04:50:48 PM Fast and ugly solution attached. :) It works! Thank you very much!!! :) :beer: :beer: :beer:I really do not know a programming language. I tried to write everything that came to mind. upd.: I'm probably asking too much.. Can you add rotation? :help: Title: Re: updating of DE-Raytracer Post by: knighty on December 16, 2015, 02:27:49 PM Grrrr!
;D Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on December 16, 2015, 10:04:17 PM :thanks1: :thumbsup1:
(http://orig02.deviantart.net/278d/f/2015/350/9/7/frag_16_12_2015_01_by_crist_jroger-d9kcrkr.jpg) Title: Re: updating of DE-Raytracer Post by: 3dickulus on December 17, 2015, 02:56:00 AM @Crist-JRoger nice :)
@knighty :thanks2: a request for input from some of you GLSL coders... I intend on making a float array of values available to the buffershader from the GL depthbuffer and before I commit to anything I would like some input from some of the fragment specialists. Could "light from camera pos" calculations be moved to buffershader.frag? I think freeing up some space in the DE.frag might let it compile on older cards with smaller code caches. Could some shadow or AO stuff go there too? Is it worth the effort to do this, make depthbuffer from DE available to the fragment that handles "Post" tab :hmh: this is where I'm at, can be 2 types of values in a 2D float array... 1> GL values used for spline path occlusion 2> 1.0/totalDist from camera (user can modify this to be whatever they need to pass to the buffershader code) Should it be a vec4? Title: Re: updating of DE-Raytracer Post by: knighty on December 17, 2015, 03:21:13 PM If it's only depth, it shouldn't be vec4 I guess... My OpenGL knowledge stops at version 1.1. :D
Having the depth buffer is welcome as a starting point. ;D . Having multiple target rendering buffers would be awesome. With depth buffer some effects like "cheap" DoF and SSAO could already be achieved (syntopia already did them IIRC). I don't think camera light should be moved even if it is possible. For a low spec GPU, just don't use volumetric fog and IQ's clouds. Also, remember that loops may be unrolled by by the compiler. In that case, instruction limit is attained very fast: Imagine you do 5 reflexions, 300 ray marching steps and 30 iterations in DE computation. That's without using other stuff. It also helps a lot to lock variables like reflexion count, hard shadows and raymarching steps. Using GLSL alone, it is quite difficult to write a fully featured ray tracer as Crit-JRooger would like to have :evil1: ;D. A necessary feature that is not available in GLSL is function pointer (actually there is something like that but it is a new feature). With a scripting language (Qt have one) many things could become possible. That is not easy to do though. Title: Re: updating of DE-Raytracer Post by: 3dickulus on December 17, 2015, 03:34:44 PM tnx K :)
I was thinking vec4 so programmer can use xyzw as they see fit, say normal xyz and depth w ? or... btw QScript is implemented :D Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on December 19, 2015, 10:27:20 AM When i use a lot of 'features' Fragmentarium says me: "Go away, your GPU is too weak, give me something easier for compile :tease:" In logs it sounds: "Too much instructions"
I guess my questions are stupid, but still: Is it possible to combine these instructions to reduce their amount? Is it necessary to write a version of the language? I tried to write #version 110, 120 ... 330 and got errors 110 and 120 Code: Could not create fragment shader: 0(197) : error C7011: implicit cast from "float" to "vec2" 330 Code: Could not create fragment shader: 0(133) : warning C7555: 'varying' is deprecated, use 'in/out' instead Test. Floor replased on IQ-terrain+heightmap and PseudoKleinianMenger_03. On my gpu works without coloring code. Too much instructions with any other adding to code. (http://pre11.deviantart.net/8843/th/pre/f/2015/353/1/8/dwemer_s_legacy_by_crist_jroger-d9kmo7e.jpg) (http://orig15.deviantart.net/89b9/f/2015/353/1/8/dwemer_s_legacy_by_crist_jroger-d9kmo7e.jpg) Title: Re: updating of DE-Raytracer Post by: knighty on December 19, 2015, 04:16:11 PM First question: I don't really now. Try locking some parameters (like number of reflexions, shadow... etc.) and don't activate features that you don't use...
Second question: by default Nvidia compiler gives you all it's features. It is also very forgiving about the standards so you may end up with shaders that only work on Nvidia GC. Using #version tells the compiler to conform exactly to the version of GLSL that you are targeting. Title: Re: updating of DE-Raytracer Post by: M Benesi on December 19, 2015, 08:30:44 PM When i use a lot of 'features' Fragmentarium says me: "Go away, your GPU is too weak, give me something easier for compile :tease:" In logs it sounds: "Too much instructions" Use 120. Don't want to deprecate in/out and other stuff to use most of the code we're using.110 and 120 Code: Could not create fragment shader: 0(197) : error C7011: implicit cast from "float" to "vec2" Post line 197 in your code (and maybe some of the stuff around it). It will most likely be in "3DKn-1.0.1.frag" if you're using DE-Kn2.frag. Match the "line in preprocessed script" (at the bottom corner of the Fragmentarium log window?? or just Fragmentarium window??) with the line number 197 from the warning: O(197)..... Also, post line 788 from your code. Or better yet, just post the entire frags here and I'll look at them if they will even run on my old GPU. quick aside (and you might have said it before!) Do you use nVidia or AMD, and what card do you use?? ohh... btw, pretty image. When I get a newer GPU that isn't about 1/1000th as powerful as yours, I'll be doing stuff like that. ;) Title: Re: updating of DE-Raytracer Post by: 3dickulus on December 19, 2015, 11:19:23 PM Under the "Render" menu,
select "Output preprocessed script", this will open a new tab with the complete script as it is when executed. if you have editor line numbers turned on in preferences you will easily be able to find the right line for any error ;) or you can save the preprocessed script and use your favourite editor to look at it while editing the fragment in Fragmentarium :D also: moving features from #defines to bool uniform will increase the code size, use the #defines instead Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on December 20, 2015, 06:47:43 AM First question: I don't really now. Try locking some parameters (like number of reflexions, shadow... etc.) and don't activate features that you don't use... You mean yellow lock? Or replace varying to constant value in code?Second question: by default Nvidia compiler gives you all it's features. It is also very forgiving about the standards so you may end up with shaders that only work on Nvidia GC. Using #version tells the compiler to conform exactly to the version of GLSL that you are targeting. As i understand, it does not affect performance. Use 120. Don't want to deprecate in/out and other stuff to use most of the code we're using. I use nvidia gtx660, little overclocked ;D Here frags. De-raytracer changedPost line 197 in your code (and maybe some of the stuff around it). It will most likely be in "3DKn-1.0.1.frag" if you're using DE-Kn2.frag. Match the "line in preprocessed script" (at the bottom corner of the Fragmentarium log window?? or just Fragmentarium window??) with the line number 197 from the warning: O(197)..... Also, post line 788 from your code. Or better yet, just post the entire frags here and I'll look at them if they will even run on my old GPU. quick aside (and you might have said it before!) Do you use nVidia or AMD, and what card do you use?? ohh... btw, pretty image. When I get a newer GPU that isn't about 1/1000th as powerful as yours, I'll be doing stuff like that. ;) Title: Re: updating of DE-Raytracer Post by: 3dickulus on December 20, 2015, 06:58:14 AM yellow lock == constant value in code
Fragmentarium does this for you :) Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on December 20, 2015, 07:17:28 AM I quickly tried now... It's work! Cool! Thank you very much! :beer: :beer: :beer: So i can make code more complicated ;D
Title: Re: updating of DE-Raytracer Post by: M Benesi on December 20, 2015, 07:59:26 AM Cool!
Title: Re: updating of DE-Raytracer Post by: knighty on December 20, 2015, 11:40:29 AM (...) So i can make code more complicated ;D :rotfl: Use 120. (...) will even run on my old GPU. ;D(...) ;) It is always a good practice to use #version in order to make sure it will work on other graphics cards. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on December 20, 2015, 12:01:00 PM :rotfl: ;D Okay, okay... just Ctrl+C and Ctrl+V. That's all i can :)Title: Re: updating of DE-Raytracer Post by: knighty on December 20, 2015, 12:23:43 PM That was about making MORE complicated code! :)
using Ctrl+c and Ctrl+v is the way to go... If it works it means you understand what's going on. For one, that's how I "learned" to program. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on December 20, 2015, 01:38:26 PM Help me to fix AO shading :help:
I tried delete AO when use spotlight. Yes i know whats going on, but that's not enough for write workable code Title: Re: updating of DE-Raytracer Post by: knighty on December 20, 2015, 07:48:32 PM :)
Title: Re: updating of DE-Raytracer Post by: knighty on December 29, 2015, 04:40:29 PM A little update:
1- Multisample AO. A little bit noisy. 2- Now lights are affected independently by the AO. 3- Refine iterations to reduce banding artifact. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on December 30, 2015, 06:46:39 PM Wow! Looks great :yes:
Need to test it :) Thank you so much!!! Very glad that this renderer is getting better :joy: And happy Holidays! :drink: Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on January 04, 2016, 08:54:11 AM tested DE with new AO :)
(http://pre02.deviantart.net/4067/th/pre/f/2016/003/9/8/tree_by_crist_jroger-d9mozh6.jpg) (http://orig06.deviantart.net/c79c/f/2016/003/9/8/tree_by_crist_jroger-d9mozh6.jpg) Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on January 09, 2016, 12:24:07 PM Some last renders with Knighty's AO fix
Treebroccoli.frag (http://pre14.deviantart.net/a971/th/pre/f/2016/006/2/a/frozen_by_crist_jroger-d9mxwm8.jpg) (http://orig07.deviantart.net/7d19/f/2016/006/2/a/frozen_by_crist_jroger-d9mxwm8.jpg) Treebroccoli.frag (http://pre02.deviantart.net/7120/th/pre/f/2016/006/c/8/deep_in_the_forest_by_crist_jroger-d9n1d65.jpg) (http://orig13.deviantart.net/3238/f/2016/006/c/8/deep_in_the_forest_by_crist_jroger-d9n1d65.jpg) PseudoKleinianMenger_03.frag (http://pre10.deviantart.net/9861/th/pre/f/2016/008/e/5/joint_by_crist_jroger-d9n7ena.jpg) (http://orig06.deviantart.net/a751/f/2016/008/e/5/joint_by_crist_jroger-d9n7ena.jpg) PseudoKleinianMenger_03.frag (http://img01.deviantart.net/325c/i/2016/009/0/2/garlands_by_crist_jroger-d9na11c.jpg) (http://orig14.deviantart.net/0cbb/f/2016/009/6/e/garlands_by_crist_jroger-d9na11c.jpg) Title: Re: updating of DE-Raytracer Post by: lycium on January 09, 2016, 12:35:00 PM These are crazy good, great work :)
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on April 06, 2016, 01:21:50 PM I have a little question about final render: I use hard settings with a lot of raysteps, max detail, volumetric light, etc... So i use tile render and choose low tile resolution (400x200 for example) and offset 25%. I need a lot of small tiles for big resolution render otherwise GPU driver is crashed. Registry edit of TDR Registry Keys don't helps.
BUT when i set fullscreen in program preview window (1920x1200) with the same settings - they works! Slowly, very very slowly but GPU don't crash. I get over 2000 HD subframes! Last renders i did in preview fullscreen window, because it's faster and stable than tile rendering. Sorry for the long story, my question - why such a situation? Why tile render with small tile resolution crashed and fullscreen mode works well? Title: Re: updating of DE-Raytracer Post by: 3dickulus on April 06, 2016, 02:59:04 PM @CJR Awesome renders!
I have recently upgraded to win10 and haven't had time to test much on that machine. On linux, for hard renders, I use a preview size of 400x256 and render tiles @ 64x36 or 128x72 , this size keeps the rest of the desktop responsive and doesn't overwork the GPU, my latest image posts are done this way. will try to examine this over the weekend, sounds like GUI event update timing for the progress output... Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on April 06, 2016, 03:17:24 PM I use a preview size of 400x256 and render tiles @ 64x36 or 128x72 Thank you! I try to set tile bigger as much as possible, because bloom effect depends from prewiew resolution and needs offset-area for to "sew" image. Unfortunately, with such aggressive settings, render may hang in the middle or at the end. I did not expect that the full-screen mode will work so stably. In the end I just pressed PrintScreen ;D p.s. Maybe Syntopia will tell about fullscreen mode ) Title: Re: updating of DE-Raytracer Post by: 3dickulus on April 07, 2016, 02:43:49 AM @CJR
The images I have recently posted use up to 10,000 raysteps and 512 subframes yes, 20% to 25% padding, when using bloom, is required. you can make tile size as small as 16x9 and your desktop should respond like there is nothing else running you are using Win10? and what version of Fragmentarium ? v1.0.23 has a new feature you might like, CTRL+MidButton Click will place the light source, this is still experimental, needs a little refinement but works reasonably well, I'm looking at using this to modify spline path control points (keyframe eye+target locations) there are a couple of things that affect the Z placement though... 1. DepthToAlpha should be on 2. NormalBackstep should be 0 3. FOV should be 1 without these set this way the XYZ calculation is not accurate but it should still help a lot with light placement suggestions when placing light... before making changes select the PosLight tab and click on the Copy Group button make some changes adjusting the light pos with CTRL+MidButton Click if you don't like the new pos selecting Paste Settings will put it back to where you started :beer: Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on April 07, 2016, 06:34:20 AM I use Win7 and Frag 1.0. Earlier, I wrote to you why this version ) Small tiles - small bloom area, I don't like that :dink: That's why i was started talking about fullscreen mode (Ctrl+F)
Title: Re: updating of DE-Raytracer Post by: 3dickulus on April 07, 2016, 07:27:51 AM I use Win7 and Frag 1.0. Earlier, I wrote to you why this version ) Small tiles - small bloom area, I don't like that :dink: That's why i was started talking about fullscreen mode (Ctrl+F) I would like to know if the latest exe, v1.0.23 , runs on Win7/8 , it was compiled on Win10 but only uses Qt and MinGW DLLs are the bloom areas wrong in the water test, http://www.fractalforums.com/animations-showcase-%28rate-my-short-animation%29/testing-the-water/ :hmh: the tile size should not affect bloom size , worst case might need 100% padding but should capture the bloom properly at the right size Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on April 07, 2016, 07:22:07 PM As Knighty says: "bloom effect radius is in pixel so when doing a high res rendering the effect will be "smaller""
And i know it bacause i'm using bloom a lot :dink: Just now tested AO with small tiles, small tiles & padding, fullscreen. And fullscreen is really better! ;D Title: Re: updating of DE-Raytracer Post by: 3dickulus on April 08, 2016, 12:42:44 AM ok, I get it, tile size has nothing to do with bloom size, it's relative to overall image size, hmm, how to fix so that preview blooms are the same scale in full size final render? wysiwyg?
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on April 08, 2016, 06:21:02 AM Just add more bloom in preview and you'll get what you need in final large render :)
Title: Re: updating of DE-Raytracer Post by: 3dickulus on April 08, 2016, 07:23:50 AM preview 400 wide, final render 4000, still would like wysiwyg
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on April 08, 2016, 09:05:08 AM wysiwyg Googletranslate doesn't know what it is :-\Title: Re: updating of DE-Raytracer Post by: hobold on April 08, 2016, 01:04:28 PM Googletranslate doesn't know what it is :-\ Abbreviated "What You See Is What You Get". A design philosophy of graphical user interfaces, that aims to never present drafts or previews to the user, but always display an accurate representation of the final result, if not the final result itself.Title: Re: updating of DE-Raytracer Post by: 3dickulus on April 08, 2016, 02:17:34 PM @hobold :beer:
@Crist-JRoger :embarrass: apologies, I meant it would be nice not to guess at what it will look like before a long render. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on April 08, 2016, 03:19:56 PM Ok, i understand.
So bloom in De-KN2 is not "wysiwyg" :) But initially my question was about crashing when we use tile rendering, and good work when we use fullscreen mode (Ctrl+F or Ctrl+Shift+F) :help: Title: Re: updating of DE-Raytracer Post by: 3dickulus on April 08, 2016, 08:45:00 PM you are using v1.0.0?
please use v1.0.23 the latest 3Dickulus version http://www.digilanti.org/fragmentarium/ or the legacy master version from Syntopia @ https://github.com/Syntopia/Fragmentarium full screen is toggled by ESC key (3Dickulus version) updating progress does not check for subframe finish and does not call processGuiEvents() in main thread, instead it just issues an update request to the progress window and returns, this should be a little bit faster. edit:this will be in v1.0.24 (next patch release) v1.0.23 does not crash when using tile render. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on April 09, 2016, 09:12:10 AM Thank you for support, 3dickulus! But now i have Radeon, and your frag version is greatly slows down and hangs! Subframes calculates 1 per second :-X ... :-\ even with any .frag file. I can't use this version
I use Syntopia's original 1.0.0, and it works fast. Tile render crashed when settings hard, fullscreen mode works well! I tested on this scene http://sta.sh/0gh0x7hl5g8 and other resource intensive scenes. Title: Re: updating of DE-Raytracer Post by: 3dickulus on April 09, 2016, 09:42:18 AM radeon + frag v1.0.23 = bad :hmh:
in the zip file from my website there are 4 exe files, did you use one with nonv in the name? nonv = no nVidia specific calls nv = has some stuff that works with nVidia only it is very disappointing to hear and I would like to fix it but I don't have a radeon card to test with... are there any coders out there with radeon cards that feel up to the challenge of hacking at this problem? Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on April 09, 2016, 11:31:21 AM I also was surprised. Yes, all 4 files.
nonv = no nVidia specific calls nv = has some stuff that works with nVidia only Title: Re: updating of DE-Raytracer Post by: 3dickulus on April 09, 2016, 07:41:28 PM I'm not a fool :scared: :embarrass: I am sometimes :clown: Title: Re: updating of DE-Raytracer Post by: 3dickulus on April 09, 2016, 11:24:48 PM sorry I can't help with v1.0.0 or bloom issues :( not explaining this for you, just clarifying ;) the win machine I compile on has nVidia card, not sure if that would make a difference (shouldn't)
for bloom, because it's in the buffershader it is a post render effect and because it is pixel based the buffer xy size has a huge impact, ok. when using tiled render the buffer size is = the tile size, when viewing in the GUI the buffer size is == the size of the rendered image. to illustrate the effect, image 1 is from the GUI, image 2 was rendered @ 3840x2160 with tile size of 256x144 and 100% padding that means image 2 requires the render time of a 7680x4320 image :( scaled with gimp for comparing, no matter how I over compensate in the bloom settings I can't get the look I want in the final render short of rendering the full sized image in one go. bloom is a great effect, consistency between gui and tiled fullsize would be really nice... re:crashing tile render, do you have any error message output? Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on April 10, 2016, 08:30:01 AM for bloom, because it's in the buffershader it is a post render effect and because it is pixel based the buffer xy size has a huge impact, ok. Yes, I tried to say that :)when using tiled render the buffer size is = the tile size, when viewing in the GUI the buffer size is == the size of the rendered image. to illustrate the effect, image 1 is from the GUI, image 2 was rendered @ 3840x2160 with tile size of 256x144 and 100% padding that means image 2 requires the render time of a 7680x4320 image :( scaled with gimp for comparing, no matter how I over compensate in the bloom settings I can't get the look I want in the final render short of rendering the full sized image in one go. bloom is a great effect, consistency between gui and tiled fullsize would be really nice... Use large tiles 2x2 or 3x3 (960x540 or 1280x720) and you will get approximately the same picture like from GUI.re:crashing tile render, do you have any error message output? Сrashing driver. It was 100% on nvidia. Radeon - crashing driver too, but somerimes program hang without error. Just hanging out... and white window (аpplication not responding).If the scene is hard and tile renderer small tiles does not suit me, I turn on the full screen mode. Whatever the hard scene, nothing hangs. Why? Title: Re: updating of DE-Raytracer Post by: 3dickulus on April 10, 2016, 09:29:50 AM Use large tiles 2x2 or 3x3 (960x540 or 1280x720) and you will get approximately the same picture like from GUI. so a 1x1 tile with the same settings should get the same image as GUI ? I modified Fragmentarium sourcecode to allow tile render to use 1920x1080 and the image produced (scaled for display here) tells me that smaller tile size does not mean smaller bloom size, it is overall image size that has impact. even if I exceed max intensity x2 or x20 I still get image not like the GUI image in http://www.fractalforums.com/index.php?topic=20680.msg91937#msg91937 can Bloom be scaled or factored by image size? re:Radeon I won't be able to help until I can see what happens in debugger or run with some console output to find where it hangs :( Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on April 10, 2016, 10:47:48 AM so a 1x1 tile with the same settings should get the same image as GUI ? Yes one to one.I quickly tested now... And see that bloom size depends from image size, not tile. Thank you for explanations. When i prepared for large final render i increase bloom more and more to see result like viewing from GUI :dink: I modified Fragmentarium sourcecode to allow tile render to use 1920x1080 and the image produced (scaled for display here) tells me that smaller tile size does not mean smaller bloom size, it is overall image size that has impact. Small tiles = more padding, and there is a chance to get something like this:Title: Re: updating of DE-Raytracer Post by: 3dickulus on April 10, 2016, 11:37:33 AM yes, tile size must be big enough to cover the extent of bloom coverage
I think it's BloomTaps that needs to get scaled... GUI view = 512x288 final image = 3840x2160 scale BloomTaps by 7.5x so if BloomTaps = 20 in GUI view it needs to be 150 for final render with tile size = GUI view and 100% padding testing now ETA 1hr , scaling BloomTaps increases render time by 3x Title: Re: updating of DE-Raytracer Post by: 3dickulus on April 10, 2016, 12:53:48 PM yeah! :D nailed it!
here is the result of scaling BloomTaps only BloomPower and BloomIntensity remain the same the left image is the GUI the right image is the final render :joy: edit: yes, I see tiles need to be just a little bigger for this image or back off intensity a bit. :beer: Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on April 11, 2016, 10:46:10 AM scaling BloomTaps? did you mean increse? How many BloomTaps?
Title: Re: updating of DE-Raytracer Post by: 3dickulus on April 11, 2016, 02:22:37 PM GUI view = 512x288 BloomTaps = 20
final image = 3840x2160 BloomTaps = 150 sqrt ((3840*2160) / (512*288)) = 7.5 BloomTaps *= 7.5; :dink: increase BloomTaps by 7.5 times for final render http://www.fractalforums.com/images-showcase-%28rate-my-fractal%29/bloom-test-t23544/ Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on April 11, 2016, 08:12:53 PM 150??? :o it`s crazy
so i Tested fullscreen render on extremely hard settings (for me... on radeon hd7850) And i got artifacts! :o :-\ :sad1: BloomTaps = 39, Detail = -3.9, HF_FogIter = 4, HF_Scatter = 172, ReflectionsNumber = 2, 1700 subframes Title: Re: updating of DE-Raytracer Post by: 3dickulus on April 11, 2016, 08:45:38 PM the image (linked above) was rendered with only 32 subframes
Tile size 768x432 100% padding BloomTaps = 150 Detail = -3 HF_FogIter = 16 HF_Scatter = 10 ReflectionsNumber = 0 render takes the same time using original version or latest version and both look identical tiled render not full screen, I am also using wang hash function for RNG seed will post you the frags later if you would like to test on radeon Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on April 11, 2016, 08:56:01 PM Ok, thank you!
I always set a lot of subframes for total decrease all dither noise :dink: Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on April 12, 2016, 12:24:51 AM Try add Kali's particles for DE-Kn2. Unfortunately my knowledge of GLSL language is not enough. So i added Kaliset3D.frag, and this code mainly copied from Volumetric.frag
Code: #group KalisetLight Code: col0+=ptLightGlowK(prevPos,curPos); Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on April 20, 2016, 12:00:13 AM Testing renderer. Use #define USE_HMAP for enable height-mapping. Still has artifacts... and aliasing (need help for better height-mapping code)
Added floor/terrain texturing. Code: if (floorHit) {Testing texture with renderer in attach. Nodither, FudgeFactor=0.5 (http://orig07.deviantart.net/7f29/f/2016/110/d/b/hmap_kn2t_tex3_nodither_ff0_5_by_crist_jroger-d9zmpyb.jpg) Dither, FudgeFactor=0.1 (http://orig01.deviantart.net/49fa/f/2016/110/e/2/hmap_kn2t_tex3_dither_ff0_1_by_crist_jroger-d9zmpyp.jpg) Nodither, FudgeFactor=0.1 (http://orig09.deviantart.net/d6d3/f/2016/110/8/9/hmap_kn2t_tex4_nodither_ff0_1_by_crist_jroger-d9zmpz2.jpg) Dither, FudgeFactor=0.1 (http://orig01.deviantart.net/7aef/f/2016/110/7/0/hmap_kn2t_tex4_dither_ff0_1_by_crist_jroger-d9zmpzd.jpg) Title: Re: updating of DE-Raytracer Post by: Patryk Kizny on April 20, 2016, 10:40:13 AM The problems you're having have to do with how height maps are working with DE - it's inherent.
DE should be returning the minimum distance to an isosurface or object. While using height mapping in the form of float DE = function(vec3 p) { return p.z + myheightmap; } It's inaccurate. And it's becoming more and more inaccurate the higher the height value. So within DE raytracer you can't expect it to be precise. You'd have to go bruteforce. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on April 20, 2016, 01:51:07 PM float DE = function(vec3 p) { Maybe there's another function? return p.z + myheightmap; } It's inaccurate. And it's becoming more and more inaccurate the higher the height value. Or some smooth method for heightmap? upd. Another one heightmap test (http://orig13.deviantart.net/2a62/f/2016/110/c/a/hmap_tex2_by_crist_jroger-d9zmq5v.jpg) (http://orig13.deviantart.net/2a62/f/2016/110/c/a/hmap_tex2_by_crist_jroger-d9zmq5v.jpg) used this (http://www.deviantart.com/art/Stone-texture-174884891) texture Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on May 05, 2016, 04:55:02 PM Played a little with terrain for creating better ocean ripples effect :embarrass:
Just quick renders on intel GPU (http://orig10.deviantart.net/7594/f/2016/126/5/9/water_for_de_by_crist_jroger-da1hser.jpg) (http://orig13.deviantart.net/48ce/f/2016/126/d/9/water_for_de2_by_crist_jroger-da1htpp.jpg) Code: #include "Classic-Noise.frag" Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on May 08, 2016, 11:30:04 PM Added second floor. Used here for water surface:
(http://pre13.deviantart.net/f94d/th/pre/f/2016/129/5/0/lost_island_by_crist_jroger-da1wkhc.jpg) (http://orig15.deviantart.net/7254/f/2016/129/5/0/lost_island_by_crist_jroger-da1wkhc.jpg) Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on May 20, 2016, 03:28:02 PM I make blending for Frag a-la photoshop 88) from here (https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/) link of ContrastSaturationBrightness code. So simple funktions works well. I have problem with this:
Code: vec3 BlendLinearLightf(vec3 base, vec3 blend) {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) Title: Re: updating of DE-Raytracer Post by: hobold 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. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger 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. (http://img13.deviantart.net/65de/i/2016/143/1/a/01_by_crist_jroger-da3iyxc.jpg) (http://orig11.deviantart.net/1b84/f/2016/143/7/7/01_by_crist_jroger-da3iyxc.jpg) Title: Re: updating of DE-Raytracer Post by: 3dickulus 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 O0Title: Re: updating of DE-Raytracer Post by: DarkBeam on May 23, 2016, 10:47:59 AM :o Amazing... PS fused with Fragmentarium!? :beer:
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on May 23, 2016, 12:19:05 PM :o Amazing... PS fused with Fragmentarium!? :beer: it's simple arithmetic functions (http://photoblogstop.com/photoshop/photoshop-blend-modes-explained) applied as Post-tab features. And from the same source )I want add anamorphic streaks for direct light 88) 88) 88) And I really don't know how to do that :headbatting: Title: Re: updating of DE-Raytracer Post by: Crist-JRoger 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 :-\
It seems not so easy. This horizontal glow must be foreground as post-effect... Title: Re: updating of DE-Raytracer Post by: 3dickulus 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 :hmh: 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){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. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on May 23, 2016, 10:02:45 PM Nice sunrise :)
I mean pseudo lens effect like horizontal glow (anamorphic flares) in Star Trek film by JJ Abrams Title: Re: updating of DE-Raytracer Post by: 3dickulus 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 axisI may still add the uniforms mentioned above for more complex stuff ;) Title: Re: updating of DE-Raytracer Post by: 3dickulus 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 ;)
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 Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on May 24, 2016, 06:49:09 AM 3dickulus, image2 - you got chromatic abberation :o That's really cool!
I saw this blog, but did'n understand.. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on May 24, 2016, 08:10:40 AM I think it can be like this: https://www.shadertoy.com/view/4lBXR1 :)
Title: Re: updating of DE-Raytracer Post by: 3dickulus 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 Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on May 24, 2016, 11:08:17 AM Ok, now i found by educated guess method ;D regulated DoF for background :joy:
Code: uniform sampler2D BG; file[tex.jpg] Title: Re: updating of DE-Raytracer Post by: Patryk Kizny on May 24, 2016, 10:57:28 PM Guys, I don't want to be taking fun away from you, but IMHO there's not much sense implementing all these effects in the (already overloaded) fragment shader as you have them with way better performance, options and control in majority of postproduction softwares (either for stills or film). No point doing it in frag unless you're hitting Vjing and live applications.
Title: Re: updating of DE-Raytracer Post by: 3dickulus on May 25, 2016, 04:58:57 AM uhm... @Patryk Kizny
the code we are playing with goes in the buffershader.frag which is compiled into a separate program and executed "post DE" hence the tab title "Post" using the nv version of Fragmentarium you can see (Ctrl + A) exactly how much assembler code is in each program :D currently, DE-Kn2.frag (the one I'm using) turns into about 4000 lines of assembler, this includes the vertex shader assembler code too, while Buffershader-1.0.1.frag turns into about 256 lines including the vertex shader plus lensflare code, so lots of room there to play in the buffershader ;) I reiterate: these two things, DE vert+frag and buffershader vert+frag, are 2 separate programs executing independently there is no reason at all why the whole thing can't be broken down into much smaller progs, each working on a specific part of the overall image, 1 for depth, 1 for color, 1 for ambient light, 1 for shadows etc etc etc, in fact, this is the way the GL pipeline is supposed to work, not all crammed into one prog, it just happens that the way Fragmentarium does this is convenient for us humans to manage, otherwise, a small change in one part might require big changes or a complete rewrite of other parts and this would be far beyond the patience threshold of most of the coders that are tinkering with Fragmentarium fragments, or perhaps it's more fun to just play and experiment instead of dedicating some serious time to recode the entire approach. ...and if anyone can correct my bold assumptions, please jump in and add your 2 cents worth, I am always eager to learn... remember, Fragmentarium is not meant to be a studio production type of rendering environment, it is experimental and things learned from it may end up (have ended up) in other progs. no one has even commented or figured out what to do with the "spray gun" feature that M Benesi invented... yet :evil1: @ http://www.fractalforums.com/announcements-and-news/fragmentarium-1-0-10/msg91090/#msg91090 and even though I did not quite understand it I hacked it into Fragmentarium anyways, with lots of help from MB, just for fun ;) (it's actually really quite powerful) edit: btw, this lensflare code is so fast it has virtually no impact on rendertime :o Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on May 25, 2016, 09:28:28 AM I use Fragmentarium only for making fractals. I like fractals very much :) and nice visualization too. I am not interested in serious programming, just I don't have programming education. But I'm interested in improving of existing possibilities of this great program. Master Knighty had a great help, biggest thanks for all features. And Eiffie and Patryk and all programmers! :thanks1:
If some things can be done here in free soft, I don't need any other application for edit results. About "spray gun" - I do not like this effect ;D Title: Re: updating of DE-Raytracer Post by: Patryk Kizny on May 25, 2016, 12:25:18 PM I reiterate: these two things, DE vert+frag and buffershader vert+frag, are 2 separate programs executing independently But sharing same resource of a GPU which at least in my case always hits 100%. edit: btw, this lensflare code is so fast it has virtually no impact on rendertime Probably you're right on the performance. My point was that it's just all been done, is avail via established softwares where it can be used with more control. there is no reason at all why the whole thing can't be broken down into much smaller progs, each working on a specific part of the overall image, 1 for depth, 1 for color, 1 for ambient light, 1 for shadows etc etc etc, in fact, this is the way the GL pipeline is supposed to work, not all crammed into one prog, it just happens that the way Fragmentarium does this is convenient for us humans to manage, otherwise, a small change in one part might require big changes or a complete rewrite of other parts and this would be far beyond the patience threshold of most of the coders that are tinkering with Fragmentarium fragments, or perhaps it's more fun to just play and experiment instead of dedicating some serious time to recode the entire approach. This is interesting. I wonder how breaking that into many shaders would affect (improve) performance. I may assume it may not be profitable since you'd probably need to recalculate a bunch of things many times and a single frag anyways scales up on resources use full saturating GPU. So the advantage would be when you actually hit the limits of a single frag in terms of number of uniforms or just codebase. Actually, the thing you suggested is something I am already implementing in 'my' version of the raytracer and with help of Kamil implementing multiple render targets in Synthclipse. It's still sitting in one frag shader that calculates lots of information (including lighting passes) and writes to multiple output channels. Then Synthclipse saves these buffers to separate files, ultimately a layered EXR. So far so good. Title: Re: updating of DE-Raytracer Post by: 3dickulus on May 25, 2016, 02:18:14 PM I'll abandon Fragmentarium and start using synthclipse with "your" raytrcer right away 88)
Title: Re: updating of DE-Raytracer Post by: Patryk Kizny on May 25, 2016, 03:31:15 PM I'll abandon Fragmentarium and start using synthclipse with "your" raytrcer right away 88) Would be cool to have you cooperating on coding. I'm slow with this and missing good foundation. There's still a good range of todos in the code and things screaming for implementation. Title: Re: updating of DE-Raytracer Post by: 3dickulus on May 25, 2016, 08:20:13 PM as a moderator I don't think you should be discouraging experimentation, exploration and learning by hobbyists and artists :(
Quote Guys, I don't want to be taking fun away from you, but IMHO there's not much sense implementing all these effects in the (already overloaded) fragment shader as you have them with way better performance, options and control in majority of postproduction softwares (either for stills or film). No point doing it in frag unless you're hitting Vjing and live applications. I also find your exploitation of this venue and the talent here, for your own self promotion and benefit, to be somewhat distasteful, to such a degree that I am discouraged from adding or fixing anything else in the code and may not make my version available for you to exploit any longer, so you can go back to the original version by Syntopia, or use synthclipse, and add all the features you want, maybe even better, rewrite the entire thing from scratch to meet the modern GL environment. sorry man, just having a bad day and feeling a little grumpy, maybe will feel better tomorrow... @CJR I will have something for you after this weekend re:lensflare but will probably PM you the code rather than post it here :( btw PK the fragment shader and the buffer shader execute independently and don't interfere with each other, if the raytacer uses 100% GPU that's ok because the buffer shader uses 0% until the raytracer is finished (interleaved between subframes) Title: Re: updating of DE-Raytracer Post by: Patryk Kizny on May 25, 2016, 11:08:12 PM as a moderator I don't think you should be discouraging experimentation, exploration and learning by hobbyists and artists Sure. Didn't want it to sound that way. sorry man, just having a bad day and feeling a little grumpy, maybe will feel better tomorrow... Hopefully tomorrow will be better for you. Title: Re: updating of DE-Raytracer Post by: 3dickulus on May 27, 2016, 04:58:18 AM :embarrass: ok, I'm old and grumpy, but I still think you should give a bit more credit to all the shoulders you are standing on, it would help encourage more positive input. How long did it take you to become familiar enough with the equipment and code to produce a good presentation? Any Idea how many collective person hours of coding and schooling it took to get progs and frags to the current state? Were you able to do any of this stuff before stumbling onto FF? I'm not looking for fame or fortune, just sayin'...
I'm ok with what you do, some very cool stuff, and I do understand what it takes to produce those nice looking vids. (the questions are rhetorical and only intended to encourage some introspection) so some thoughts that are more on topic... 1 pass to generate depths from camera view 1 pass to generate depths from light position to the same target = 2 24bit depth buffers with 2 8bit mask buffers testing these for intersects gets used for ambient occlusion and shadows 1 pass to generate a normals buffer when generating depths no color buffer writing or lighting calculation is done on these first passes so should be reasonably quick hand this data off to a geometry shader to generate a mesh once the depth buffers are available (could be more than 2 for more light sources) the color and lighting would be very fast and could exploit some fancy GL features like global illumination, hardware anti-aliasing, texture application, normal mapping, instancing, etc... but, in reality, the whole thing (fragm) would need a complete rewrite/rethink and it would be better to start from scratch, or a modern framework, and keep the spirit of Fragmentarium at the heart of it... fractal exploration and freedom to play with the shader code. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on May 27, 2016, 11:08:28 AM New OpenGL fractal software?... Sounds cool! :dink:
I ask less of metaphysics, philosophy, rhetorical questions, and purely subjective evaluations Welcomed the new code, improve, improvements and new ideas, even crazy! Title: Re: updating of DE-Raytracer Post by: Patryk Kizny on May 27, 2016, 01:29:02 PM hand this data off to a geometry shader to generate a mesh once the depth buffers are available (could be more than 2 for more light sources) the color and lighting would be very fast and could exploit some fancy GL features like global illumination, hardware anti-aliasing, texture application, normal mapping, instancing, etc... Thinking aloud: Having access to all hardware-accelerated and built-in stuff sounds like a promised land. How would you think of generating geometry? Marchingcubes? No meshes generated for fractals that I've seen so far looked any good. To get good results you'd need to triangle detail comparable to pixel-scale (at least on a detail-rich regions) plus would be good to optimize sparser areas and add normal interpolation. This allows you tap into GL resources, but do we need triangles to do all the stuff you mention? What I mean is that when you have all the passes you can easily relight everything and render in compositing apps such as Nuke or Houdini (without triangulation). BTW, Nuke is free now for personal use with HD resolution cap. That's the direction I am heading now with the multi-target rendering and saving. If mesh generation makes sense, to me it would be a tempting approach to march a volume and create a full mesh, not only a frontal view. And this leads me to the other thing I had in mind - instead of triangulating everything, why not stay with pointcloud data and voxels? There are 3D textures available, not sure how much of use that would be. There's a range of good pointcloud visualization tools capable of rendering massive pointclouds very fast - for example Thinkbox Krakatoa. The only problem though is that so far there is no software capable of creating a fractal pointcloud with good point counts. I've played with latest XenoDream, but it's still only 32bit app, with huge memory limits and the biggest I was able to generate was about 50M points. Which is about 10 times too small to get a good level of detail. Title: Re: updating of DE-Raytracer Post by: 3dickulus on May 27, 2016, 02:34:09 PM I'm just one guy with no formal education in math, programming or OpenGL, this sort of thing, I imagine, would take an organized team of brilliance all dedicated to the same goal. Syntopia's initial idea and realization of it in Fragmentarium is one of those things that is worthy of pursuit. I have learned a great deal and can't say thankyou enough to these folks at FF.
all good questions PK thinking... Title: Re: updating of DE-Raytracer Post by: phtolo on May 28, 2016, 11:37:55 AM The only problem though is that so far there is no software capable of creating a fractal pointcloud with good point counts. You could try StyrofoamIFS, http://www.phtolo.se/fractals/ It's clunky and have no responsive interface, but it can create an arbitrary number of points. Title: Re: updating of DE-Raytracer Post by: Patryk Kizny on May 28, 2016, 02:11:03 PM You could try StyrofoamIFS, http://www.phtolo.se/fractals/ It's clunky and have no responsive interface, but it can create an arbitrary number of points. Thanks! How can I export points? Title: Re: updating of DE-Raytracer Post by: phtolo on May 28, 2016, 08:24:45 PM Thanks! How can I export points? I uploaded a new version now that will let you export as .xyz files, previously an internal format was used. There is now a export.scene file with the basic settings needed for this. The .xyz files can be found in the cache folder. Title: Re: updating of DE-Raytracer Post by: Patryk Kizny on May 28, 2016, 09:58:16 PM I uploaded a new version now that will let you export as .xyz files, previously an internal format was used. There is now a export.scene file with the basic settings needed for this. The .xyz files can be found in the cache folder. That's kind of you! Thanks! Will see how it works when I got a moment. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on May 30, 2016, 10:04:18 PM When i use two textures and normal for separation I got something like this:
(http://orig02.deviantart.net/97ad/f/2016/151/f/1/30_05_2016_1_by_crist_jroger-da4hozg.jpg) Code: vec3 TerrainColour(vec3 pos, vec3 normal) {How quickly get smooth transition between textures? I think it must be completely different way. Title: Re: updating of DE-Raytracer Post by: 3dickulus on May 31, 2016, 02:54:54 AM @Crist-JRoger :o O0
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on May 31, 2016, 01:32:31 PM Here http://www.iquilezles.org/www/articles/terrainmarching/terrainmarching.htm talking about smooth functions for coloring. And Patryk Kizny in his material blender (http://www.fractalforums.com/index.php?topic=22130.msg92819#msg92819) talks about it.
How blend two textures? I get a multiplication or addition of color and brightness :sad1: upd.: I'll search the answer by myself, but very glad any help. Title: Re: updating of DE-Raytracer Post by: SCORPION on May 31, 2016, 03:42:27 PM Сергей, выложи код полностью, пожалуста...
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on May 31, 2016, 03:59:11 PM Сергей, выложи код полностью, пожалуста... Привет! Этот способ не подходит для плавного перехода.Title: Re: updating of DE-Raytracer Post by: 3dickulus on June 01, 2016, 02:53:36 AM Попробуйте это ... это делает то, что вы хотите ?
Code: vec3 TerrainColour(vec3 pos, vec3 normal) модифицированный: ^ ^ ^ rgb + это показывает различные области наклона с помощью красной и зеленой текстурой Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on June 01, 2016, 07:16:16 AM Not exactly... I mean smooth soft blend from one texture to another
Ideally - something like this (https://unionassets.com/blog/mixing-textures-of-the-landscape-194) :embarrass: Title: Re: updating of DE-Raytracer Post by: 3dickulus on June 01, 2016, 02:14:47 PM good for game realism but has no impact on exploring fractals, nice eye candy though.
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on June 01, 2016, 02:18:10 PM This is for terrain surface. I found great example link (http://www.dhpoware.com/demos/glslTerrainTexturing.html)
Title: Re: updating of DE-Raytracer Post by: Patryk Kizny on June 01, 2016, 04:20:27 PM @Crist-JRoger
That looks awesome. I have recently implemented another thing that may be of interest to you - a falloff map. That is essentially mixing two different materials proportionally to a dot product of view and normal direction. I did it to mix two different materials, but even with a color it's totally cool. You can spot it in some of the fractals in Lifeline (http://www.fractalforums.com/film-b267/lifeline/). Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on June 01, 2016, 04:52:25 PM Yes I am interested. If you will show how change color with height changing, I will be very grateful. For simple example - white at the top and black at the bottom, with smooth transition 88) I looked at parts of code you posted in your topic, but didn't understand how you use smooth function.
Title: Re: updating of DE-Raytracer Post by: SCORPION on June 02, 2016, 04:49:00 AM Сергей, вот какое интересное дело - по моему, наши друзья не могут понять, что мы от них хотим, хотя могли бы спокойно реализовать идею.
Я прекрасно понимаю, что ты хочешь сделать, да ума не хватает реализовать... Вот такой парадокс.... Ну вот же Патрик как сделал переход: http://www.fractalforums.com/fragmentarium/patryk-kizny-raytracer-updates/msg92821/#msg92821 Я попробовал сделать через Code: float smin(float a, float b, float k) {картинка без цвета и плавного перехода нет... Вот так цвет есть, но плавного перехода нет всё равно. Code: vec3 smin( vec3 a, vec3 b, vec3 k) Блин, как Патрик то сделал? :hmh: Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on June 02, 2016, 10:45:29 AM In search of texturing techniques i found that post (http://www.iquilezles.org/www/articles/texturerepetition/texturerepetition.htm) Very interesting method. Both techniques works well!
another quick render on intel gpu (http://img10.deviantart.net/6f75/i/2016/154/0/f/2texture_terrain_simple2__by_crist_jroger-da4t6c3.png) (http://orig11.deviantart.net/19d6/f/2016/154/6/a/2texture_terrain_simple2__by_crist_jroger-da4t6c3.png) Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on June 07, 2016, 06:29:28 AM Rendered on amd radeon. Used part of terain generator - iq3d noise. Thank to Patryk for this crazy terrains )
(http://pre06.deviantart.net/43b6/th/pre/f/2016/156/b/f/uncharted_by_crist_jroger-da55mp9.jpg) (http://orig08.deviantart.net/fb1e/f/2016/156/b/f/uncharted_by_crist_jroger-da55mp9.jpg) Title: Re: updating of DE-Raytracer Post by: DarkBeam on June 22, 2016, 12:44:11 PM an earth golem? O0
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on June 22, 2016, 07:21:02 PM No ) Just an idea for soaring islands.
Title: Re: updating of DE-Raytracer Post by: Max Sinister on June 22, 2016, 09:42:57 PM @Crist-JRoger: The image from early June is very nice - looks almost natural.
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on September 24, 2016, 04:40:31 PM Max Sinister, Thank you! )
Decided to add some features for DE, like PK mod, but more "textured", working process goes very slowly without GLSL basics. Maybe soon I will have version for sharing... it will be slower monster for good GPUs :D This features works well: - terrain with switch (cnoise, IQ, mixed); - terrain multitexturing (2 modes); - terrain heightmapping; - IBL mode for terrain/floor; - main object multitexturing (6 modes); - background equirectangularMap picture; - background sky; - water surface; Material gloss from PK still works not so good. Now testing renders, basically environment: (http://orig10.deviantart.net/d854/f/2016/268/8/5/01_by_crist_jroger-daitc5j.jpg) (http://orig10.deviantart.net/d854/f/2016/268/8/5/01_by_crist_jroger-daitc5j.jpg) Title: Re: updating of DE-Raytracer Post by: knighty on September 24, 2016, 06:55:45 PM :thumbsup1:
Title: Re: updating of DE-Raytracer Post by: Sabine on September 24, 2016, 07:47:44 PM Crist-JRoger (http://st.deviantart.net/emoticons/f/faint.gif)(http://st.deviantart.net/emoticons/f/faint.gif)(http://st.deviantart.net/emoticons/f/faint.gif) Fantastic work! :beer:
PS. I have a very nice gpu :dink: Title: Re: updating of DE-Raytracer Post by: 3dickulus on September 24, 2016, 08:39:38 PM that looks really good! bravo!
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on November 05, 2016, 09:28:59 PM Finally :snore: http://sta.sh/013fhfwazcd4 renderer with presets and some textures
Not optimized and not tested on hard settings :-X Title: Re: updating of DE-Raytracer Post by: Sabine on November 06, 2016, 12:03:05 AM :beer: :beer: :beer:
(http://st.deviantart.net/emoticons/w/worships.gif) Beautiful effects! Will need much more time to explore, but want you to know: runs great on my gpu! And Fast! Hardly any difference with other very simple .frags. Will see how it does with .frags that eat more resource :) Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on January 16, 2017, 10:15:55 PM On some renders i noticed that godrays doesn't reflects on surfaces (fractal or floor), and i thought it has been "conceived" ) or characteristic of DE renderer.
But now tested, see that rays are reflected! Sometimes ;D sometimes not, or when reflNumb=2 second reflection sotronger than first. Master Knighty, could you explain this? :embarrass: Title: Re: updating of DE-Raytracer Post by: lycium on January 17, 2017, 04:16:48 AM I'm not Master Knighty, but I do work on a commercial unbiased ray tracer (http://indigorenderer.com/), so I'll drop my 2c here :)
The root cause is the famous "problem of insufficient techniques (http://graphics.stanford.edu/papers/veach_thesis/)" in path tracing, and it can be explained roughly as follows: say you're at some point in space, and you want to know how much light is coming in from all directions; for the direct (unreflected) light, you can make quite a good guess by picking directions that go directly towards the light sources. So that's nice, you can quite accurately match the distribution of incoming light, and you get a reasonably low variance Monte Carlo estimator. However, for once-, twice-, ... n-times bounced light, the problem is much more difficult: how can you know in which directions to send rays, so that they will reflect off some surface and happen to go through the little holes in the "ceiling" to reach the light source? The answer is that you can't, in general, and although there are methods like Metropolis Light Transport (http://indigorenderer.com/features/MLT) which improve the efficiency using Markov Chain Monte Carlo to explore similar paths once one is found, it doesn't help you efficiently find them in the first place. So, in order to have volumetric caustics, you'd need to solve this famous unsolved problem in computer graphics, and I read somewhere that it's very unlikely to be solved, because you can make optical computers, and knowing whether light paths go a certain way a priori is basically equivalent to solving the famous Halting Problem (https://en.wikipedia.org/wiki/Halting_problem). Now, Knighty is clearly one hell of a wizard, but I doubt even he can solve this problem... so the practical alternatives are: have extreeeemely noisy renders with reflected caustics (sampling all directions uniformly, with very low efficiency / actual light-carrying paths), or simply exclude the effect. Knighty chose the latter, more workable, alternative, so that you don't have tons of noise in every render. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on January 17, 2017, 09:36:27 AM Thank you, master Lyc :dink:
I think I never understood this without appropriate education. I just began ratiocinate: here on this example we have lightsource and enabled vol.light with godrays that shines in all directions. Than we have obstacle - fractal with holes. The ray enters and reaches the next obstacle - surface. That's all, it works. So then we enable reflections (1 step) ans we see all objects reflected. Our lightray reflects too at the same angle as reached the surface. I'm not meaning that lightray will reflect from surface and goes again in space (it sounds fantastic for free soft). I mean just displaying ray on reflecting surface (1st and 3rd pictures on prev.post). But(!) sometimes lightrays not reflected (2nd pic). So, one reason that we see differents - camera was mooved or FOV was changed. You wrote why this (really this? or it was about caustic effects?) is happening in a global sense, but as i know DE-Kn renderer is not Monte Carlo. I do not like to operate with concepts that unclear to me. And very interested to know something new. Ironically... a man without special education or programming skills started this topic ^-^ Title: Re: updating of DE-Raytracer Post by: lycium on January 17, 2017, 10:06:50 AM You wrote why this (really this? or it was about caustic effects?) is happening in a global sense, but as i know DE-Kn renderer is not Monte Carlo. I do not like to operate with concepts that unclear to me. And very interested to know something new. There is definitely integration: the god rays are done by integrating the incoming light along a viewing ray times by the transmission. This is done by something like normal quadrature (like you learn in high school, with many "boxes" of small size approximating the area under the curve), and probably a little random offset to make sure it converges properly, then it becomes a little Monte Carlo like. But for the higher-order light scattering, like when you want to know how much light reaches the current point *including* paths that have been reflected off the ground, then you have to integrate over all directions, since as mentioned you can't easily know a priori which directions will definitely lead you to the light source.The usual way to do this integral is Monte Carlo, since it'll take quite a lot of samples in total to get a clean result, and it doesn't suffer from the so-called "curse of dimensionality": if you use some # of samples to estimate the incoming light from all directions, let's say 4 (very low quality estimate), then for 1 bounce you need 4 samples... manageable... but then for 2 bounces you need 16, then 64 for 3 bounces, etc. It quickly gets out of control and you spend so much time in these higher bounces (which usually contribute much less than the lower bounces) that it becomes very inefficient. This by the way is why path tracing is called path tracing: it is non-recursive, tracing only a single path at a time without exploding exponentially. There's a classic diagram from the original 1986 paper by James Kajiya on the Rendering Equation illustrating it (attached to this post). Ironically... a man without special education or programming skills started this topic ^-^ Unfortunately I didn't even finish a normal university degree, and got an E for mathematics at the end of high school :/ As Mark Twain said, and I am fond of repeating, "I have never let my schooling interfere with my education."Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on January 17, 2017, 10:51:59 AM You try to say that we don't know about existence of light rays on reflective surface? But they exists ))) here:
Title: Re: updating of DE-Raytracer Post by: lycium on January 17, 2017, 10:59:53 AM Hmmm, might be that we're thinking of a different problem. Attached is what I meant: at the point p, you have to choose a direction which will reflect off the ground and go through the small "window" to reach the light source.
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on January 17, 2017, 11:06:04 AM Oh, no no no ) i specifically drew attention to this:
I'm not meaning that lightray will reflect from surface and goes again in space (it sounds fantastic for free soft). I mean just displaying ray on reflecting surface (1st and 3rd pictures on prev.post). But(!) sometimes lightrays not reflected (2nd pic). So, one reason that we see differents - camera was mooved or FOV was changed. Title: Re: updating of DE-Raytracer Post by: lycium on January 17, 2017, 11:08:38 AM Ah sorry, should have paid more careful attention :-X
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on January 17, 2017, 11:23:52 AM It's ok. So, that's why question to Knighty, he wrote this ) Based on Kali's vol.light, but he lost somewhere...
If you could sort out in DE-Kn2.frag, will be great ) Title: Re: updating of DE-Raytracer Post by: knighty on January 18, 2017, 12:04:05 PM It is very simple. :D
There is a rather dumb "optimisation" that causes bright features to be not reflected at all: In DE-Kn*.frag, in color() function, about the end you have this test: Code: if (hitNormal == vec3(0.0) || dot(RWeight,RWeight)<0.0001 || lighthit || Ray.Pos>=MaxDistance) {//nothing hit or light hit or reflected light is too smallCode: ... dot(RWeight,RWeight)<0.0001 ... In some way, it is related to what lycium was explaining: It is very difficult (if possible) to say in advance how much light a ray carries. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on January 18, 2017, 12:41:10 PM Code: ... dot(RWeight,RWeight)<0.0001 ... As i remember you wrote this for good reason. Black dots or some optimisations... Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on January 18, 2017, 05:51:07 PM Looked. Not helps. Maybe another reason for this behavior? Straight ray on first plane, but behind in reflection :-
Attached frags. Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on January 20, 2017, 12:35:19 PM Found some way to go (maybe good results). Added line
Code: colfogglow+=ptLightGlow1(prevPos, curPos); Code: #ifdef KN_VOLUMETRIC upd.: I think (3) it's a reflection on the ceiling :embarrass: upd.2: This looks better. Am i on a right way? :-X :- :-X :hmh: Code: colfogglow+=ptLightGlow1(prevPos, curPos); Title: Re: updating of DE-Raytracer Post by: knighty on January 20, 2017, 05:45:09 PM OK, sorry! my bad. It is a bug that was really hard to spot. Thank you for reporting it.
Code: #ifdef KN_VOLUMETRIC "fogstrata" have to be set to 0 at each reflexion. Otherwise, in ptLightGlow3(p0,p1) the sample points won't be completely inside the segment (p0,p1). Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on January 20, 2017, 07:44:26 PM Thank you! Great render and nodody saw this bug until recently :embarrass:
Title: Re: updating of DE-Raytracer Post by: Sabine on January 20, 2017, 07:53:30 PM :beer: :beer: :beer:
Thank you for solving this, Knighty, works like a charm now as far as I can see! And well-spotted, C-JR! Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on January 23, 2017, 09:04:53 AM Interesting effect when add random to hitNormal in reflection formula :)
(http://orig03.deviantart.net/604f/f/2017/022/0/9/material_smooth_bmp_files_by_c_jr-dawba3o.png) Title: Re: updating of DE-Raytracer Post by: Tim Emit on January 24, 2017, 09:45:20 AM @ Crist Someone dropped all their paper notes and those kindly god rays are lighting up where they are : )
Title: Re: updating of DE-Raytracer Post by: Crist-JRoger on January 24, 2017, 11:28:49 AM Like this? )
Only vol.light and reflections Title: Re: updating of DE-Raytracer Post by: 3dickulus on January 28, 2017, 08:44:54 AM Icecapades? |