Page 1 of 11

programing a raytracer

Posted: Sat Mar 17, 2007 6:19 am
by oodmb
does anybody have any good resources for starting (free resources)? i want to program it in java. mostly, i am just doing this for fun, and i dont realy want to do anything too complicated.

Posted: Sat Mar 17, 2007 7:16 am
by Kram1032
You mean, you want to make a biased renderer?
Hmmmm....

http://en.wikipedia.org/wiki/Ray_tracer <- maybe this helps?

Posted: Sat Mar 17, 2007 8:48 am
by oodmb
either biased or unbiased.

Posted: Sat Mar 17, 2007 8:59 am
by Kram1032
aha^^
The link may helps you in both cases^^
But I'd say, google is your friend and if you ask kind, Ono is too^^
Also Arne seems to know some things about it...

Posted: Sat Mar 17, 2007 10:02 am
by CTZn
I posted this link yesterday already, but this thread looks a better place:

http://people.scs.fsu.edu/~beason/pane/

Once you've started, you may pursue with this one :)

this is not meant to push the man about open source, I would not specially support the idea

Posted: Sat Mar 17, 2007 10:16 am
by oodmb
in this case, google is not my friend, its a very agrivating person who i associate with.
pane is cool, and it looks awesome, but its for linux or mac, not windows, and i cant figure out how to compile it anyway. i've heard of sunflow as well, but i need links that go over the more in depth algorithms, not like general painters algorithem.

Posted: Sat Mar 17, 2007 10:18 am
by Kram1032
aha...

Posted: Sat Mar 17, 2007 10:31 am
by Kosmokrator
oodmb are u trying to catch Ono? :roll: :evil: :P
why r u interest for an raytracer....?u have some project?

Posted: Sat Mar 17, 2007 10:39 am
by oodmb
i'm interested because not only does it sound fun, but putting "programed a raytracer" on a college application would most likely be pretty cool.
so far the best i've found from google is this:
http://www.devmaster.net/articles/raytr ... /part1.php
which isnt the greatest link.

Posted: Sat Mar 17, 2007 3:05 pm
by zsouthboy
What is your level of programming expertise?

I highly recommend taking a shot at it by yourself, in the dark, if you must.

For example, a possible train-of-thought:

Okay, I want to make a triangle in 3D space, then project it into 2D space. How do I get there?

Okay, next, I want to be able to shade that triangle. I need to know a direction the face is pointing.

and so on.

Posted: Sat Mar 17, 2007 3:10 pm
by zsouthboy
Again, I don't know your knowledge level, but feel free to ask questions over at Beyond3D. Tons of knowledgeable people there, including me, but I never said I was knowledgeable :)

http://forum.beyond3d.com/forumdisplay.php?f=43

Re: programing a raytracer

Posted: Sun Mar 18, 2007 2:47 am
by IanT
oodmb wrote:does anybody have any good resources for starting (free resources)? i want to program it in java. mostly, i am just doing this for fun, and i dont realy want to do anything too complicated.
The book "Physically Based Rendering" (Pharr & Humphreys) isn't free but it's about as close as you can get to the "programming a renderer" bible (IMHO). The source code is C++ but it's not exactly difficult to translate it to Java for learning purposes.

Sunflow is a very well-designed open-source renderer so worth a look at that too.

You do need to choose, early on, whether you want your renderer to be biased or unbiased ... in particular, it will affect many choices about implementing materials and lightsources. But...

A biased renderer (e.g. classical ray tracing) is an easier test-bed for things like ray intersection, object primitives and intersection acceleration and, with care, can be implemented using physically accurate materials (BRDFs, BRDFs, BSDFs etc.) and then extended to be unbiased.

I'll PM you with some other useful resources...

Ian.

Posted: Sun Mar 18, 2007 2:54 am
by IanT
Actually, some similar questions were asked and answered here:

http://www2.indigorenderer.com/joomla/f ... sc&start=0

Ian.

Posted: Sun Mar 18, 2007 2:56 pm
by hstokholm

Posted: Mon Mar 19, 2007 4:24 am
by oodmb
The book "Physically Based Rendering" (Pharr & Humphreys) isn't free but it's about as close as you can get to the "programming a renderer" bible (IMHO). The source code is C++ but it's not exactly difficult to translate it to Java for learning purposes.
i do want that book, but first i think i should at least have something basic down. sunflow is cool and all, and i can read its source code realy well, but its too large right now for me to realy understand what its doing, especialy with its lack of proper documentation.

i think right i am going to do a biased raytracer, as speed is one of my concerns.

i just started programing, all i have yet however is a button that says render, and when you push it, it makes an blue green image with a user defined size.

Hstokholm: thoes are perhaps the best links i have ever seen. they solve so many of the issues i was concerned with. thanks so much.