Title: Orbit Trap in GI frag Post by: vinz on June 09, 2013, 06:52:55 AM HI,
Hahaha ;D, I finally succeded to integrate the IFS icosahedron into the fragmentarium GI script from Eiffie ( eiffieGI2.zip ) This is an absolutely wonderfull rendering engine script and enough fast, that i would like to make it more usable for creating. found in this thread: http://www.fractalforums.com/fragmentarium/inigo-quilez's-brute-force-global-illumination/15/ now, i would like to request some help in order to add the "orbit trap" algorithm to give a diffuse color to the fractale generated. Someone could help me ? :embarrass: Title: Re: Orbit Trap in GI frag Post by: vinz on June 10, 2013, 06:28:13 AM OK, i've added this code from the De-raytracer.frag
Code: //Orbit trap Add--------------------------------------- And Also Modified the getMaterial function in GI frag. Code: material getMaterial( in vec3 z0, in vec3 nor, in float item ) It Seems to work ! but not sure that is implemented correctly ( as i've almost no programming skills ), i need more try. to check if color are stable during camera move. here my first test ( not exceptionnal shape , but imo the Gi does a great job at reasonable Time ( 2436 x 1683 @ 1000 subsamples in 25 mins. ). (http://img189.imageshack.us/img189/9936/1stgitest.jpg) Title: Re: Orbit Trap in GI frag Post by: cKleinhuis on June 10, 2013, 11:34:14 AM congrats ;)
Title: Re: Orbit Trap in GI frag Post by: vinz on June 10, 2013, 12:06:45 PM Thanks for your support cKleinhuis , i'm learning a lot :D
I also found a strange behaviour in the Eiffie GI Script : i've desaturated all ojects colors (menger,bulb,floor) and put to Sky color and Sun color to black, and as you can see there are false colors instead of grey result :/ so the color i use are also false when then Scene become dark... i hope eiffie will have time to check that. (http://img32.imageshack.us/img32/5343/screenshot1006201312005.jpg) (http://imageshack.us/photo/my-images/32/screenshot1006201312005.jpg/) Title: Re: Orbit Trap in GI frag Post by: vinz on June 10, 2013, 03:01:24 PM HAHAHAH ! i am super over happy ... this render engine script is a jewell ... finaly found how to disable skylight. for Hi Contrast scene.
here my 3rd try , the Alien Stone Head :D 1166 x1442 @1000 subsamples in 14 mins (http://img38.imageshack.us/img38/5442/3stgitest.jpg) (http://imageshack.us/photo/my-images/38/3stgitest.jpg/) Title: Re: Orbit Trap in GI frag Post by: cKleinhuis on June 10, 2013, 03:07:17 PM those gi renderer produce amazing results, have you read the thread completely ?
they where even examples for translucent objects discussed, which is quite easy to achieve the last pic really looks photorealistically, but a few more render steps wouldnt be bad ;) Title: Re: Orbit Trap in GI frag Post by: vinz on June 10, 2013, 03:20:34 PM Yes yes, glass and transludent material are already implemented in the script i'll give a try more carefully.
you're completly right , this last picture need more samples especially regarding the floor, but it was just a draft try ... anyway, as fragmentarium is limited to 2000 subframes. i think, it will be easy to reach this limit especially on low light scene. Thanks for your feedback cKleinhuis :dink: :beer: Title: Re: Orbit Trap in GI frag Post by: Syntopia on June 10, 2013, 09:10:51 PM Looks great, Vinz!
And you are right, the 2000 limit should be removed! Title: Re: Orbit Trap in GI frag Post by: vinz on June 10, 2013, 10:19:03 PM Thanks you Syntopia :dink: your software is magic to me :beer: :beer: :beer: :beer: :beer: :beer: :beer: :beer:
Title: Re: Orbit Trap in GI frag Post by: cKleinhuis on June 10, 2013, 10:32:53 PM perhaps a good time ... to ask fooooor .... the next updaaaate?
lol, recently i was just in front of downloading the github project to fiddle some parameter animations into it, like apply a simple sine wave to various parameters, this is important because animating inside the script blows up the script, and might lead to too big scripts, and furthermore self animation using the time variable gets quite messy over the time ... :( the amount of ready available scripts for the system is the winner for it aaargh, when will i have the time to start my GPU based renderer getting rid of self-typing ... :) Title: Re: Orbit Trap in GI frag Post by: vinz on June 10, 2013, 10:57:48 PM Animating options would be great ! also why not a simple interpolations , between multiple presets ^^ ... :D
YEs, cKleinhuis, i would be glad to #include a "CK-raytracer.frag" into some scripts, i'm sure it would be an Amaizing renderer with fractal stochastique estimation optimisations hahaha ( soorrry my bad i dunno about what i'm spreaking). :hurt: Title: Re: Orbit Trap in GI frag Post by: cKleinhuis on June 10, 2013, 11:06:50 PM my plan is not to write fragmentarium scripts ;) i would rather like to write a OPENCL raytracer for DE objects ( including fractals and HYBRIDS! )
Title: Re: Orbit Trap in GI frag Post by: vinz on June 10, 2013, 11:11:53 PM HA !!! BIG Project with Hybrids :D ... I really hope you'll find the time to Make a such nice project ! i'm volunteer to be beta tester ;)
Title: Re: Orbit Trap in GI frag Post by: eiffie on June 11, 2013, 04:35:29 PM I'm assuming the false color was coming from the skyColor but I will look into it - haven't used that script in a while - like your results! I know there are some mistakes in the color transport so maybe I will give the script another try.
Title: Re: Orbit Trap in GI frag Post by: vinz on June 11, 2013, 04:56:21 PM Hi Eiffie i've just found the problem
i had to correct skycolor+rd*0.1 to skycolor... i removed the last part i assume it was added to add a kind of gradient. Eiffie thanks you very much for THIS SCRIPT, please keep a little time to improve it if you can ! GI is really beautifull ! :D :beer: :beer: :beer: :beer: :beer: :beer: :beer: (http://img194.imageshack.us/img194/8784/skypv.jpg) (http://imageshack.us/photo/my-images/194/skypv.jpg/) Eiffie i've few questions: 1. i've added a second light by modifying this code : Code: float mapL(in vec3 z){//this is the DE for emissive light (use folding etc. to create multiple lights)but as light is duplicated i dunno how to specify a new color for the emissive light , they share the same color ! can u gimme a clue ? 2. Probably it's the engine that work like that but i've found that de diffuse color affect the specular reflexion , normally when an object is fully reflective the diffuse color don't do nothing. here if the diffuse color is darker the object is losing reflections and specularity. Ps: Eiffie, i'm working on the EiffieGI.frag version 120 , i assume that it was your lastest.(let me know if i'm wrong) Thanks u :D Title: Re: Orbit Trap in GI frag Post by: eiffie on June 11, 2013, 06:20:30 PM 1. Since lightColor is a uniform it can't be changed so add a variable called emColor and change it in your mapL function depending on which light is closer. Then near the end of the scene() routine there is a line like:
else tcol=lightColor/... change it to else tcol=emColor/... but be warned adding lights like this will have some new strange effects (maybe some good ones). 2. Yes those are some of the issues I would like to fix and to add the correct selection of diffuse or spec lighting. Title: Re: Orbit Trap in GI frag Post by: vinz on June 11, 2013, 07:33:38 PM Thanks For your Help Eiffie
i'm not sure how to do this:"change it in your mapL function depending on which light is closer" as you can imagine there is 90% of the script that i don't understand this is the first time that i code something hahaha :embarrass:... EDIT: HAHAHAHAH,i've found something , not shure if it's correct but it works ^^ :D Code: float p; (http://img41.imageshack.us/img41/5450/screenshot1106201320313.jpg) (http://imageshack.us/photo/my-images/41/screenshot1106201320313.jpg/) Title: Re: Orbit Trap in GI frag Post by: eiffie on June 11, 2013, 08:52:22 PM Well whatever works! I meant like this:
float d=length(z-lightPosition)-lightSize; float d2=min(d,length(z-lightPosition2)-lightSize2); if(d2==d)emColor=lightColor else emColor=lightColor2; Now that I look at it I guess it would make more sense to only do this once in getEmissiveDir not in mapL. And I'm glad your learning some coding - I knew there was a reason for my sketchy coding :) Title: Re: Orbit Trap in GI frag Post by: vinz on June 11, 2013, 09:04:08 PM HA! Great Thanks Eiffie ... i'm going to do That !
Quote I knew there was a reason for my sketchy coding Hahah, i always dream to understand how render engine works, but i've no mathematical neither programming background,with fragmentarium i found a door, to learn both ( also trying to learn ;) ) with the speed of the gpu hahahaha ! ... the idea to render my own fractal on a render engine that i can custom is simply enormous!!!!! ... and as i love Pathtracing and Gi ^^ your "sketchy" code is a gold mine :D Edit : it works perfectlyThanks Eiffie Code: vec4 getEmissiveDir( in vec3 pos) Title: Re: Orbit Trap in GI frag Post by: vinz on June 12, 2013, 11:22:52 AM Hi
i'm trying to add a spherical map as sky texture, i've tried for few hours , now i've lost hope. here some code i've tryed: 1. this code seems working well in all others frags that use spherical image, as the dir variable is defined in the 3d.frag it seems i can use it. but the result a brown sky. Code: vec2 spherical(vec3 n) {Code: if(UseBackgroundPicture){i've also used Code: if(UseBackgroundPicture){(http://img18.imageshack.us/img18/41/screenshot1206201311185.jpg) (http://imageshack.us/photo/my-images/18/screenshot1206201311185.jpg/) it give a better result but the background is not aligned properly. i also tryed a lot of other things and conversions functions cartesian to spherical to cartesian etc... nothing to do ! do you have any clue ? Many Thanks !!!!!!!!!!!!!!! Edit: i used the equirectangular camera in this screenshot, so i think i should have the equirectangular background if everything is fine. i should have something like that : Code: if(UseBackgroundPicture){(http://img826.imageshack.us/img826/5082/screenshot1206201311334.jpg) (http://imageshack.us/photo/my-images/826/screenshot1206201311334.jpg/) Title: Re: Orbit Trap in GI frag Post by: vinz on June 12, 2013, 11:54:05 PM HAHAHAHAHA! i've just found empiricaly that with using the rd variable the background needed a rotation of 90° around x axis,
After a lot of search i've for the first time understood how the rotating matrix work ! Excellent :D so the code is now Code: if(UseBackgroundPicture){here the result hehehe ! (http://img27.imageshack.us/img27/2397/screenshot1206201323484.jpg) (http://imageshack.us/photo/my-images/27/screenshot1206201323484.jpg/) (http://img829.imageshack.us/img829/5607/screenshot1206201323551.jpg) (http://imageshack.us/photo/my-images/829/screenshot1206201323551.jpg/) Pfiou that was not easy !! :beer: :beer: :beer: :beer: :beer: :beer: to me and myself :D Title: Re: Orbit Trap in GI frag Post by: cKleinhuis on June 13, 2013, 12:08:58 AM rofl have fun dude :D congrats!
Title: Re: Orbit Trap in GI frag Post by: vinz on June 13, 2013, 12:13:43 AM Hahahaha ! cKleinhuis :embarrass: .... don't laugh at me i never imagine that i was able to do that :D
Thanks for supporting me in this road plenty of fractal traps :hurt: Title: Re: Orbit Trap in GI frag Post by: cKleinhuis on June 13, 2013, 12:55:19 AM i do not laugh at you, i am enjoying that you are having fun!!!
actually this is exactly the feeling when i see that someone has learned something and is having fun with it! Title: Re: Orbit Trap in GI frag Post by: vinz on June 13, 2013, 01:04:27 AM Hehe ! you're are seeing the little padawan with the eyes of the master Yoda ;)
i am aware of your wisdom .... :D edit: hahaha i'm a navigator now ^^ Title: Re: Orbit Trap in GI frag Post by: hgjf2 on June 13, 2013, 11:47:38 AM Nice image effect like in site WWW.PAULBOURKE.NET at chapter "images" and chapter "domes" where is many stereos images and effects.
:peacock: :thumbsup1: Title: Re: Orbit Trap in GI frag Post by: eiffie on June 13, 2013, 06:21:06 PM OK vinz I updated the eiffieGI2.zip script in the other thread and now a black object will still have specular reflections.
The only change is in the scene function so you should be able to plop that in your script. Title: Re: Orbit Trap in GI frag Post by: vinz on June 13, 2013, 06:28:26 PM YeaHHHHHHHH !!! Thanks you very much Eiffie for taking the time to improve your Script and sharing it ... Excellent :o, you made my Day :D
and i will have some new clues to understand how the script work... Title: Re: Orbit Trap in GI frag Post by: vinz on June 13, 2013, 06:47:28 PM Nice image effect like in site WWW.PAULBOURKE.NET at chapter "images" and chapter "domes" where is many stereos images and effects. Hey Hgjf2 , i dind't found what you spoke about :/ Title: Re: Orbit Trap in GI frag Post by: vinz on June 13, 2013, 09:24:11 PM Eiffie,
i've just finished adding your new code , and it works very well. it was not easy as i thought, because you have modified a lot of function outside the scene one :D. i've found a new strange behaviour, at first i though it was my bad code. but i obtain the same result on the lastest version of the script. in fact when i switch off all the light in the scene (emissive,sky,sun etc...) and then i increase the gamma and brigthness the scene appear to be lighten! .. i'm asking to myself where does this light come from. (http://img10.imageshack.us/img10/3158/screenshot1306201321161.jpg) (http://imageshack.us/photo/my-images/10/screenshot1306201321161.jpg/) Title: Re: Orbit Trap in GI frag Post by: eiffie on June 14, 2013, 12:22:11 AM Oh your right, my bad, forgot about the powDir function etc.
Possibly the ambient term provides this light - I will look into it later. Thanks. Title: Re: Orbit Trap in GI frag Post by: vinz on June 14, 2013, 01:25:31 AM You're Super Kewl Eiffie , but i don't want to bother you with details ...
I just have a question, is it possible to make my object emiting light regarding the power of the color ? i know that i can pout a -2 value to my object, but it become completly white ... i'm looking something more like that ... it was the result of multiplicating the the result is interesting, but i'm pretty sure that i can achieve a beter result in a more regular way! ... i was also suprised to see that the diffuse color can give a result like that ! funny ^^ (http://img534.imageshack.us/img534/8084/screenshot1406201301244.jpg) (http://imageshack.us/photo/my-images/534/screenshot1406201301244.jpg/) Title: Re: Orbit Trap in GI frag Post by: eiffie on June 14, 2013, 06:38:17 PM Yes it is the "ambience" variable which is just a hack to add light particularly to translucent objects so they glow with an inner light.
This script isn't really designed for variable intensity of emitted light so not sure of the best way to add it. I have done that in other scripts (simply changing the color of the emitted light) but wasn't happy with the result - it was too unrealistic as the color of the light needs to blend as you move away from the object. You are right you can just give it the -2.0 id and then adjust the lightColor much darker. It shouldn't be pure white then. You will need to change the lightColor based on the orbitTrap. I am working on an unbiased version - one that doesn't cheat towards the light. It will use volumetric light sources which could then have different colors at different locations but then you will have to figure out how to change your DE to a LightEnergy check. - lol more on that later Title: Re: Orbit Trap in GI frag Post by: vinz on June 14, 2013, 08:19:57 PM Thanks for the clues i will give some Tries...
I am working on an unbiased version - one that doesn't cheat towards the light. It will use volumetric light sources ... WOAW !! :D :D :D :D :D :D :D :beer: :beer: :beer: :beer: I'm totaly Mind Blowed by what you're able to do ! Title: Re: Orbit Trap in GI frag Post by: vinz on June 14, 2013, 10:44:59 PM HAHAH! It Works !! :D .... :thanks1:
i've put the Icosa id to -2 and modified the line : else tcol=getColorOrbit()/max(lStrength*erl*erl,0.5);//we hit a DE light so make it bright! 1.- How can i Had bloom like for emitters ? 2.-there is strange behaviour because the light projecttion on the floor is depending on the sun position :o ( but it's fun ^^) (http://img94.imageshack.us/img94/6841/o8zh.jpg) (http://imageshack.us/photo/my-images/94/o8zh.jpg/) Same with Dof !! Excellent ^^ (http://img826.imageshack.us/img826/3320/vrd9.jpg) (http://imageshack.us/photo/my-images/826/vrd9.jpg/) :o (http://img824.imageshack.us/img824/2742/u1co.jpg) (http://imageshack.us/photo/my-images/824/u1co.jpg/) Title: Re: Orbit Trap in GI frag Post by: vinz on June 20, 2013, 10:49:55 AM Hi :D !!!
I've hard time to create nice metal material. -> I would like to add some fresnel reflection and also control the specular color of material ! i'm requesting any help available to do this ... as always i will try to do it by myself, but i'm pretty sure it will be an exotic mess (if i succeed :hurt:) , like all modifications i've already done until now ^^ THANKS !!!!!!!! Title: Re: Orbit Trap in GI frag Post by: vinz on June 20, 2013, 05:38:10 PM Hahahaa Ok, :dink:
so i wasn't able to add a fresnel reflection, but i found the way to make a falloff map on the reflection and also on color ! .... that make a nice effect. :D i added ... Code: coef = dot(nor,rd)-Falloff; in the same way with color: Code: m.color = mix( FalloffColor, BaseColor, (1-coef)); Title: Re: Orbit Trap in GI frag Post by: eiffie on June 20, 2013, 07:38:24 PM I almost prefer hacks to physical equations as they are easier to control artistically. Nice job!
Title: Re: Orbit Trap in GI frag Post by: vinz on June 20, 2013, 07:48:01 PM Thanks you Eiffie ^^, glad to see that you are following , my adventure into the modding of your nice Gi renderer :beer: :beer: :beer: i've understood that "nor" is the normal of the surface and "rd" is related to the view, i saw that you used the vector product "dot(nor,rd)" for the refracting calculation. please is it possible to you to try to explain me what this vector product is calculating ? is it an angle ? a distance ? im' afraid to see that in despite of the days i've taken to try to understand the script , for now it still stay a black box :-\ |