Logo by Pauldelbrot - Contribute your own Logo!

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

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

this forum will stay online for reference
News: Follow us on Twitter
 
*
Welcome, Guest. Please login or register. March 29, 2024, 01:25:38 PM


Login with username, password and session length


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


Pages: 1 ... 14 15 [16]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: updating of DE-Raytracer  (Read 36391 times)
Description: adding features in DE-raytracer: volumetric light, kaliset3d, clouds...
0 Members and 1 Guest are viewing this topic.
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #225 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.
Logged

lycium
Fractal Supremo
*****
Posts: 1158



WWW
« Reply #226 on: January 17, 2017, 11:08:38 AM »

Ah sorry, should have paid more careful attention lips are sealed
Logged

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



WWW
« Reply #227 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 )
Logged

knighty
Fractal Iambus
***
Posts: 819


« Reply #228 on: January 18, 2017, 12:04:05 PM »

It is very simple.  cheesy
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 small
break;
}
The problem comes from:
Code:
... dot(RWeight,RWeight)<0.0001 ...
The solution should be to remove that condition or to set the right hand side to a (much) smaller value.
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.
Logged
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #229 on: January 18, 2017, 12:41:10 PM »

Code:
... dot(RWeight,RWeight)<0.0001 ...
Thank you! )
As i remember you wrote this for good reason. Black dots or some optimisations...
Logged

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



WWW
« Reply #230 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.



* 2017-01-18_193818.jpg (86.5 KB, 488x504 - viewed 495 times.)
* gr_refl_issue.bmp Files.zip (17.45 KB - downloaded 248 times.)
Logged

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



WWW
« Reply #231 on: January 20, 2017, 12:35:19 PM »

Found some way to go (maybe good results). Added line
Code:
colfogglow+=ptLightGlow1(prevPos, curPos);
here
Code:
#ifdef KN_VOLUMETRIC
if(HF_Scatter*(HF_Intensity+HF_Const)>0.){
vec3 colfogglow=vec3(0.);
for(int j=0;j<HF_FogIter;j++) {
colfogglow+=ptLightGlow1(prevPos, curPos);
colfogglow+=ptLightGlow3(prevPos, curPos);
}
col0+=colfogglow*1./float(HF_FogIter);//ptLightGlow1(prevPos, curPos);
}
#endif
So there is more rays on reflection, but still missed pieces (1,2) and excess rays too (3)
upd.: I think (3) it's a reflection on the ceiling  embarrass

upd.2: This looks better. Am i on a right way?  lips are sealed :- lips are sealed  huh?
Code:
colfogglow+=ptLightGlow1(prevPos, curPos);
colfogglow+=ptLightGlow1(prevPos, curPos);
colfogglow+=ptLightGlow3(prevPos, curPos);



* fixed...or.jpg (123.36 KB, 450x640 - viewed 498 times.)
* fixed...or.bmp Files.zip (17.57 KB - downloaded 250 times.)
« Last Edit: January 20, 2017, 01:36:24 PM by Crist-JRoger » Logged

knighty
Fractal Iambus
***
Posts: 819


« Reply #232 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
if(HF_Scatter*(HF_Intensity+HF_Const)>0.){
fogstrata=0;// <<<---- ADD THIS
vec3 colfogglow=vec3(0.);
for(int j=0;j<HF_FogIter;j++) colfogglow+=ptLightGlow3(prevPos, curPos);
col0+=colfogglow*1./float(HF_FogIter);//ptLightGlow1(prevPos, curPos);
}
#endif

"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).
Logged
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #233 on: January 20, 2017, 07:44:26 PM »

Thank you! Great render and nodody saw this bug until recently  embarrass
Logged

Sabine
Fractal Fertilizer
*****
Posts: 373



WWW
« Reply #234 on: January 20, 2017, 07:53:30 PM »

 A Beer Cup A Beer Cup A Beer Cup

Thank you for solving this, Knighty, works like a charm now as far as I can see! And well-spotted, C-JR!
Logged

sabine62.deviantart.com
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #235 on: January 23, 2017, 09:04:53 AM »

Interesting effect when add random to hitNormal in reflection formula  smiley
 
Logged

Tim Emit
Conqueror
*******
Posts: 111



https://www.facebook.com/
WWW
« Reply #236 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 :  )
Logged
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #237 on: January 24, 2017, 11:28:49 AM »

Like this? )
Only vol.light and reflections

* Night.bmp Files.zip (17.63 KB - downloaded 242 times.)

* Night.jpg (111.46 KB, 600x400 - viewed 511 times.)
Logged

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



WWW
« Reply #238 on: January 28, 2017, 08:44:54 AM »

Icecapades?
Logged

Resistance is fertile...
You will be illuminated!

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


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

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