[comp.graphics] Ray-tracing

bazan@puff.UUCP (10/29/87)

	Would anyone out there in net-land have the source for a minimal
ray tracer to render, say, a sphere. I'm talking just the bare bones here
nothing fancy or complex. Also, wasn't there a contest a while to see who 
could write a minimal ray tracer in the least amount of source code. If
anyone has the source for one of these that I could get my hands on, I'd
be really gratefull. Please respond via E-mail.
		Thanks much

			-Eric Bazan
			~bazan@puff.wisc.edu
			

jerry@walt.cc.utexas.edu (Jerry Porter) (11/20/89)

I'm trying to port QRT to OS2 and/or other multitaskers.  Someone has 
ported a version to the IBM, but I don't have the source code, or an
address for the author.  I do have the source to QRT, but in order to 
display pictures I need to use two conversion utilities and I lose 2 bits
of color information somewhere(I think).  I would like to make the gif-encoding
a part of the QRT package,(command line option).  I can find a lot of info
on GIF decoding, but aside from the Compuserve spec, I can't find anything
about encoding.  I don't feel my skills are up to writing an encoder just
yet, without example code.  Any pointers to addresses(can you mail from 
internet to compuserve?) of the authors of these programs(QRT, RAW2TMP,
TMP2GIF) would be appreciated.  I would like to encourage the use of
this package, except for the problems of finding the authors.  


Jerry Porter                          |  Dan Qualye spotted wearing raincoat
Star's End 512-255-1030 2400baud      |  clearly labeled VICE PRESIDENT.
jerry@walt.cc.edu.utexas              |  Needless to say it matches his lunch-
--------------------------------------|  box. |---------------------------|
Holy bandwidth Bitman, that was fast. |       | All roads lead to Trantor.|

koren@hpfelg.HP.COM (Steve Koren) (11/21/89)

> I'm trying to port QRT to OS2 and/or other multitaskers.  Someone has 
.....
> yet, without example code.  Any pointers to addresses(can you mail from 
> internet to compuserve?) of the authors of these programs(QRT, RAW2TMP,
> TMP2GIF) would be appreciated.  I would like to encourage the use of
> this package, except for the problems of finding the authors.  

You must have gotten an incomplete system, since both my USmail and email
addresses were included in the documentation.  For anyone else with the
same trouble:

        koren@hpfela.HP.COM

        Steve Koren
        4501 Boardwalk Dr
        Apt D-38
        Fort Collins, CO 80525

        (please included self-addressed stamped envelope, since I've
         about gone broke mailing QRT info around.)

I am the author of QRT, but not tmp2gif.  That authors name is included
with the 'qrt->gif' stuff, and his name is mentioned in the Addendum1.5.

Also, FYI the most recent QRT that is or perhaps ever will be is 1.5.

ingar@bibsyst.UUCP (ingar) (06/24/91)

 I have tried to program a ray tracing program, but now when 
i almost have finished I have discovered that my lines isn't lines,
they are curves! Can anybody help me??
If you have some source I would be glad.

Ingar Pedersen, preIng.

ingar@bibsyst.no

krazykid@bass.bu.edu (Ernest Kim) (06/26/91)

In article <382@bibsyst.UUCP> ingar@bibsyst.UUCP (ingar) writes:
>
> I have tried to program a ray tracing program, but now when 
>i almost have finished I have discovered that my lines isn't lines,
>they are curves! Can anybody help me??
>If you have some source I would be glad.

I am not sure of this, but someone told me that gamma correction is used to
compensate for the curve of a monitor, so maybe your gamma correction is off
for your monitor.  Someone please correct me if I am wrong.

Ernie
krazykid@bu-pub.bu.edu

kenb@amc.com (Ken Birdwell) (06/26/91)

In article <84569@bu.edu> krazykid@bass.bu.edu (Ernest Kim) writes:
>In article <382@bibsyst.UUCP> ingar@bibsyst.UUCP (ingar) writes:
>>
>> I have tried to program a ray tracing program, but now when 
>>i almost have finished I have discovered that my lines isn't lines,
>>they are curves! Can anybody help me??
>>If you have some source I would be glad.
>
>I am not sure of this, but someone told me that gamma correction is used to
>compensate for the curve of a monitor, so maybe your gamma correction is off
>for your monitor.  Someone please correct me if I am wrong.
>
>Ernie
>krazykid@bu-pub.bu.edu

