atari's journal picture

atari

followFollow
🤴
Administrator: atari
🕒
Created 15 Sep 2018
📄
288 Articles

Documents about Atari computers like ST, STe, Falcon 030, ....

Texture Mapping Howto

DrWatson's profile picture
Published in 
 · 30 Nov 2023
WARNING: this document contains hazardous information and should be used with great caution! Also the code contained herein is of the c/c++ breed. Definitions: (u, v) coordinates: the (x, y) coordinates of a texture interpolation: (x2 - x1) / (y2 - y1) or (y2 - y1) / (x2 - x1). X and y don't have to be points, they could be colors. screen space: flat 2d space (3d space projected onto the sceen. scanline: a horizontal line, joining two opposite edges of a triangle. Affine Texture Mapping: Affine texture mapping is the easiest method to map a texture onto a triangle (or any polygon for that matter). I want to focus on textur...

Shadows

DrWatson's profile picture
Published in 
 · 30 Nov 2023
Introduction Shadows add a lot of realism to a 3D engine. They help to impart a good deal of information about movement, lighting and shape. Shadows are your friend. Use them wisely. Fake Shadows Perhaps the easiest shadows to make are fake shadows. Amongst the easiest are casting them to the floor. An easy method is to project your triangle to the floor (Y = 0 in most 3D engines). Then do a simple divide by Y, so the higher an object is, the smaller the shadow. Simple, but effective. This doesn't take into account the direction of the light source. Again, this is easy to do: s.x = p.x - (p.y / l.y)*l.x; s.z = p.z - (p.y / l....

Shadow Rendering Algorithms

DrWatson's profile picture
Published in 
 · 30 Nov 2023
02.september.1997 GFX by Hin Jang Shadows provide a visual cue to the spatial relationships among objects in a given scene. Simulating hard shadows is possible using clever approximations [1]. More robust algorithms that simulate shadows cast by moving, complex objects onto multiple planar surfaces have also been developed [2, 3]. Soft shadows caused by extended light sources, however, require greater computation; those areas with an umbra (fully shadowed regions) and penumbra (partially shadowed regions). At true interactive rates, simulating soft shadows in a dynamic and complex scene require high-end, parallel hardware. The principle o...

Isosurface Generation

DrWatson's profile picture
Published in 
 · 30 Nov 2023
16.july.1997 GFX by Hin Jang An isosurface is defined by a set of points that satisfy the following equation S(x, y, z) - C = 0 where S is a spatial function and C is a constant. The surface is usually displayed as set of triangles, all of which are formed by local intersections between cells and the surface. Cells that do not intersect the surface are not part of the volume. Ito and Koyamada developed an efficient algorithm that visits only intersecting cells and cells that are included in cell lists [2]. Isosurface generation consists of a preprocess and a main process. main() { /* -------------------------------- Pre-process */...

Efficient Antialiasing

DrWatson's profile picture
Published in 
 · 30 Nov 2023
24.july.1997 GFX by Hin Jang Increasing the sampling rate or removing the high frequency components of an image are two ways of limiting the effects of aliasing. Both methods, however, have high rendering costs. An incremental algorithm that is derived in the spatial domain under a subjectively meaningful error term is described herein. Its simplicity suggests a practical hardware implementation and produces the same pixels as Fujimoto-Iwata's algorithm at a fraction of the latter's computational cost [1, 2]. Let y = f(x) be a curve digitised in the raster plane. Sampling in a scan coherent fashion requires that for every pixel al...

What is a radix?

DrWatson's profile picture
Published in 
 · 30 Nov 2023
The Insert Counting algorithm is the fastest sort algo i've ever seen. Read this. This document explains the radix sort algorithm that doesn't use linked lists, but rather an index hashtable, or insert counting, which makes it mush faster. It also includes some samplecode in pascal. Later I may include C++ samplecode as well. Contents What is a radix? Sort a list by one radix Sort a list by n radices Optimization Pascal samplecode What da phuck is a radix? A radix is a position in a value. The value 342 has three radices. The value 17 has two radices. So a radix is a number at a position in a value. The radices are counted from th...

S-Buffering: The Latest Fad In Software Rendering

DrWatson's profile picture
Published in 
 · 30 Nov 2023
Introduction S-Buffering is pretty much one of the latest crazes in software rendering, especially since the release of Quake. (Update: I'm not sure if Quake uses S-Buffers exactly, or if its a variation on Edge Tables. I'll try and find out ... ) But what is it? It was originally described in a FAQ by Paul Nettle. However, I have seen literature being referenced going back much further than that. In simple, S-Buffering is used to reduce overdraw, by sorting and splitting spans. Hence Span-Buffering. Its often used where there is a large overhead when writing a pixel; for example perspective texture mapping, or true phong shading...

3D Shading

DrWatson's profile picture
Published in 
 · 27 Nov 2023
Seventh part of The 3D Coding Blackhole tutorial series Computing the Normals Doing the Cross Product Using a light table Computing the Normals Ok... we deeply discussed vectors and normals in the 3D mathematics tutorial, so here are some implementations: float VEC_DotProduct(_3D Vector1, _3D Vector2) { return (Vector1.x*Vector2.x+Vector1.y*Vector2.y+Vector1.z*Vector2.z); } _3D VEC_CrossProduct(_3D Vector1, _3D Vector2) { return P3D(Vector1.y*Vector2.z-Vector1.z*Vector2.y, Vector1.z*Vector2.x-Vector1.x*Vector2.z, Vector1.x*Vector2.y-Vector1.y*Vector2.x); } void VEC_Normalize(_3D * Vector) { float m=sqrt(Vector->x*Vector->x+Vector-&...

3D Texture Mapping

DrWatson's profile picture
Published in 
 · 27 Nov 2023
Sixth part of The 3D Coding Blackhole tutorial series Overview The Magic Numbers Perspective Correct Texture Mapping Overview The first things you must think about when doing texture mapping, is having an array of textures and initializing 3D texture coordinates. The textures will be stored in: #define MAXTEXTURES 16 bitmap_t Textures[MAXTEXTURES]; We will allocate and load them from PCX files. I chosed to make all of them 64x64. We will use the texture coordinates of the polygon_t structure: vertex_t P,M,N; We will initialize them in a function that we will called after creating the polygons. P is the origin of the texture, M the horizo...

Hidden Surface Removal

DrWatson's profile picture
Published in 
 · 27 Nov 2023
Fifth part of The 3D Coding Blackhole tutorial series The Dilemna Backfaces removal Z-Buffering The Dilemna The heart of a 3D engine is its HSR system... So you must think twice about which one to chose... I'll point right now the pros and cons of the most popular ones: Painter's algorithm Required time increase faster Hard to implement (especially overlapping tests) Unable to sort correctly complex scenes BinarySpacePartitioning trees Extremely fast Hard to implement Can only sort static polygons Need stored trees Z-Buffering Required time increasing linearly with the number of polygons Faster than the Painter's above 5000 p...
loading
Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT