Miracle #03
16 июля 1999

kodit Who's there? - Attribute bump mapping: bump mapping for those who have not entered.

<b>kodit Who's there?</b> - Attribute bump mapping: bump mapping for those who have not entered.
    (C) Crite / Triumph

    (I) Blade / Triumph

    -----------------



    As once bored, I decided to write
lighting effect, the bulk surface
smarter to say bump mapping. Of course many of these effects 
have you seen in different demah, but my effect is more simple 
and fit into a frame, more precisely about

40,000 cycles.


    I have long thought by some light on the display screen and 
the flu has prompted me, finally turned out an attribute 
option:) As soon as a reservation that all lower contained 
nothing more than just a bump mapping'a algorithm and is 
designed to development of ideas novice coders.




           So my method is

           that you specify the volume
           CPC as a set of plates
           films with different angle of tilt
           at. That number plates

           taken in my source:


           4,3,2,1 - change the brightness

                     light;

           5,0 - no change.



    Here is how I define brightness
inclined plate. To do this I need
set the coordinates of the center and the current
pieces of the light beam. In theory this is done as follows: to 
remember the coordinates of the upper-left corner of the beam 
associated with the upper left corner of the screen, then add 
the numbers to determine the center this beam and compare the 
obtained values ​​with the coordinates of the current piece.



    All of this consumes a lot of time
and I went another way: Links
coordinate system with the upper-left corner,
but not the screen and light beam. Coordinates
center with respect to this coordinate system - constant, ie 
does not change number. Constant compared with the current

coordinate and, depending on the type of
the current site, call for different procedures (some of them 
below). Coordinate upper-left corner of the light beam relative 
to the upper-left corner of the screen I use only once in one 
step effect, to calculate the starting address in the 
attributes. 


    Procedure for calculating the brightness work like this: 
Take for example the plate 1, if it is located to the left than 
the center source, then we call this position # 1,

and if the right (ie, its light under a
angle closer to 90 degrees than in the
position # 1), called, respectively,
position # 2.


    Table Light is given the form of the beam
light, where the number of the color and radius
ring one of brightness. Brightness I did not
calculate the complex methods, and given two
Table TABL1 and TABL2 (for # 1 and # 2
position). Table Format: 1 - to
0th, 2 - for the first and so on up to 8
brightness.


    Coordinates are specified in a separate file. First is the 
coordinate of x, then y. But you should bear in mind that the 
beam light should not fly over the screen.

I did not do on this test, because
that it takes a long time. By the way
coordinates, you can set the program COORD (located in the 
appendix), it 100 sets of coordinates Lissajous figures.



    In order to know the speed of the program - remove the 
semicolon in the rows with "@". Source you will find in the 
appendix, it is called "LIGHT.H" (of course in a format 
ruleznogo assembler ALASM).




       That's all folx!









Other articles:

From the Editor - Preface: For what purpose we are releasing the magazine?

From the Editor - shell: a description of a new obolchka to the magazine.

From the Editor - a letter to the journal: Dr.Sioux / Phantom Family, Fistsoft, Mr.Z / HardWave, Kurov N., Eagle / Computer Ratz Group, Rom Corp / Virtual Vision Group.

From the Editor - in this issue: Content.

Project of the Year - presentation version of the game of Robo KT-soft/ETC.

Project of the Year - a presentation of the game from a group of Spark: Townships.

Project of the Year - a presentation of the game "12 secret book."

Project of the Year - a few words about the upcoming game, Chip & Dale.

Project of the Year - an amazing story to the game "Navigator".

Project of the Year - World of Darkness: a description of a new real-time strategy.

Rattles - Fresh or not, but savory cheats.

Rattles - Crematorium: STALKER game - a description of all items.

Rattles - Crematorium: Country Myths - Tips specials.

SWAP'A Basics - information for beginners as well as a few sly misrepresent, which You can crank the mail.

kodit Who's there? - Quick graphics: a few recipes from Zetter'a (print sprites, update the screen).

kodit Who's there? - Packer'y and Depacker'y: the truth about the packer or the ranting of Sir Kot'a.

kodit Who's there? - Working with MS-DOS: All about the mod files - a full description of the structure of mod-file, as well as a description of all effects.

kodit Who's there? - Working with MS-DOS: Ms-Dos floppy disk - a description of the structure of Ms-Dos disk.

kodit Who's there? - Chanky flame: a description of the algorithm chankovogo fire.

kodit Who's there? - Attribute bump mapping: bump mapping for those who have not entered.

kodit Who's there? - Guru meditates: optimization programs for execution time and size.

kodit Who's there? - An approximate search for a given sequence of bytes!

kodit Who's there? - Fast 42 print: fast how to print 42 characters in a row.

Party zone - KidSoft'98: a report from the Voronezh Festival of Computer Art.

Party zone - EarthQuake'99: a report from the Chelyabinsk festival of computer art.

Myself - 128 colors on the Spectrum: Revised scheme of up to 128 colors from the Donetsk group Spark.

Myself - Kettle: Connection General Sound to Profi through the system connector.

Myself - Uninterruptible Power Supplies: UPS-information technology.

Myself - General Sound Filter: story of the new gadgets to the GS.

Myself - Modems: Diagrams, charts! Scheme G. Shepeleva Kondratiev and M. Hayes modem connection.

Myself - Modems: Command - Command terminal.

Myself - Modems: Total modemizatsiya - a call to connect momedov.

System Software - FastCopy 3.0: a complete description of tricked out turbo-copyist.

System Software - Pro Tracker bugs! Several glyuchkov in ProTracker'ah.

System Software - Pro Tracker 3.4 final presentation remix Pro Tracker from Samara.

News - Chelyabinsk: X-Raizor returned to the Spectrum, Wocen wrote boot, Blade otdahyet, Steelzer joined Triumph, Crite completed the alpha version of the "World of Darkness", Bytic bought GS, Edison makes the site, Ironman wants to buy Spectrum.

News - Omsk: full staff and are expected products from a group of U98.

News - Kaliningrad: The loud death or Spectrum quiet life in Kaliningrad.

Techno-nature - Electronic music: Dj.Ironman talks about technology (Part 1).

Techno-nature - Electronic music: Dj.Ironman talks about technology (part 2).

Techno-nature - Internet music-sites: a lot of addresses where you can learn new about electronic music.

Techno-nature - Addiction XX: bike from Dj.Ironman 'as well.

a quarter to four - the story of everyday life from the X-Raizor'a.

Room with laughter - smells in and around: funny story from the magazine PTUCH.

Room with laughter - Perdmen: damning story of all of the same PTYuCh'a.

Room with laughter - Wick: nekolko scenarios from the film chronicles the wick.

Room with laughter - Halo: The end of the story published in the second room.

Proclamation - advertisements and announcements about finding friends on the Spectrum.

Proclamation - advertisements and announcements about finding friends on the Spectrum.


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
Miscellaneous - From the history of the Amiga.

В этот день...   29 April