Scenergy #02
31 декабря 1999

Coding - Texture mapping + Phong shading implementation of the Senat / Eternity Industry.

<b>Coding</b> - Texture mapping + Phong shading implementation of the Senat / Eternity Industry.
                           Warning!!!
 I earnestly ask editors to leave Scenergy article
unchanged. All responsibility for what has been said, I'll take 
care of 

                                       (Senat / Eternity 
Industry) @


Texture mapping + Phong shading

(C) Eternity Industry


    In this article I will try to explain how to implement this
inhibitory effect on the ZX. Instead it you can see in our 
demuhe "Napalm" (the part where Dangle hemisphere, in her tight

texture on the surface of the eye and runs a light flare) on 
the Amiga This effect has long been implemented in the demo 
Ramses'a, Mellow Chips, Floppy, Exploder'om, et al. I shall 
warn that this article is intended for the encoder above 
average, so everyone there SerzhSoft'am etc. reading is simply 
forbidden! :) If you understand how to make a texture map and 
the environment, then This is not coded in the cellar, explains 
the re-T_MAP just laziness. Incidentally, the same method can 
be implemented and T_MAP, accelerate shading about 30 percent.


    Dear coders! if you just want it coded,
I advise not to rush to make a start at least Gouraud or
T_MAP!

I'll start with a basic cycle:


         POP HL; enters the stack smeschemie in texture

                     Or (c H - step Y, the L - move to X).

         ADD HL, BC; add it to the coordinates of the lateral

                     ; Line range (in texture), pre-

                     , Calculated from the table and pulled out

                     ; Early drawing Scanlin

         LD A, (HL); Take the color of the texture.

         EXX;

         POP HL; enters the stack offset by a texture

                     , (Light spot)

         ADD HL, BC; add it to the coordinates of the lateral

                     ; Line range (in texture of the light

                     ; Spot)

         ADD A, (HL); add up with the color spots

         LD E, A; because in addition there are more colors

                     , # 10, the color should be the maximum,

                     , Ie # 0F. Tk on ZX is not the team that

                     , With the addition of doing it, then 
traversed 

                     ; Engage in distortion and make the table

                     , Folded flowers.

         LD A, (DE); Take the resulting color.

         EXX;

         LD (DE), A; shoves it into a buffer for output.

         INC E;

That is truncated!
Now the arrangement of textures in memory.
They should be located in one of the pages (eg # 11)
and in the first page of most climbs 4 textures (64 x 64)
the first # 40 bytes - the first structure, the second # 40 
bytes - the second, third # 40 bytes third ... etc., and 
through the # 0100 is the same. For example:


                  The total size of X = # 0100

| | | | |
| Tekstura | texture | texture | texture |
| Svetogogo | for Tmap | for rear | why-|
| Spot | | Background | thread more |
| | | | |
| | | | |



    Buffer for output must have size 38 x 256 as I
I think that the size of Y = 38 is optimal, because at
C2P standard screen time to upgrade to 2 frames. Size
X = 256 is made to eliminated the need for clipping
polygon H. buffer for output, naturally, should
located to the # C000 is starting with # 9A00.


    All precalc'i at the beginning of the main loop are exactly 
the same as in the usual T_MAP'e, with the difference that the 
computations needed perform 2 times more than in T_MAP'e 
(calculation tables steps in texture, tables of steps to the 
texture of a light spot, interpolate the vertices of the 
polygon and texture on texture light spots, etc.)


                          Warning!


    This algorithm will only work with switched off
Interrupt! Think a little for yourself how to do so,
that does not hang in IM 2;)

    Well, almost done. As you can see to do T_MAP
+ PHONG, you must first understand how a normal T_MAP.

If there is interest editors, then We (EI)
can tell us about the implementation on the ZX effects such as:

3d-camera, Static Phong Shading or Environment Mapping,
Morphing Stretch-tables, Z-buffer, S-buffer, alpha-channel,
Mirroring rotation, Fast Scaling, 3d-Particles, 3D Spheres
3D Tunnels, Lens Flare, any kind of 3D-shading'a and much more.

Senat / Eternity Industry. 18.09.999





Other articles:

AOSS - "The scene is sick" experiences Random'a.

AOSS - Raver discusses stsenovoy journalism.

AOSS - an analytical article on the music scene from Andy Fer.

AOSS - how easy is it to be the organizer of the group?

AOSS - On journals (thinking aloud).

AOSS - on the example of the canons of demoscene magazine Deja Vu # 9.

AOSS - Today and Tomorrow domestic demoscene.

AOSS - Spectrum banner network.

Charts - all time favorites.

Charts - current rules (fall edition 1999).

Charts - indexed.

Charts - voting rules.

Coding - 16-bit procedure is fast exponentiation.

Coding - Flying is makrobiblioteku: Memory Management Library.

Coding - Texture Mapping - Implementation of SaiR00S/EI.

Coding - Texture mapping + Phong shading implementation of the Senat / Eternity Industry.

Coding - ZXA library: a library for creating and playing animations.

