vinz
Iterator
Posts: 154
|
|
« on: June 09, 2013, 06:52:55 AM » |
|
HI, Hahaha , 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 ?
|
|
|
Logged
|
|
|
|
vinz
Iterator
Posts: 154
|
|
« Reply #1 on: June 10, 2013, 06:28:13 AM » |
|
OK, i've added this code from the De-raytracer.frag //Orbit trap Add---------------------------------------
vec3 colorBase = vec3(0.0,0.0,0.0);
vec3 cycle(vec3 c, float s) { return vec3(0.5)+0.5*vec3(cos(s*Cycles+c.x),cos(s*Cycles+c.y),cos(s*Cycles+c.z)); }
vec3 getColorOrbit() { orbitTrap.w = sqrt(orbitTrap.w); vec3 orbitColor; if (CycleColors) { orbitColor = cycle(X.xyz,orbitTrap.x)*X.w*orbitTrap.x + cycle(Y.xyz,orbitTrap.y)*Y.w*orbitTrap.y + cycle(Z.xyz,orbitTrap.z)*Z.w*orbitTrap.z + cycle(R.xyz,orbitTrap.w)*R.w*orbitTrap.w; } else { orbitColor = X.xyz*X.w*orbitTrap.x + Y.xyz*Y.w*orbitTrap.y + Z.xyz*Z.w*orbitTrap.z + R.xyz*R.w*orbitTrap.w; } vec3 color = mix(BaseColor, 3.0*orbitColor, OrbitStrength); return color; }
#ifdef providesColor vec3 baseColor(vec3 point, vec3 normal); #endif And Also Modified the getMaterial function in GI frag. material getMaterial( in vec3 z0, in vec3 nor, in float item ) {//get material properties (color,refr/refl,gloss,spec,specExp) Mater0.color= getColorOrbit(); return (item==0.0)?Mater0:Mater1; //you can extend this with a texture lookup etc. }
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. ).
|
|
« Last Edit: June 10, 2013, 06:55:40 AM by vinz »
|
Logged
|
|
|
|
cKleinhuis
|
|
« Reply #2 on: June 10, 2013, 11:34:14 AM » |
|
congrats
|
|
|
Logged
|
---
divide and conquer - iterate and rule - chaos is No random!
|
|
|
vinz
Iterator
Posts: 154
|
|
« Reply #3 on: June 10, 2013, 12:06:45 PM » |
|
Thanks for your support cKleinhuis , i'm learning a lot 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.
|
|
« Last Edit: June 10, 2013, 12:20:37 PM by vinz »
|
Logged
|
|
|
|
vinz
Iterator
Posts: 154
|
|
« Reply #4 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 1166 x1442 @1000 subsamples in 14 mins
|
|
|
Logged
|
|
|
|
cKleinhuis
|
|
« Reply #5 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
|
|
|
Logged
|
---
divide and conquer - iterate and rule - chaos is No random!
|
|
|
vinz
Iterator
Posts: 154
|
|
« Reply #6 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
|
|
« Last Edit: June 10, 2013, 03:27:55 PM by vinz, Reason: parce que je sais pas ecrire »
|
Logged
|
|
|
|
Syntopia
|
|
« Reply #7 on: June 10, 2013, 09:10:51 PM » |
|
Looks great, Vinz!
And you are right, the 2000 limit should be removed!
|
|
|
Logged
|
|
|
|
vinz
Iterator
Posts: 154
|
|
« Reply #8 on: June 10, 2013, 10:19:03 PM » |
|
|
|
|
Logged
|
|
|
|
cKleinhuis
|
|
« Reply #9 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 ...
|
|
|
Logged
|
---
divide and conquer - iterate and rule - chaos is No random!
|
|
|
vinz
Iterator
Posts: 154
|
|
« Reply #10 on: June 10, 2013, 10:57:48 PM » |
|
Animating options would be great ! also why not a simple interpolations , between multiple presets ... 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).
|
|
|
Logged
|
|
|
|
cKleinhuis
|
|
« Reply #11 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! )
|
|
|
Logged
|
---
divide and conquer - iterate and rule - chaos is No random!
|
|
|
vinz
Iterator
Posts: 154
|
|
« Reply #12 on: June 10, 2013, 11:11:53 PM » |
|
HA !!! BIG Project with Hybrids ... I really hope you'll find the time to Make a such nice project ! i'm volunteer to be beta tester
|
|
|
Logged
|
|
|
|
eiffie
Guest
|
|
« Reply #13 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.
|
|
|
Logged
|
|
|
|
vinz
Iterator
Posts: 154
|
|
« Reply #14 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 ! Eiffie i've few questions: 1. i've added a second light by modifying this code : float mapL(in vec3 z){//this is the DE for emissive light (use folding etc. to create multiple lights) //z-=lightPosition; vec3 z2 = z; return (UseEmissive2)?min( length(z-=lightPosition)-lightSize , length(z2-=lightPosition2)-lightSize2 ):length(z-=lightPosition)-lightSize; } 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
|
|
« Last Edit: June 11, 2013, 05:28:05 PM by vinz »
|
Logged
|
|
|
|
|