Logo by Dinkydau - 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. December 05, 2019, 09:52:51 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] 2 3   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: Orbit Trap in GI frag  (Read 2971 times)
0 Members and 1 Guest are viewing this topic.
vinz
Iterator
*
Posts: 154


« on: June 09, 2013, 06:52:55 AM »

HI,
Hahaha  grin, 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
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

Code:
//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.

Code:
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
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #2 on: June 10, 2013, 11:34:14 AM »

congrats wink
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  cheesy

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 Sceptical
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 cheesy
1166 x1442 @1000 subsamples in 14 mins

Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« 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 wink
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  wink A Beer Cup
« Last Edit: June 10, 2013, 03:27:55 PM by vinz, Reason: parce que je sais pas ecrire » Logged
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« 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 »

Thanks you Syntopia  wink your software is magic to me  A Beer Cup A Beer Cup A Beer Cup A Beer Cup A Beer Cup A Beer Cup A Beer Cup A Beer Cup
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« 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 ... sad 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 ... smiley
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 Grin with closed eyes ...  cheesy

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
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #11 on: June 10, 2013, 11:06:50 PM »

my plan is not to write fragmentarium scripts wink 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  cheesy ... I really hope you'll find the time to Make a such nice project ! i'm volunteer to be beta tester  wink
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 ! cheesy A Beer Cup A Beer Cup A Beer Cup A Beer Cup A Beer Cup A Beer Cup A Beer Cup




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)
//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  cheesy

« Last Edit: June 11, 2013, 05:28:05 PM by vinz » Logged
Pages: [1] 2 3   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
orbit trap offline? Non-Fractal related Chit-Chat taurus 7 1335 Last post November 10, 2011, 03:00:12 AM
by lycium
orbit trap rendering ? Other / General Discussion cKleinhuis 8 2585 Last post January 23, 2012, 11:41:51 AM
by cKleinhuis
Orbit Trap is closing down (BUT... has re-opened) Fractal Website of the Month ker2x 8 6618 Last post October 28, 2012, 05:31:49 AM
by taurus
orbit trap feature request « 1 2 » ericr 24 1912 Last post March 25, 2013, 01:24:16 PM
by ericr
Blue Orbit Trap Images Showcase (Rate My Fractal) Fracticality 0 459 Last post April 06, 2017, 01:16:03 AM
by Fracticality

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.144 seconds with 28 queries. (Pretty URLs adds 0.013s, 2q)