--- Bezier Patch tesselator images |
||
XBox/PC Normal Mapping
Hologram Shader (DX9 only)
updated 8th Mar 2003
This app only works on PS2.0/VS2.0 or higher compatible only. At some point in the future I will complete the paper on the theory side of this shader and also post it on this page.
What this shader app basically does is use the angle between the viewer and the credit card to work out how to draw the image in such a way as rotating the card or moving the viewers position or orientation to the credit card makes the image appear to move in a way that suggests depth. In the same way that 3D games are essentially mono 3D (i.e. not true stereo 3D as we have in real life due to binocular vision), this effect is also in mono, but the results are pleasingly (and intentionally) similar to the effect of a real hologram
Download the exe to see for yourself. (890kb roughly)
Download the Technical Paper (347kb approx)
Further updates coming soon!Hologram Shader
Projected Textures
Projected Textures are a very simple to implement feature with the new DirectX7 API. Very important to get right, the FVF paramater you must pass to DrawPrim looks something like this if you have 2d base texturemap coordinates and 3d lightmap coordinates per vertex;
D3DFVF_XYZ| D3DFVF_DIFFUSE| D3DFVF_TEX2| D3DFVF_TEXCOORDSIZE3(0)| D3DFVF_TEXCOORDSIZE2(1)
Although having said that you could just use
D3DTSS_TCI_CAMERASPACEPOSITION
and not have to copy the vertices position into a 3d set of texture coordinates.
The other imprtant thing to do is setup the texture matrix....
D3DUtil_SetViewMatrix( matLight, LightFrom, at, up );
m_pd3dDevice->SetTransform( D3DTRANSFORMSTATE_TEXTURE0, &m_matProj );
m_pd3dDevice->MultiplyTransform(D3DTRANSFORMSTATE_TEXTURE0, &matLight);
where m_matProj is the projection matrix used for the viewing transform.
click here to download the demo and bitmaps (Project.zip, 74kb)
WARNING ! this demo only works on DirectX7 and upwards !
(Use the arrow keys to move the spotlight around.)
'Toon' and Anisotropic lighting.....
'Toon' is just slang for cartoon as the cartoon style is used to make 3d look 2-and-a-half-D, which looks pretty neat in my estimation.
Download the exe for yourself to look at. (232kb roughly, requires DX6.1 or above)Toon rendering Anisotropic lighting effect
Perlin Noise Generator
updated 23rd Dec 2002
Here is a rough and ready app for generating perlin noise maps (256x256 currently)
Download the exe for yourself to look at. (65kb roughly)
I'll be adding the ability to change the paramaters with the GUI soonish, at the moment they are random every time you click on the "Create Noise" button
Perlin Noise Generator App
Bezier Patch Renderer
The main image is a photoshop composite of two runtime screen shots taken from my real time patch renderer showing both wireframe and solid fill of the standard generic head patch model that comes with MAX 2.5. You can alter the Level Of Detail dynamically at runtime, from just one set of input data which is considerably smaller than the space taken up by the vertex data generated for the highest level of detail. The reason for the rather uninteresting stripey "wallpaper" textures is because the plugin we need to map textures correctly onto patch models is still under development, as this is one area where MAX is currently lacking. The last of the four smaller images has around 42 thousand submitted polys which are being transformed, lit and rasterised by the Direct3D pipeline (Version 6.1) on a P3-500 machine with 128MB and an 8MB G200 card. If you look closely, you might just be able to make out that the more polygons the model has, the more he smiles ......
download patch.zip (201kb) for DX6.1 or higher
Use this exporter (see link below) to create your own patch models. Note; you have to make the model centered around absolute 0,0,0 and no larger in extent than would fit into a 100,100,100 cube centered around the origin
download Max 2.5 patch exporter (patchexp.zip 87.5kb)
Thanks to Andrew Reid for creating the Max exporter for me, without your help none of this work might ever have happened. Please visit Andrew's Site.
Snotmonster.comPatch Renderer