The.Anti.9
The.Anti.9

Reputation: 44748

Best thing for 3D and raytracing

I want to play around with some graphics stuff. Simple animations and things. I want to fool around with raytracing too. I need help finding a library that will help me do these things. I have a few requirements:

Does anyone know of a good library i can use to fool around with?

Upvotes: 4

Views: 2583

Answers (5)

Jem
Jem

Reputation: 2275

First thing that come to my mind is the popular open source P.O.V Raytracer (www.povray.org). POV scenes are defined entirely with script files, and some people made Python code to generate them easily.

http://code.activestate.com/recipes/205451/

http://jabas-unblog.blogspot.com/2007/04/easy-procedural-graphics-python-and-pov.html

Upvotes: 5

Richard Nichols
Richard Nichols

Reputation: 1940

The well developed raytracers that are open source are

For realtime 3D (it will be language dependant of course) there is JMonkeyEngine (Java) not sure whether that meets your "high level language" requirement.

You could consider a 3D game scripting language too, like GameCore or BlitzBasic

Upvotes: 2

Zhaph - Ben Duguid
Zhaph - Ben Duguid

Reputation: 26976

I believe there are few people putting together ray-tracers using XNA Game Studio.

One example of this with code can be seen over at:

Bespoke Software » Ray Tracing - Materials

Upvotes: 2

Alnitak
Alnitak

Reputation: 340055

I'm not aware of any libraries that satisfy your request (at least not unless I decide to publish the code for my own tracer...).

Writing a tracer isn't actually that hard anyway. I'd strongly recommend getting hold of a copy of "An Introduction to Ray Tracing" by Glassner. It goes through the actual math in relatively easy to understand terms, and also has a whole section on "how to write a ray tracer".

In any event, a "library" isn't all that much use on its own - pretty much every ray tracer has its own internal libraries but they're specific to the tracer. They typically include:

  1. a base class to represent 3D objects
  2. subclasses of that for each geometric primitive
  3. vector and matrix classes (3D and 4D)
  4. texturing functions and/or classes
  5. light classes of various types (point light, spot light, etc)

For my own tracer I actually used the javax.vecmath packages for #3 above, but had to write my own code for #1 and #2 based on the Glassner book. The whole thing is well under 2k lines of code, and most of the individual classes are about 40 lines long.

Upvotes: 4

Richard Inglis
Richard Inglis

Reputation: 5958

Have a look at blender.org - it's an open-source 3d project with python scripting capabilities.

Upvotes: 6

Related Questions