Thread: learning how to Raytrace

  1. #1
    Registered User
    Join Date
    Aug 2005
    Location
    New Delhi
    Posts
    40

    learning how to Raytrace

    Hi,

    I would like to write a raytracer, but before I start I would like some help.


    1) What should I know in order to learning raytracing? (I am fluent in basic C and can handle
    linked lists and files, but I have no graphics background whatsover)

    2)I understand that the input to my raytracer , will carry object types, co-ordinates, texture types, ambient light conditions, camera position etc)

    3)What I don't know is that how am I supposed to generate my objects, my guess is I'll be rendering them(using OpenGL or any other graphics library) based on the raytracing done before.

    I don't have any more questions at the moment, If you think I've missed something please feel free to add them.
    Thanks,
    Sahil

  2. #2
    Registered User
    Join Date
    Aug 2005
    Location
    New Delhi
    Posts
    40
    Oops, my output doesn't need to be a 3d model. I could just set the pixels of a BMP based on my raytracing, right?

    So I just answered myself here. Silly me.
    Thanks,
    Sahil

  3. #3
    Registered User
    Join Date
    Feb 2006
    Posts
    65
    1) Optics and lots of linear algebra and numerical math. You can use formulas you find from the internet but if you actually understand it all you'll have fewer problems. You will need to know how to calculate reflection and refraction vectors, the intersection points of a line (the ray of light) and the objects in the scene, how to composite different colours so that (for example) a reflection looks realistic.

    3) You can start with simple mathematical surfaces like the sphere. Once you get that going you can build on it and add other kinds of objects.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Machine Learning with Lego Mindstorms
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 01-30-2009, 02:34 PM
  2. Best Approach for Learning
    By UCnLA in forum C Programming
    Replies: 5
    Last Post: 03-21-2008, 02:35 AM
  3. Need Help On a Simple Bank Program
    By oobootsy1 in forum C# Programming
    Replies: 9
    Last Post: 08-08-2005, 10:51 AM
  4. Learning Rate Of C++
    By Krak in forum C++ Programming
    Replies: 27
    Last Post: 01-29-2003, 01:53 PM