https://github.com/bhouston/3dmaskdemo1997
Real-Time 3D Texture Bump Reflection Mapping on a Mask. 16-bit DOS, Demo Scene 1997
https://github.com/bhouston/3dmaskdemo1997
computer-graphics demoscene dos
Last synced: about 1 year ago
JSON representation
Real-Time 3D Texture Bump Reflection Mapping on a Mask. 16-bit DOS, Demo Scene 1997
- Host: GitHub
- URL: https://github.com/bhouston/3dmaskdemo1997
- Owner: bhouston
- Created: 2014-12-06T22:55:56.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-15T16:28:29.000Z (over 11 years ago)
- Last Synced: 2025-03-14T20:49:19.506Z (about 1 year ago)
- Topics: computer-graphics, demoscene, dos
- Language: C
- Homepage: https://benhouston3d.com
- Size: 301 KB
- Stars: 14
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.TXT
Awesome Lists containing this project
README
Phong-Texture-Bump Readme
Ben Houston [ plash / AZuRe ]
Friday, March 14, 1997
e-mail: 'bhouston@geocities.com'
Here is the results of my first attempt at phong texture
bump mapping. I'm moving from BC4/TASM to Watcom and my next
engine won't be so limited as this thing. Although this engine
is fairly limited it is fairly fast because of the fixed point
math, fast polygon tracer and dirty rectangle animation. You
will find alot of weird things in this source because I started
to run out of space in the data segment and I had to reuse
portions of it. Let me tell you that phong-texture-bump is not
ment to be done under 540 kb using a small memory model in 16 bit
real mode.
To learn about some of the techniques used in this source it
would be best to read other people's work that is more suited to
learning from. The texture mappers used are all based on a doc
called FATMAP.TXT written by MRI. The fixed point rotation is
based on Rex Deathstar's EMPHONG4 archive. Rex also has an
example of how to enviroment map and it the technique on which my
source is based. The bump mapping method is my own as well as
the phong map calculations. The phong palette calculations are
not totally correct but fairly close. The technique used to
bumpmap causes bumps to appear larger then perpendicular to the
viewer than when the bump is facing the viewer
head on. The distortion has to do with the non uniform phong
map. Most of the code was written when I had way too much coffee
so please ingore that the libraries are called "nothing comes
close" (NCC) ;).
Enjoy the code, if you do use it give credit or your
plagerizing (taking credit for work that's not your own). I'm
always happy to get mail discussing techniques or whatever. By
the way I am looking for one talented musician to help with a
major big demo.
PS. I've added reflective metal shading and plastic phong
shading jsut for the fun of it. The inner loops of almost all
the triangle drawers are totally shit! I'm moving to Watcom so
there is no point optimizing realmode code. Real mode sucks shit
and I'm done with it!!!
PPS. I Want Greets Too!
What's in the archives I hear you ask?
azr_ptb2.zip main archive
readme.txt this file
ptb_bin2.zip archive containing working demo
ptb_demo.exe the demo executable (small eh?)
azure.raw background (320x200)
bumpmap.raw star heightmap (256x256)
texture.raw star texture (256x256 32clr)
texture.pal texture palette (32 clrs used)
refmap.raw metal reflection map (grayscale)
mask.vtx vertices for object
mask.nrm vertex normals for object
mask.fct facet indices for object
mask.txr vertex texture coord for object
ptb_scr2.zip archive containing all source code :)
ptb_demo.cpp main c++ source for demo
ncctypes.h types header for ncc library
nccgraph.* graphics functions
ncctri.* alot of triangle drawers
ncccolor.* palette quantization
nccmisc.* just simple crap
azr_ptb.ide project file for Borland C++ 4.0
Greetz:
Mundane - in no particular order. Asch - that girl has
driven me insane. Olivier - am i bothering you? xyz - try to use
some sentence structure :). TimJ/Vertigo - a guy who know's his
phong. Phantasm - how goes the engine? Cyclone - object
orientation overload (And the guy that kindly uploaded this).