This is reason #374 why we need a moderator.

The question lacks enough information to even guess at, and Ernies answer 
is totally wrong.  Would whoever is in charge of the moderator vote 
please post where we should send our votes?   I've been watching 
news.announce.newsgroups, news.groups and comp.graphics for the last 
month and I've apparently missed the posting.   I saw the posting on 
the number of votes received so far (very few) but there was no mention 
of where to vote.

Gamma correction has to do with adjusting for non-linearities in 
the monitor's brightness.  In simple terms this is how to fix the problem 
of colors set to half intensity appearing much less than half as bright as 
the same colors set to full intensity.  Most any graphics book will discuss 
this in detail.  Look under computer graphics in your local libraries card 
catalog for books on the subject. Addresses of Libraries can be found in your 
local phone book.  If you don't have a phone book, call 1-555-1212 and ask the 
operator for help in finding a library near you.

[Note for the humor impaired: the previous paragraph ended with a slight 
undercurrent of sarcasm but was not intended as a personal attack.]

-- 

jk87377@cc.tut.fi (Juhana Kouhia) (06/27/91)

In article <84569@bu.edu> krazykid@bass.bu.edu (Ernest Kim) writes:
>In article <382@bibsyst.UUCP> ingar@bibsyst.UUCP (ingar) writes:
>>
>> I have tried to program a ray tracing program, but now when 
>>i almost have finished I have discovered that my lines isn't lines,
>>they are curves! Can anybody help me??
>>If you have some source I would be glad.
>
>I am not sure of this, but someone told me that gamma correction is used to
>compensate for the curve of a monitor


I don't think curveous of the monitor is behind this;
probably he has just fish eye lens caused by error in vector lenght
calculation or in projection equation.

I remember when I did make my first wireframe program to Commodore
VIC-20 -- I made the projection equation myself -- after noting some
errors in the picture I noted that I did write fish eye lens; I did
fix the program: I divided each line to many short lines in 3D space
and projected them separately. Yeah, fish eye projection was more
attractive than 'normal' projection.

Note that your pictures are now an ART pictures and if you now make a
big error to your program and get really false pictures then you're
REAL artist and can send your pictures to SIGGRAPH art slide show...
:)

Juhana Kouhia

murray@sun13.scri.fsu.edu (John Murray) (06/27/91)

In article <1991Jun26.021102.9027@amc.com> kenb@polaris.amc.com () writes:
>
>This is reason #374 why we need a moderator.
>
>The question lacks enough information to even guess at, and Ernies answer 
>is totally wrong.  Would whoever is in charge of the moderator vote 
>please post where we should send our votes?   I've been watching 
>news.announce.newsgroups, news.groups and comp.graphics for the last 
>month and I've apparently missed the posting.   I saw the posting on 
>the number of votes received so far (very few) but there was no mention 
>of where to vote.

Well, I'm pretty sure that the moderator vote you were talking about was for
the proposed newsgroup comp.graphics.research. The moderator vote for that is
already over, since it was rather rushed (around a week, I think) in an
attempt to get all of the niggly - and necessary - details out of the way
before posting the Call For Votes (currently in progress) for the new group.

Changing comp.graphics from unmoderated to moderated -was- proposed during
the CFD for c.g.research, but it was generally agreed that an attempt to
moderate a group for the purpose of excluding the overwhelming percentage
of "how do I..." posts that appear here would be bound to fail, or at least
cause more trouble than it was worth, so we opted to vote on a new group
instead.

Your humble moderator, comp.graphics.research (proposed)

