************************************************************* * RAYTRACE USER NEWS ISSUE #5 JULY, 1992 * ************************************************************* SOME DESPERATELY NEEDED PUBLICITY The July 92 issue of ST FORMAT UK has followed up last month's publishing of Raytrace 2.1 with a trio of handy utilities; Rayview, a pic viewer I hacked from the demo code on the V2.1 distribution disks, Lonny Pursell's SUL2SPU Spectrum converter demo, as well as a converter I had never seen that does 16 color/ grayscale Degas conversion. Two tracings I've done got little thumbnail pics to accompany the coverdisk article - Andy Warhol was right, and I guess I got my 15 minues of fame! That I sent Rayview and SUL2SPU and some pics on disk off to the editors may have had something to do with it... But it proved to be very timely, keeping Raytrace in the limelight for another issue, and provided those who took the program for a spin over the last month a way to get the pics they created viewable with something other than Raytrace itself. In the Rayview .DOC file is my ongoing plea to see other raytraced pics - hopefully some of Format's 70,000+ readers will send a disk my way - how about you??? Hmmmm? (Nag, whine, etc.) COMPATIBILITY PROBLEMS, PROBLEMS, PROBLEMS... Also in the July Format issue, are two references claiming that Raytrace 2.1 runs on TOS 2.06 - at least on upgraded ST/E's - That was not my impression when I went to my Atari dealer and tried to run Raytrace when the first Mega STE's came in - all I got was bombs. It seems I'd been under the mistaken impression that TOS 2.X is the culprit, it seems not - so I've done what I've wanted to do for months and upgraded to a new 1040 STE with 2.06 installed. For the most part, Raytrace 2.1 runs okay - with one exception. The program will bomb out when hitting the ESCape key to abort a tracing in progress. Whether this is a major problem or minor inconvenience is your call. You just have to wait till a small 1/8, 1/4 scale test finishes before returning to Edit. The HELP key still works, so you can get a sneak peek when you need to. So that kills the theory that switching between video modes is the cause. Very puzzling. All other operations work normally. The more serious problem is that Spectrum 512 has a major conflict the new TOS. Oddly, the program loads just fine, and you can select all functions with a mouse. But ANY KEYPRESS will bomb out the program - not acceptable in my book - too many of Spectrum's functions depend on keyboard commands... So unless I can find someone to perhaps piggyback the ROM's and let me switch between TOS 2.x and 1.6X I will just go back to the older TOS and trade Newdesk's nifty features in for the compatibility I need. I'm still very puzzled about the Mega STE, I know that although Raytrace gets along with my AdSpeed STE at 8mhz, just having a 68881 math chip plugged in killed Raytrace - Two Bombs. Maybe my dealer's Mega STE has a 68881 installed and thats the culprit. So went to my dealer and tried it again, 8Mhz, no cache. Two Bombs. We didn't have a program to test for the presence of an FPU, (they didn't know if it had one or not, duh!) so its still unresolved as to what's causing the problem. Please, if anyone out there can positively verify they can run Raytrace on a Mega STE - whether it has TOS 2.05 or 2.06, and whether or not it has a FPU installed - let me know and help me settle this issue once and for all. A related issue: Screen accelerators such as Turbo ST and Quick ST definitely had problems and prevented Raytrace from even loading. The Codehead's upgrade to Quick ST - WARP 9 resolved some of the problems. At least Raytrace will load and run now - and Edit mode is noticably faster when creating wireframe models. But in the testing process of switching from Edit to Trace mode and back I've had the screen fail to update properly. The Edit windows may not refresh between editing changes and end up a scrambled mess of lines - close, but no cigar as they say. Can't blame the Codeheads for this, since Raytrace isn't using real GEM windows in the editor, and can't call the WIND_UPDATE function proper to do a refresh. By creating a WARP9.DAT file, you can tell Warp 9 to automatically turn acceleration off when RAYTRACE.PRG is launced if need be. I'm still a little leery of this though. Having a handful of AUTO programs and ACCs in memory when Raytrace is running can cause Raytrace to behave unpredictably - it's definitely one of those programs that is best loaded from a cold boot... THE 'NEW' MATH: 512 - 510 = 2 I've finally gotten a chance to play around with Raytrace running in black and white by using Mick West's PD monochrome emulator - MONO_EMU.PRG. Other emulators I've tried have just caused Raytrace to crash, but this one works pretty well. The CPU overhead of the emulator seems to be offset by not having to calculate all the colors of color mode, so tracing times aren't much different. I'm gonna search some bulletin boards for a converter to get my color texture maps into hi-rez Degas .PI3 format and experiment with this mode further. The 9G nine 'grayscale' dither pattern mode in particular yields pleasing results both onscreen and printed out in black and white. Raytrace is rather unique in that it's almost two versions of the program rolled into one. The source code is interesting - rather than writing separate programs for color and mono users, the code frequently checks what rez it's in - if its not mono 640 x 400 then halves coordinates, cricumference, length, etc., variables to low-rez 320 x 200 and acts accordingly. Its an interesting example of how to write resolution independent code. But there is alot of overhead in testing for this condition all the time and jumping to the appropriate procedure. Resolution specific versions of the program would be much smaller and the Edit and Animate modes would probably be more responsive and quick to redraw, though it wouldn't affect rendering times. THAT SICK FEELING... Where is the future of raytracing going on the Atari platform? The TT, and the upcoming Falcon have hardware that just begs for a successor to GFA Raytrace, but I'm afraid that's far down the road. The Lexicor series of programs just doesn't seem the answer - it still lacks its own 3-D modeler, Prism Render is an add-on package that outputs non standard Targa files, and though a powerful animation suite in its own right, just isn't an integrated/dedicated raytracer, and isn't optimized for the bulk of low end Atari ST/STE machines out there. Its unfortunate I can't afford to really see what this suite of programs can do - but if you've got a TT and want to see what a successor to Raytrace is, Lexicor is leading the way. Maybe the Falcon series will change things. With a fair amount of horsepower, some excellent graphic specs, and some degree of affordability, maybe someone will take up the challenge of bringing a capable raytracing package to market for it. There certainly is a niche for one. GFA seems to be moving out of the applications market, so I'm not expecting the next generation to come from them. But I do appreciate what they accomplished with GFA Raytrace. As often as I bump into the programs limitations, I still feel a sense of awe at what it can do, and know as the only commercially successful tracer the ST/E has, it's set the minimum standard for what the next generation of tracers must do. I honestly hope Atari and some software developer can come up with a hardware/software rendering solution at a low price and keep us in the Atari family for many years to come. TOO BRIGHT FOR ITS OWN GOOD A few issues back I mentioned that Bright objects will 'wash' out the ground pattern, turning it to white at least in the area surrounding the object. Quite accidentally I discovered that this only occurs when the Bright object is close to the ground. If you raise the object up high enough, the ground pattern will return. If you must have a bright object near the ground in a scene, try using a large texture mapped rectangle as your 'ground' instead, and this problem will not appear. A WELL LIT SHADOW Say you've got the classic Mirrored Spheres Floating Above The Checkered Ground scene constructed, and it renders out well. Except... the shadows from the spheres leave completely black shadows on the ground pattern, where in real life you'd still see the checkered pattern lit dimly. Its the lack of ambient lighting in Raytrace's world is the culprit. To light that shadowed area, you need to dedicate an additional lamp just for the ground itself as shown below: Spheres - o,O L1 + Lamps - L O o L2 Ground - ___ ____________ Observer - + Side View Here, because of its proximity, the main lamp (L1) in front and above the spheres dominates the scenes lighting - as we want it to. the second lamp (L2) is placed much farther away, and closer to the ground to lighten the shadows, but keep its effect secondary. This little trick is what can make a good scene great, and helps restore the realism that a totally black shadow was destroying. An auxillary lamp enhances nearly every scene, the trick is experimenting with its placement/distance so the effect is subtle. You may also want to try coloring this secondary lamp to add a tinted glow to the side of objects. It really helps to 'round out' objects like the sphere, cone, & cylinder, since the sides of these objects often get lost in blackness and you can't tell where the object ends and the shadow begins. WEIRD AND NOT SO WEIRD THINGS TO TRY Experimentation and trial and error are pretty much a normal operating mode for anyone using Raytrace. If you persist long enough to understand all of RT's features, you'll begin to start exploring the edge of the program's limits, but more importantly some of the limits you perceive are in your own head. Here's some examples of some unusual things I tried: Underlighting: Illogically, a Ground in Raytrace is NOT an opaque object! You can place a lamp _beneath_ ground level and it will highlight the underside of objects placed on it and illuminate the ground pattern itself. The Glow Within: What would happen if you placed a lamp INSIDE a transparent sphere - would it glow like a light bulb? No... The sphere ends up black - but the rays cast from it would illuminate nearby objects. Raytrace is very quirky about multiple lamps and is very sensitive to distance when multiple lamps are used. I this case, the lamp in the sphere would be dominant because of its closeness, preventing other lamps from illuminating its outer surface. Tapered Cylinders: Something like a coffee cup seemed impossible at first. Only mugs are really cylindrical, but that isn't what I wanted. So I used a cone to give a tapered shape - by placing the apex of the cone well below ground level. (Then used an Ellipse Segment to create the 'C' shaped handle.) C\-----/ ____\ /_____G \ / v You could take beverages a step further; to create a glass of orange juice, rather than just use an orange cylinder object - think of it as it is, two objects - a glass, with orange juice in it - a 90% transparent cylinder object for the glass itself with another slightly smaller orange dull cylinder of 'juice' inside it. If you wanted to view it from a somewhat overhead observer, use an ellipse (perhaps a bumpy orange texture mapped one) to be the surface of the juice itself. Transparent objects: are quite challenging to get good effects with. Its often important to have some patterned object behind or perhaps a textured surface underneath them to really show off their surface quality. Transparent objects refract (bend) the light rays and appearance of adjectant objects - as they should. Keep your main lamp at a reasonable distance. Too close and the 'surface glare' of the lamp will override the transparency of the object. Tunnel vision: You can put your observer inside a cylinder and get a view of looking down a pipe by adjusting your view angles. Don't know what kind of scene its good for, but its possible... Something to reflect on: Raytrace's mirrors are very farsighted! Reflected objects often appear much farther away in the mirror's surface than they should be - much like the view in a cars side view mirror, or a Xmas ornament. But one interesting thing to try is a scene with objects in front of a mirror, but the observer placed in-between, only viewing what's reflected, not seeing the objects directly themselves. A Not-A-Sky sky pic: I've never been a big fan of the Sky function. Partly because sky pics get their brightness level from the colors in the loaded pic itself, and has nothing to do with the lighting level from the lamps used in a scene. So often your ground will recede into darkness at the back of your scene, then Boom! the horizon of the sky pic will abruptly rise up. To prevent this, make sure the rear of your scene is adequately lit (Lamp BL): BL=Back lighting lamp BL ML=Main lamp | ML O=Sphere Sky>| + +=Observer Pic | O |=Sky background -------------- (Side view) The alternate method is to 'zoom out' in the editor by editing at a 1/1 scale and creating a large vertical rectangle at the back of your scene (in effect, a Wall) the full width of your raytrace world, and apply the sky pic as a texture map instead. Now your 'sky' will be under the same lighting influence as all the other objects in your scene. This also helps preserve the aspect ratio of the pic used: Sky pics tend to be scrunched - say your horizon is at mid-screen - Raytrace literally throws away every other line in your picture to squeeze it into the upper half of the screen, severely distorting the pic. Texture mapped as a Wall, the aspect ratio will be preserved. 3-D TO 2-D Raytracing is all about creating illusions - and particularly with the ST's limited resolution and palette, your visual system and brain have to make some 'leaps of faith' and plug alot of holes and inconsistencies to perceive the realism you're striving for. Someone once commented to me that they felt Raytrace created rather 'flat' looking scenes - but thats really just the result of bad input. In some ways exaggeration is needed when building a scene to retain the depth you're striving for. I've previously mentioned separating your observer and main lamp in opposite directions to enhance shadows. Keep chanting the mantra of a good photographer or illustrator: 'light and shadow'. But a second trick is to really play on the depth perspective to its utmost by really moving your observer close in to your objects, then using various Rayscale setting to 'wide angle' your view. This is especially noticable in scenes with more than one object, say a scene with a pack of cigs, a matchbook, and an ashtray - here you have multiple reference points for depth cues. Think of 9th grade English class when you studied -prepositions- (