Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2006-10-18 04:05:01

luca-deltodesco
Member
Registered: 2006-05-05
Posts: 1,470

ray tracing library

decided to move this to a new topic, since my topic on quaternion julia sets kind of diverged into this:

im going to use this thread as sort of an almost daily update on my ray tracing library.

Heres the history of it so far in images:

latest version now has as primitaves:

spheres, planes, discs, squares
all can be rotated and scaled and positioned

all can have texture maps, of which there are 3 so far

2 procedural ones, being checkerboard and solid colour
and an external bitmap texture map

all maps can be rotated, scaled and repositioned.

discs have two methods of mapping, polar and cartesian, for cartesian, the texture coordinate is just defined by the position of the intersection with reference to the middle. and polar, the x coordinate of texture is the angle with middle made by intersection, with y coordinate being distance from centre

all primitaves can have normal maps applied of which there is only an external normal map so far

for lights, so far you can have point lights, defined with a position and colour and intensity, atm they disintegrate with distance the same for each, this will change for variable disintegration of light intensity

there is also super sampling based on jittered grid splitting of pixel area. all images except first have 4x super sampling anti aliasing.


The Beginning Of All Things To End.
The End Of All Things To Come.

Offline

#2 2006-10-18 04:15:52

Devantè
Real Member
Registered: 2006-07-14
Posts: 6,400

Re: ray tracing library

Very cool pictures. This would be nice for Easter. smile

Offline

#3 2006-10-18 05:28:47

luca-deltodesco
Member
Registered: 2006-05-05
Posts: 1,470

Re: ray tracing library

reflections added!!!

you can now specify the max amount of reflection rays to be cast per screen ray. In this rendering it is 10, and ofcourse the 4x super sampling still. Here you can really see the effects of the normal map that was used on floor plane.

This image took alot longer to render with all the added rays for reflections and so forth, aprox 4 minutes. But the result is definately worth the wait.


The Beginning Of All Things To End.
The End Of All Things To Come.

Offline

#4 2006-11-05 09:26:07

luca-deltodesco
Member
Registered: 2006-05-05
Posts: 1,470

Re: ray tracing library

OK, after finding out the problems i got from the engine, i started again from scratch with a better experiance immediately laying the foundations for everything i need to add.

The new version so far has only spheres, and solid and checkerboard texturing, BUT you can now have multiple texture maps per object. you define teh first texture map, and everyother texture map is layered ontop of it using whatever operations you give it

DRT_MAP_ADD, DRT_MAP_SUB, DRT_MAP_MUL, DRT_MAP_DIV, DRT_MAP_AVE(respectively, add colour channeles, subtract colour channels, multiply colour channels, divide colour channels, average the colour channels)

and ive added the basis of all the CSG operations, so far ive added functionality to subtractive CSG.

this first image is composed of 3 spheres, each with two checkerboard textures (one sphere used twice). and uses 3 CSG operations, with 2x super sampling for anti aliasing.


The Beginning Of All Things To End.
The End Of All Things To Come.

Offline

#5 2006-11-05 09:30:09

Devantè
Real Member
Registered: 2006-07-14
Posts: 6,400

Re: ray tracing library

Very nice stuff, luca-deltodesco. I can't wait to see what else you can create. smile

Offline

#6 2006-11-05 23:01:17

Toast
Real Member
Registered: 2006-10-08
Posts: 1,321

Re: ray tracing library

Whoa that's pretty cool, what is this program you're using?

Offline

#7 2006-11-06 03:34:42

luca-deltodesco
Member
Registered: 2006-05-05
Posts: 1,470

Re: ray tracing library

Toast wrote:

Whoa that's pretty cool, what is this program you're using?

its my own program


The Beginning Of All Things To End.
The End Of All Things To Come.

Offline

Board footer

Powered by FluxBB