Coding - A bug in the STS?

Coding - Comments to the sources, published in Scenergy # 1

Coding - the libraries of programming on the Spectrum.

Coding - The principle of packing animations in the demo JAM.

Coding - procedure for rapid multiplication.

Coding - parsing intro Daingy from Cryss / Razzlers.

Demo Party - Cafe'2000: Official invitation

Demo Party - CC999.999 information (eng).

Demo Party - D-Man/EI: Report on Di: Halt: 99.

Demo Party - Hartman: report CC'999.

Demo Party - Maxwell and Mr. John: report CC'999.

Demo Party - Merlin / CC: Report CC'999.

Demo Party - Paradox'99 - as it was, but it would be better if he mUst dIe!!!

Demo Party - PHAT'9: list of visitors.

Demo Party - POL / PHT: report Doxycon '99.

Demo Party - Random / CC: volumetric report CC'999.

Demo Party - SerzhSoft: Legend of the CC'999.

Demo Party - Zlincon 2e3 party: minireportazh.

Demo Party - information about the upcoming party PHAT'0.

Demo Party - Information on demoparti CC999.999.

Demo Party - unofficial results Di: Halt'99 with comments Diver'a.

Demo Party - an overview of demoscene 1999.

Demo Party - report the organizers CAFe'99.

Demo Party - Press release Latvian demopati PHAT'9.

Demo Party - an invitation to Latvia demopati PHAT'9.

Demo Party - a story about a trip to Kazan on Antares CAFe'99

Demo Party - Results CC.999.999

Demo Party - Results CC999.999.

Demo Party - the results of Chaos Construction 999.

Demo Party - Results Computer Art Festival 1999.

Demo Party - Results Doxycon'99.

Demo Party - Results Millenium Party.

Demo Party - Results Paradox'2k demoparty.

Demo Party - Results of the Latvian demopati PHAT'9.

Demo Party - the results of the Rostov party Paradox'99.

Demo Party - reportage Gasman'a with Forever 2e3.

Demo Party - a report from Minsk demopati Millennium'2000.

Demo Party - final results Forever 2E3.

Editorial - Opening remarks by Arty.

Editorial - vystupitelnoe word from Random.

Editorial - pens Raver'a entitled "Scenes."

Groups - survey of operating groups: Amaltiya Incoropration Software.

Groups - survey of operating groups: Antares.

Groups - survey of operating groups: Ascendancy Creative Labs.

Groups - survey of operating groups: Crushers.

Groups - survey of operating groups: E-mage.

Groups - survey of operating groups: Eternity Industry.

Groups - survey of operating groups: Excess team.

Groups - survey of operating groups: Extreme Entertainment.

Groups - survey of operating groups: Fatality.

Groups - survey of operating groups: Jupiter 77.

Groups - survey of operating groups: Proxima Centauri.

Groups - survey of operating groups: RaZZLeRs.

Groups - survey of operating groups: RUSH.

Groups - survey of operating groups: Smash Hackers Band.

Illegal Corner - Razzlers justified for the release of the demo First Association.

Illegal Corner - Scenergy Release Charts - Competition crack.

Illegal Corner - Welcome to Scenergy Release Charts (SRC).

Illegal Corner - softografiya Fatality Group.

Lits - Pussy: the history of creation of the famous game from the Fatality.

Lits - Scenergized beyond the belief.

Lits - speed.

Lits - History of Education Association Rostov PartyZans.

Lits - the story of the game "White Eagle - Comrade known."

Lits - the story of how Fatality produces toys.

Mail Box - letter: Ellvis and Fatality happy Scenergy # 1, Ulterior defy Antares and BrainWave, Realtimer disappointed.

News - Doom'a will not!

News - Virtual pati Millennium, X-Raizor returned to the stage, Andrew Fer organized a new group, the failure of the German party Spectrology, news from 3SC, Zero Team, Extreme.

News - The view of Megus'a dentro compo SS'2000.

News - News from the OHG, Delta Hackers Group, Die Crupps, Volgodonsk spektrumisto and from a group SpeedWay.

Scenergy - addresses to communicate with the editors.

Scenergy - thanks to the sponsors of the magazine.

Scenergy - new in the shell of the journal.

Scenergy - the promised video articles will not ...

VIP - Random interviews Unbel! Ever / Sage / XTM.

VIP - The most noble tale of the scene.

VIP - an interview with Arny and Mythos, the creators of Elite clone game Awaken.

VIP - An interview with Fatality, widely known and crackers Game Maker

VIP - an interview with one of the authors of the game Elite.

VIP - an interview with one of the most progressive artists in the Spectrum Diver/4D.

VIP - interviews with Random'a some PC-magazine

Warez Pack - description of Inertia Player.

Warez Pack - description of the demo 1140.

Warez Pack - description of the import demo 'no work'.


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

Similar articles:
Soft - description of a new version of the GFX UTILITY v0.5.
Contents
Igroskop - Computer c super great graphics "Midnight Resistance"
BRAVO to rest - Short Stories: The bus, Ode to a mosquito.

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