Credits
All the code is mine. LWSINTERP.C is based on Ernie Wright’s implementation, JPEG decoding on the IJG library, and sound on FMOD by Firelight Technologies.
The Win32 splash screen and the icons are by Yoyo. Jylam beta-tested the Linux X11 build, Med and f0st beta-tested the rest, and Yoz, Xbarr and Fraa supplied LightWave test scenes — the same people whose scenes went into the demos.
jfyeNG is free for non-commercial use.
Just For Your Eyes NG
jfyeNG is a replayer for scenes built in Newtek LightWave 6.x and 7.x: you point it at an .LWS file and it plays the scene back in real time. It is the engine underneath every Condense PlayStation 2 production of 2002 — PS2Room, Monalisa, Evolution, Lobotomia — and, in its Windows form, behind Red Line the year after. In April 2003 I released the tool itself.
The executables in the archive were built on 20 March 2003 and sign themselves jfyeNG (c) Arnaud Storq 1998-2003: the copyright line goes back five years before the release.
Platforms
The documentation lists three, and claims of the architecture that it is “robust, modulable and portable”:
- Win32 — 95, 98, Me, NT4, 2000 and XP, in two builds, one going through OpenGL and one rendering in software
- Linux — X11, over Mesa
- PlayStation 2 — EE and GS only, no vector units
The archive that survives on scene.org, reuploaded in December 2012, holds only the two Windows builds, the archiver, the precacher, the demo pack and the documentation. The Linux and PlayStation 2 layers went out inside the demos rather than as executables anybody could download.
What it took from a scene
The readme opens its compatibility section with a warning to the reader: jfyeNG renders in real time, so do not go using the advanced parts of LightWave. What it did read is this.
- Scene: size, backdrop colour
- Objects: motion, dissolve, parent, null objects, deformation, morph mixer (endomorph), pivot point
- Lights (hardware-accelerated builds only): distant lights and nothing else, intensity, motion, colour
- Camera: motion, parent, zoom factor
- Surfaces, any number to an object: scrolling, gouraud, additive, double-sided, and mapping —
- planar
- UV
- cubic
- cylindrical
- spherical
- environment, faked
- Images: JPG, and TGA in 8, 16, 24 and 32 bits, raw or packed
Gouraud, mapping and additive combine freely: a surface can be gouraud-shaded and planar-mapped at once.
What it would not do
Some of this is in the documentation, and the rest the engine tells you itself when a scene fails to load and the screen goes red:
- objects must be LWO2, so LightWave 6.x and up — Error : %s is not a LWO2 file (LW 6.X+) !
- one layer per object — Error : %s has more than 1 layer !
- no NURBS and no bones — Error : %s has a bad polyCount definitions ! (Nurbs & Bones are not supported)
- morphing works with planar and environment mapping only; UV mapping and an endomorph together draw a warning into the log and are ignored
- the software and PlayStation 2 builds have no lights at all
- textures must be JPG or TGA
Texture scrolling
There is no scrolling parameter anywhere in the user interface. You put a keyword in the name of the texture file and the engine reads it there: SCUP for up, SCDN for down, SCLT for left, SCRT for right. A texture called TEXTURE_SCUP.TGA scrolls upwards.
Archives and precaching
Two companion tools ship beside the player, both Windows-only.
jfyeNGArchiver gathers scenes, objects, textures, precaching files and audio into a single compressed .JNG. A scene loaded from an archive no longer carries the absolute paths of the machine it was built on, which is what makes a demo distributable — the alternative was hoping the viewer had a C:\LW\LWS\ of their own.
jfyeNGPrecacher walks a scene ahead of time and writes a .PRK beside it, listing what never needs to be drawn because something else covers it. The player picks the file up on its own and prints Precaching file found in the log, then (using precalculation) on screen.
Playing
The window is a playlist and a row of buttons: Add and Remove for scenes and archives, Set LW path for the LightWave content directory — it behaves exactly as LightWave’s own does — Set audio file, a resolution among 320×240, 512×384, 640×480, 800×600 and 1024×768, and two checkboxes, Full-screen and Bilinear. All of it is remembered in jfyeNG.ini, and everything that happens is written to jfyeNG.log.
Audio goes through FMOD, which is generous about formats: MOD, S3M, XM and IT, MIDI in .MID, .RMI and .SGT, WAV, MP2 and MP3, Ogg Vorbis, WMA and ASF.
While a scene plays, four keys do something:
- space bar — skip to the next scene
- L — lines mode, the scene in wireframe
- S — snapshot, written as a TGA into the current directory
- T — the overlay, which counts the frames, reports how many triangles are in how many objects, and gives the frame rate
When the last scene of the playlist ends, the playlist starts again from the top.
The demo pack
jfyeNGDemo.JNG is a 3.2 MB archive of twelve scenes, and it is a reasonable tour of what the engine could do. Five of them are named after a mapping mode and demonstrate exactly that — planar, spherical, cylindrical, cubic, environment — with scroll for the scrolling textures. The rest are real work: sallefeu, Xbarr’s room on fire, the one PS2Room was built from; evolution, out of the round 7 demo; hotpursuit, a Porsche and a BMW on a looping road, wheels modelled apart from the bodies; citrouille; john; and fresco, by a distance the largest, a hundred and twelve objects and textures for a bridge, a tower, an island, a butterfly and a guard of Olympus.
What was still on the list
The documentation ends with a to-do list, in the author’s order of priority, which reads now as a fair account of where the engine stopped:
bones management · correct lights management · a 2D bitmap displayer for billboards · particles · triangle stripping · a correct dissolve, sorting the blended faces · LZW and RLE compression in the .JNG files · running as a screen saver · object removal by bounding box · an LWO packer that drops the unused chunks