I'm curious why you want to develop a ray tracer yourself? There are plenty
of superb freeware raytracers available, and they would be much faster than
anything Java could do.
If you need Java to develop a scene you could write an application which
would output a scene description file that could be rendered with an
available ray tracer.
The most popular freeware ray tracer is POV, my particular favorite is
Polyray. Both easily handle reflective and refractive surfaces you can even
adjust the IOR for refraction (Lucite -> glass -> diamond)
If you insist on creating your own, the POV source is freely available, if
you wanted to spend the time to dig into it and learn how they did it in C++
then figure out how you can make Java do it, I'm sure it can be done.
Again however you won't be producing images in Java3D. You'll end up using
the vecmath and a lot of the Java3D objects for tracing each ray, but in the
end you'll have a pixel color that you'll draw to a 2D canvas. You won't, in
my opinion, need to use any of the primitives or shape nodes of any kind.
You'll trace each ray mathematically using the functions of your "objects"
to determine the pixel color.
Hope this helps
-----Original Message-----
From: Terren [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 17, 2000 4:43 PM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] pure spheres
What I'm hoping for is that I'll be able to extend java3d in such a way so
that
I could create a new 'primitive' - a sphere, mathematically correct. I want
to
model a spherical mirror, and it would be completely obvious if it was just
a
triangle mesh, no matter how dense. I wish I had the time to immerse myself
in
j3d to see if what I want to do is possible, so I'm hoping someone here can
tell me one way or another if non-linear geometric shapes can be modelled
with
it.
Terren
--- The Casteels <[EMAIL PROTECTED]> wrote:
> I have attempted to use Java3d to evaluate volumetric data which has some
of
> the same problems you're running into. What I ended up doing was creating
an
> IsoSurface from the volumetric data, by using the marching cubes algorithm
>
> The result is a triangle surface mesh. The density of the mesh is
dependent
> on
> how fine the cube mesh was.
>
> I know this isn't what you want, but it gives you an idea of what you're
up
> against. You'd have to do something similar by evaluating each ray into
> recursively smaller and smaller pieces as you get closer to the threshold.
> Once
> you reach the threshold you'd have to generate a cube around the point to
> establish the surface appearance, shading, normal ect.... then you can
> establish the pixel color and plot it onto a 2D Canvas.
>
> A daunting task....
>
> In short, although I'm sure it could be done, this isn't what Java3D is
> really
> meant for. Java3D is designed to generate VR type worlds, interactive,
going
> beyond VRML to give the programer tons more control and functionality, but
> still it is an interactive environment sacrificing realistic appearance
for
> interactivity.
>
> Another note, the above mentioned volumetric viewer was slow as a dog.
>
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".