<< >>
justin = { main feed , music , code , askjf , social , pubkey };
[ <<< last (older) article | view in index | next (newer) article >>> ]

October 25 2008
ah, 1997. or: nostalgia

So in 1996 and 1997 I wrote a 3D library called Plush. Here is a screenshot from then:

It was written in C, it tried to be very portable (reading through it now, I'd say almost to a fault -- kinda annoying ;). There were some nifty things about it:

  • 256 color output with adaptive palette creation and management
  • multiple light sources
  • piecewise linear perspective corrected texture mapping
  • Gouraud shading with color ramps that let you do fakePhong
  • optional Z-buffering
  • environment mapping
  • object hierarchies
  • frustum clipping
  • cameras
  • splines
  • matrix functions
  • primitive generation
  • very basic translucency
Totally useless today. But it would run SO fast with 20x the power available...

The code itself wasn't too bad, some stuff that I had spent ages tweaking and getting to run smoothly would surely be reusable.

So in about 8 hours of work I transformed it into Plush2, which is similar to the above, except simplified in C++, renders to 32 bit per pixel output, integrates with our LICE compositing engine, and supports the following new features:

  • 24 bit color output
  • multiple COLORED light sources
  • Texture mapping (piecewise linear perspective corrected) with optional BILINEAR filtering and support for any sized texture, support for texture transparency.
  • Colored Gouraud shading
  • Z-buffering
  • True surface transparency support
  • Multitexture support (one or both textures can be used as environment maps)
  • Full control over how pixels are combined at render -- add, mulitply are supported replace, all with alpha control.
  • No limits on number of light sources, triangles, etc.
A screenshot:

Yes yes I know 3D stuff has all been done a ton, just thought it was interesting bringing things back from the dead to see what would be reusable. Now I'm going to go hug my 2.4ghz multicore processor.

This will be a part of the next WDL release, in case anybody cares, ha ha. It does compile down to pretty small (though not small enough to go making a 4k demo with it)








9 Comments:
Posted by gio on Sun 26 Oct 2008 at 09:26 from 62.103.65.x
i'm so excited, i can't wait for the next WDL... :)


Posted by Xenakios on Sun 26 Oct 2008 at 20:53 from 91.155.43.x
WDL rocks! Even if I don't really know all the stuff in it, heheh... :-)


Posted by argee on Tue 28 Oct 2008 at 07:52 from 154.20.105.x
Seriously, 8 hours and that's all you could accomplish (ha ha).

Just curious, do you get into some kind of zen trance when you're coding, 'cause it just seems you can produce mind boggling amounts of stuff in the time it takes me to get "Hello World" on the screen.

Seeing this is making me want to try game programming again.


Posted by Justin on Thu 30 Oct 2008 at 16:19 from 64.81.54.x
Yay new WDL is up with this (and other goodies!)

cockos.com/wdl/


Posted by Justin on Thu 30 Oct 2008 at 19:21 from 64.81.54.x
ahh dammit, after I released I noticed quality issues with the bilinear filtering.. oh well will update it soon enough I guess...


Posted by gio on Fri 07 Nov 2008 at 13:42 from 62.103.65.x
too much silence lately. i'm feeling something great is going to happen :)


Posted by Elliot on Thu 20 Nov 2008 at 07:41 from 24.9.158.x
Wow, I remember Plush from #C (irc), many years back. I was developing a library called ThreeD at the time. Remember when we'd trade builds back and forth?


Posted by yathosho on Thu 20 Nov 2008 at 10:25 from 84.114.227.x
how about a new AVBS as your next project? :)


Posted by elena on Mon 24 Nov 2008 at 10:27 from 62.11.253.x
Hi Justin, may I publish some of your beautiful pics (scenery) in my facebook account specifying the source? what is an email of yours I can use to write you?thanks a lot if you will answer me...ciao Justin. Elena and all of her cats fr Italy.


Add comment:
Name:
Human?: (no or yes, patented anti crap stuff here)
Comment:
search : rss : recent comments : Copyright © 2017 Justin Frankel