Информационный сервер для программистов: Исходники со всего света. Паскальные исходники со всего света
  Powered by Поисковый сервер Яndex: Найдется ВСЁ!
На Главную Исходники Форум Информер Страны мира
   Demo Making    >>    demostu3
   
 
 DemoStuff #3 - Collection of Demo Effects   Bjarke Viksoe 04.05.96

Третий выпуск коллекции демо-эффектов от Bjarke Viksoe. Вращение трехмерных изображений в формате 3DS, FLI, ANM.
Third bunch of great demos by Bjarke Viksoe: flat, gouraud and environment shading. It reads Autodesk 3D Studio objects! Create your own objects in 3DS and render them real-time with this piece of code!!!!



94k 
 

(jan 1996) Hi again, a year has passed since I last managed to turn on my old computer at home and tap in some more code... ------------------------- Have you ever seen one of those cool demos with vector worlds, gouraud and phong shading, texturemapping and so on? Probably you have! And you think: "They're cool" - and they are. But it's hard figuring out what's really done and what it takes to make something like it. So here my code for flat, gouraud and environment shading. I dug up my gouraud code from last year (DEMOSTU2.ZIP) which I thought to be no good - it turned out that with a few modifications, it could produce really nice shadings! It reads Autodesk 3D Studio objects! Create your own objects in 3DS and render them real-time with this piece of code!!!! Be aware that this is my first attempt to make something like this. Parts of the code is really slow (such as the polygon drawer) but it does seem to work. I'm not a hot-shot demo coder. Havn't done a single PC demo in my whole life - and I'm not trying to. I'm no math wiz-kid either, most of the formulas are from documents from x2ftp.oulu.fi regarding shading or tampered from other peoples code :) I have included a few 3DS objects for display. You'll be pleased to see the awfull duck is here again. Files to look for: READ3DS.PAS GOURAUD1.PAS GOURAUD2.PAS ENVIRON1.PAS ------------------------- Did you ever wish that it was YOU who could play dashing FLIC animations for your friends. Well, you can now. I got so tired of the usual net commercials "Buy this software pack for only $XXX, and get a super FLIC library". Why not code it yourself... These sources allow you to read and display: pcx,pcc,lbm,iff,pic,tga,bmp,rle,cel,gif,tiff,anm,fli,flc,dl,3ds,avi files. The sources were made to MY needs and does not support all modes! Images are only supported at 320x200x256 and most files cannot be larger than 64K!?!! Some of the formats are only supported with a limited compression selection. But it should give you a pretty good idea of what goes on and give you something to work on to match your needs. I have included code to play FLIs and FLCs, Deluxe Paint ][ .ANM files, AVI and .DL animations too. Soon to be followed by QuickTime. Files to look for: TESTFLI.PAS TESTANM.PAS and a bunch of units for reading each format. ------------------------- To get all this working: use Borland Pascal 7.0, put off all stack/range checking, put on +286 code and compile. The democode requires a 386, but assumes something faster with co-processor. Since this file contains updates to DEMOSTUF.ZIP and DEMOSTU2.ZIP, please unzip this file after all others. I havn't really time for this. It's funny to see cool demos on the PC thinking back on the good ol' Amiga days. Sniff, I get all sentimental. Hope some of your guys out the can use this for anything. Well, that's it... In case you wanna chat, here's my new net address: bjarke.viksoe@capacity.dk Regards and peace on earth... Bjarke Viksoe (as always: Pascal rulez, but ASM rulez even more :) ; Legal stuff: ; These source codes may be used freely as you please. ; They can be copied freely as long as nothing is charged for a copy ; and as long as all files are included and nothing is modified. ; I offer no warranty with this code whatsoever, including its ; fitness for any particular purpose. Neither shall I ; be liable for damages of any kind that may arise from its use. Oh, by the way: If, by accident, you're managing a large PC network please consider buying the fabulous Network Management Product, NetCon. Info on www.capacity.dk !