Results 1 to 3 of 3

Thread: Raytracer

  1. #1
    Join Date
    Dec 2007
    Posts
    19
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Raytracer

    Hi,

    Last weeks, I asked some questions on the forum for my thesis about raytracing. Raytracing is a technique for rendering 3D scenes. Well, it's finally finshed! Thanks for the answers, it really helped me out.


    (a scene rendered with our raytracer)

    I used QT for threads, image handling, scripting and for the widgets of course ;-). You can download the thesis (in Dutch), the code and program (both in English) at http://code.google.com/p/pwsraytracer


    I appreciate your feedbacks ;-)

  2. #2
    Join Date
    Nov 2006
    Location
    Shrewsbury, UK
    Posts
    97
    Thanks
    3
    Thanked 11 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Raytracer

    Haven't compiled the code yet (still at worK) but I was just looking at your mesh.cpp file - I have an interest in any files with that name. In your constructor you are setting min and max X, Y, Z values for an 3d bounding box to zero. You might consider setting min values to +machine infinity and max values to -infinity (using your favourite macro) otherwise your algo will only work for meshes centred around the origin.

    Pete

  3. #3
    Join Date
    Dec 2007
    Posts
    19
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Raytracer

    Sorry for my late reply, haven't checked the forum for a while :S

    But every complex object (with a texture, a mesh) is created as a standard object. Centered around the orgin, radius 1 in case of a sphere and so on... Then you can transform the object to put it somewhere else in the world. The code in GeometricObject::hit then calculates what the orginal ray on the untransformerd object would be, and the calls the hit function.

    Did you try to compile the code?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.