send messagemessage
articles
journals
info
atari
atari

Texture Mapping Howto

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
atari
atari

Shadows

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 does
atari
atari

Shadow Rendering Algorithms

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 shadow
atari
atari

Isosurface Generation

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 cel
atari
atari

Efficient Antialiasing

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 com
atari
atari

What is a radix?

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 val
atari
atari

S-Buffering: The Latest Fad In Software Rendering

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 S
atari
atari

3D Shading

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-V
atari
atari

3D Texture Mapping

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: v
atari
atari

Hidden Surface Removal

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 stat
atari
atari

Sutherland-Hodgman Clipping

27 Nov 2023
Fourth part of The 3D Coding Blackhole tutorial series Overview Z-Clipping Clipping against the screen Overview Some chineese proverb says that drawing polygons elsewhere than on the screen is bad, so you're better clip your polygons. You must clip against the edges of the screen, but also against the front of the view volumes (you must not draw things behind the viewer, when the z coordinate is too small). When we clip a polygon, we don't check if every point is inside the limits, but
atari
atari

Polygon Filling

27 Nov 2023
Third part of The 3D Coding Blackhole tutorial series The polygon structure Finding the triangles Scanning the triangles lines The polygon structure How will we store our polygons? First of all, you must know that at this state, our polygons will be flat 2D polygons. And since the original polygons will be 3D, we will only need one temporary 2D polygon, so we can set the maximum number of 2D vertices to a constant number, without wasting an important amount of memory: typedef struct { _2D Point
atari
atari

3D Transformations

27 Nov 2023
Second part of The 3D Coding Blackhole tutorial series Saving coordinates Implementing a matrix system Implementing a trigonometric system Creating the transformation matrices How to create perspective Transforming objects Saving coordinates It's now time to start coding some starfield simulator... So what will be our fundamental structure, in which the description of every object will be stored? To answer this question, we'll ask another one: What are the types of coordinates we need?
atari
atari

Mathematics of 3D Graphics

27 Nov 2023
Mathematics of 3D Graphics First part of The 3D Coding Blackhole tutorial series An Introduction to 3D Vectors Matrices Operations on Vectors & Matrices Transformations Planes & Normals An introduction to 3D Ok so here it starts... with the coordinate system. You probably know that in 2-D, we usually use René Descartes's Cartesian System to identify a point on a flat surface. We use two coordinates, that we put in parentheses to refer to the point: (x, y) where x is the coordinate o
atari
atari

Water

26 Nov 2023
Introduction Water is a really nice effect, one of the better tricks around. Its also pretty simple to code, should take no more than an afternoons work to get a good water routine. Basics First thing you'll need is 2 buffers, for the water. This needs to be an array of ints, same size as destination buffer. Arrange these in a 2-element array, to ease the flipping. Clear these to zero, and you're ready to start. Calculate The New Water Calculating the new water is pretty simple. You'
atari
atari

How to do free-directional tunnels

26 Nov 2023
by BlackAxe / KoLOr 1997 In the latest demos (in almost every demo from Assembly97) you see those funny free-directional tunnels, namely tunnels where you can move how you want and perform complex camera movements. Many people in iRC asked me how to do such a tunnel, so instead of wasting phone costs and explaining it online i decided to write this little tute. In fact, this effect is kinda easy to do, but unlike normal, old, silly tubes it doesn't work with those silly lookup tables (d
atari
atari

3d starfield

26 Nov 2023
3d starfield
THE OUTLAW TRIAD DEMO-SERIES PART II Written by : Vulture/OT Code in : Pascal/Asm Topic : 3d starfield Introduction Welcome to the Outlaw Triad demo-series! In these series we will be talking about programming demo-effects in either pascal or assembler. Theory behind the effects shall be discussed while a full source code is also provided. In this second release of the Outlaw Triad demo-series we will discuss how to create a 3d starfield in 100% assembler. This is a well known effect in
atari
atari

How to create plasma effects

26 Nov 2023
How to create plasma effects
ÛÛÛÛ ÛÛÛÛßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß ßÛÛÛÜ ÜÛÛÛß -= Demo Programming Series =- ßÛÛÛÜ ÜÛÛÛß by Sten Roger Sandvik ßÛÛÛÛÛß ÜÛÛÛßÛÛÛÜ I - HOW TO CREATE PLASMA EFFECTS ÜÛÛÛß ßÛÛÛÜ ÛÛÛÛ ÛÛÛÛ (c) 1994 by X3M Productions ÛÛÛÛ ÛÛÛÛÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ Hey all out there, and welcome to part one of the X3M demo programming series. In this and all of the following demo programming series, I'll take it for granted that you know how to program the VGA controller, and som
atari
atari

Fixed-point unit for the Atari ST

26 Nov 2023
Hi MiKRO ! sorry for that late reply - but "better late, then never" : ).... concerning the source i have to say that it's a pretty old one and i neither have looked at them, nor i have used them for many years now, so instead of discussing your questions, i'll give you a little essay on the fixed-point-representation - if you've understood the basics you should easily be able to directly write streamlined fixed-point code instead of using a library everytime ... fixed-point will al
atari
atari

A fast way to calculate the root square of a number using derivatives

26 Nov 2023
Fast Square Root Doc by Noble Roman Ok, if you studied calculus you might already know this but lets say you need that square root of 23, and you have no calculator and you really need the answer. So you make f(x) = \sqrt x According to some differentiation rules you take f(x) and add it to the derivative of f(x) [ which is f'(x) ] and multiply it by dx. dx is the difference between x and some normal square close to x. \sqrt{x} + \frac{dx}{\frac{2}{\sqrt{x}}} From this you get a very close
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