(since the two CFV's for the group seem to have expired rather quickly at a
few sites, the voting addresses are:
        yes@barkley.berkeley.edu for yes votes
        no@barkley.berkeley.edu for no votes
        oops@barkley.berkeley.edu for changing one's mind)

-- 
*Standard Disclaimers Apply*|        ---Get Out Of HELL Free!---
John R. Murray        KD4BTL|The bearer of this card is entitled to forgive
murray@vsjrm.scri.fsu.edu   |Himself of all Sins, Errors and Transgressions.
Supercomputer Research Inst.|                                -- D. Owen Rowley

carter@IASTATE.EDU (Carter Michael Brannon) (06/27/91)

If straight lines look curved in your ray-traced images, you've probably got
your eye point too close to the viewplane.  Back the eye away from the
viewplane, and back the whole camera away from the scene.

--
Michael B. Carter

pgraff@next.com (Peter Graffagnino) (06/29/91)

In article <1991Jun26.021102.9027@amc.com> kenb@polaris.amc.com () writes:
>In article <84569@bu.edu> krazykid@bass.bu.edu (Ernest Kim) writes:
>>In article <382@bibsyst.UUCP> ingar@bibsyst.UUCP (ingar) writes:
>>>
>>> I have tried to program a ray tracing program, but now when 
>>>i almost have finished I have discovered that my lines isn't lines,
>>>they are curves! Can anybody help me??
>>>If you have some source I would be glad.
>>
>>I am not sure of this, but someone told me that gamma correction is used to
>>compensate for the curve of a monitor, so maybe your gamma correction is off
>>for your monitor.  Someone please correct me if I am wrong.
>>
>>Ernie
>>krazykid@bu-pub.bu.edu
>
>This is reason #374 why we need a moderator.
>
>The question lacks enough information to even guess at, and Ernies answer 
>is totally wrong.  Would whoever is in charge of the moderator vote 
>please post where we should send our votes?   I've been watching 
>news.announce.newsgroups, news.groups and comp.graphics for the last 
>month and I've apparently missed the posting.   I saw the posting on 
>the number of votes received so far (very few) but there was no mention 
>of where to vote.
>
>Gamma correction has to do with adjusting for non-linearities in 
>the monitor's brightness.  In simple terms this is how to fix the problem 
>of colors set to half intensity appearing much less than half as bright as 
>the same colors set to full intensity.  Most any graphics book will discuss 
>this in detail.  Look under computer graphics in your local libraries card 
>catalog for books on the subject. Addresses of Libraries can be found in your 
>local phone book.  If you don't have a phone book, call 1-555-1212 and ask the 
>operator for help in finding a library near you.
>
>[Note for the humor impaired: the previous paragraph ended with a slight 
>undercurrent of sarcasm but was not intended as a personal attack.]
>
>-- 


	Well actually, Ken, gamma correction has nothing at all to do
with appearance or `perceived' brightness.  What gamma correction does
is correct for the non-linear relationship between the voltages
generated by a video DAC and the actual intensity of the light energy
coming off of the display.  A gamma corrected frame buffer allows the
values stored in VRAM to be intensity-linear.  This technique is used
on workstation displays (including NeXT's) because a wide variety of
computer graphics algorithms (such as compositing, dithering, and
anti-aliasing) rely on the linear mixing of light energy and, as such,
require intensity linear pixels.  However, if a human looks at a ramp
of, say, 16 intensity-linear gray levels, the step between the first
two will be *perceptually* larger than the step between the last two.
This is because the human visual system does not perceive in an
intensity-linear fashion.  Of course it's difficult to exactly
quantify the perceptual response of the visual system as a function of
energy, but many have suggested a logarithmic relationship or as in
the CIE LAB colorspace a cube-root of energy.  In fact, although non
gamma-corrected frame buffers (in which the frame buffer values are
directly proportional to voltage) are usually scoffed at, they do
offer a more perceptually efficient quantization of the color-space.
This is because the gamma exponent of 2.2 is counter balanced by the
exponent of 1/3 in the L* equation.  Of course, in such a frame buffer
dithering, compositing, and anti-aliasing calculations become more
complex.  So, in summary, voltage-linearity, intensity-linearity and
perceptual-linearity are three very different beasts, and gamma
correction attempts to relate only the first two.

For a good article on some of this stuff, check out Bruce Lindbloom's
article in the '89 siggraph proceedings entitled "Accurate Color
Reproduction for Computer Graphics Applications"

Peter Graffagnino
Graphics Software
NeXT Computer, Inc.