learning how to Raytrace

This is a discussion on learning how to Raytrace within the C Programming forums, part of the General Programming Boards category; Hi, I would like to write a raytracer, but before I start I would like some help. 1) What should ...

  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, 03:35 AM
  3. Need Help On a Simple Bank Program
    By oobootsy1 in forum C# Programming
    Replies: 9
    Last Post: 08-08-2005, 11:51 AM
  4. Learning Rate Of C++
    By Krak in forum C++ Programming
    Replies: 27
    Last Post: 01-29-2003, 01:53 PM
  5. API learning reference (for those who are learning)
    By steve_i83 in forum Windows Programming
    Replies: 1
    Last Post: 11-04-2001, 01:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21