Computer Science Canada

Homer's 3D engine (added the source code)

Author:  Homer_simpson [ Wed May 28, 2003 6:58 pm ]
Post subject:  Homer's 3D engine (added the source code)

well here it is homer's 3D engine

Author:  Catalyst [ Wed May 28, 2003 6:59 pm ]
Post subject: 

woot Very Happy

you got to love the ship (where did i get that model...)

Author:  JSBN [ Wed May 28, 2003 7:00 pm ]
Post subject: 

that my friend, is sick...

Author:  Catalyst [ Wed May 28, 2003 7:02 pm ]
Post subject: 

i think this would be the 5th 3d engine ive seen made in turing

Author:  Homer_simpson [ Wed May 28, 2003 7:03 pm ]
Post subject: 

here's a shaded version of homer 3d engine... well sorta
Note: copy this file to the directory that u copied spike.arf

Author:  Catalyst [ Wed May 28, 2003 7:04 pm ]
Post subject: 

edit nvr mind

Author:  Homer_simpson [ Wed May 28, 2003 7:04 pm ]
Post subject: 

this one's sorta like heat detection camera view download it u'll see what i mean... and it has to be copied to the same directory as spike.arf

Author:  Catalyst [ Wed May 28, 2003 7:05 pm ]
Post subject: 

nvr mind

Author:  Homer_simpson [ Wed May 28, 2003 7:06 pm ]
Post subject: 

Catalyst wrote:
you got to love the ship (where did i get that model...)

what does that mean?!

Author:  Homer_simpson [ Wed May 28, 2003 7:06 pm ]
Post subject: 

and here's spike.arf if i didn't attach it...
and btw i made an engine catalyst made one who's engines were the other 5?

Author:  Catalyst [ Wed May 28, 2003 7:07 pm ]
Post subject: 

that was the model you posted over at the contest

i used that model to test every version of my engine

Author:  Catalyst [ Wed May 28, 2003 7:08 pm ]
Post subject: 

r u using a distance based algorithm for those demos?
it looks similar to my old lighting model

Author:  Catalyst [ Wed May 28, 2003 7:10 pm ]
Post subject: 

these r the engines ive seen:
the first 2 were wireframe only
rapscalls had vsd and culling



1- from a holdsoft gfx contest
2- frank on the ooturing forums
3- rapscallion on this forum and ooturing
4- my 3d engine Very Happy
5- you

Author:  Homer_simpson [ Wed May 28, 2003 7:15 pm ]
Post subject: 

well u never realeased the code for lighting version of engine... and i have no idea how it worked mine is based on distanse between point 0,0,0 and the center of eachpolygon... i dont even know if it's the proper way of lighting coz i never had any tutorials... i only started making the engine knowing:
drawdot(x/z,y/z,color)

and the engine model i only used in my first version of engine wanted it to be original so i used my own model in other one's
btw i'll release the code soon...

Author:  Homer_simpson [ Wed May 28, 2003 7:16 pm ]
Post subject: 

JSBN wrote:
that my friend, is sick...

what's sick?

Author:  Catalyst [ Wed May 28, 2003 7:17 pm ]
Post subject: 

i wasnt accusing you of copying...

i was wondering if we used the same method
mine was very similar except instead of 0,0,0 i used the camera

Author:  Homer_simpson [ Wed May 28, 2003 7:19 pm ]
Post subject: 

well in my case 0,0,0 is camera lol...
hmmm... u know what i'm thinking of... texturing...!!! but then again turing's too slow... but...it might be worth a shot what do u thinkl?

Author:  Catalyst [ Wed May 28, 2003 7:24 pm ]
Post subject: 

its worth a shot
youll prob be able to get double the fps of my psuedo textures if u do it the real way (which will leave you with a whopping 4 fps)

Author:  JSBN [ Wed May 28, 2003 7:29 pm ]
Post subject: 

u guys are rocking, this stuff blows my mind. Thx for trying to kill me Smile
wow 4fps, don't go too fast now... Laughing

Author:  Homer_simpson [ Wed May 28, 2003 7:29 pm ]
Post subject: 

what's the real way... =/
where do u get all these tutorials from?!

Author:  Catalyst [ Wed May 28, 2003 7:35 pm ]
Post subject: 

i initialized a bunch of particles to and image to simulate a texture

the real way is to interpolate between the vertices of a quad to generate screen coors (saves a lot of overhead in rotations calcs)

Author:  Dan [ Wed May 28, 2003 7:40 pm ]
Post subject: 

if any one cares i am wroking on a 3d engion for dos c++ (Turbo C++ dos verions).

rigth now i got loading of raw files and arf with all the color wroking.

there are a lot of bugs i need to wrok out tho, dos dose not wrok great with graficks, lol.

Author:  Homer_simpson [ Wed May 28, 2003 7:43 pm ]
Post subject: 

dan is turbo c++ faster than turing cuz if it is i'm good at dos programming i could just translate mine in pascal or c

Author:  Catalyst [ Wed May 28, 2003 7:55 pm ]
Post subject: 

dan could you tell where to get dos c++ ( i already know c++)

Author:  Homer_simpson [ Wed May 28, 2003 8:02 pm ]
Post subject: 

i think this is the one he's using
http://www.programmersheaven.com/search/Download.asp?FileID=6619
edited
or maybe this is the one
http://community.borland.com/article/0,1410,21751,00.html

Author:  Catalyst [ Wed May 28, 2003 8:16 pm ]
Post subject: 

Very Happy
i got it working
this is so old (in a good way) it has windows made from characters

Author:  Dan [ Wed May 28, 2003 9:09 pm ]
Post subject: 

Catalyst wrote:
Very Happy
i got it working
this is so old (in a good way) it has windows made from characters


and this is what my school makes me use, the dam thing crashs so many times!!!!

today in school it crashed over 50 times and 10 of those rebooted my computer!

Author:  Homer_simpson [ Wed May 28, 2003 9:13 pm ]
Post subject: 

lol i used to use the exact same program except that it was called turbo pascal... lol it would crash if u would make an array of a big size like 1000 but i still think that that was more powerful than turing since u could create any procedure u want using assembly or other built in things...

Author:  Homer_simpson [ Sat May 31, 2003 12:16 am ]
Post subject: 

ok here's the source... and here's how it is used:
there are 5 procedures and 2 objects u should know about in order to use the engine proceudres are:
loadarf(filename) > loads arf files
loadraw(filename,number of lines) >loads raw files
moveobject(command string,amount) > does the rotating and relocating of the object
command string can be"xy","xz","yz" for rotations or "x","y","z" for relocating
movecamera(command string,amount)
does the rotating and relocating of the camera
command string can be"xy","xz","yz" for rotations or "x","y","z" for relocating
drawobject(color1,color2,method)
color1 is the fill color
color 2 is the border color
method is the way the object is drawn(shaded,colored,empty,...)
u can enter 1,2,3,4 for method

Author:  Homer_simpson [ Sat May 31, 2003 12:19 am ]
Post subject: 

and here's what i use to convert raw to arf:
code:
proc convertarf (filename : string, lines : int)
    var file, file2 : int
    var x1, y1, z1, x2, y2, z2, x3, y3, z3 : real
    var col : int := 16
    open : file, filename + ".raw", get
    open : file2, filename + ".arf", write
    for i : 1 .. lines
        get : file, x1, y1, z1, x2, y2, z2, x3, y3, z3
        if i mod (lines div 14) = 0 then
            col += 1
        end if
        write : file2, x1, y1, z1, x2, y2, z2, x3, y3, z3, col
        locate (1, 1)
        put col
        locate (2, 1)
        put i
    end for
end convertarf
var filet:string
put "Enter the name and address of the raw file to be converted to arf(no extention ex: c:/spike not c:/spike.raw): "..
get filet
convertarf (filet, 264)
put "done"

Author:  Catalyst [ Sat May 31, 2003 12:29 am ]
Post subject: 

once i get some features working ill post the source to my 3d engine

i still need to:
- implement a true camera system (line-plane intersection in the works)
- intergrate my particle engine
- set up global lights
- set up multiple lights
- set up global vsd
- perspective correct culling
- set up 1D textures (change the shading properties)

Author:  Homer_simpson [ Sat May 31, 2003 12:42 am ]
Post subject: 

sounds good....

Author:  Catalyst [ Sat May 31, 2003 1:15 am ]
Post subject: 

u might want to consider using ascii files for arf
they are easier to use and understand

Author:  Homer_simpson [ Sat May 31, 2003 2:51 am ]
Post subject: 

yes but when i use binary i dont need to enter the number of lines... so it's more userfriendly

Author:  Catalyst [ Sat May 31, 2003 1:50 pm ]
Post subject: 

you dont need numlines for ascii either
(from my engine)

code:

    proc LoadARF (filename : string)
        var fileIn : int
        open : fileIn, filename, get
        Type := ARF
        loop
            exit when eof (fileIn)
            c += 1
            new fillC, c
            get : fileIn, x (1), y (1), z (1), x (2), y (2), z (2), x (3), y (3), z (3), fillC (c)
            new Coors3D, c
            new Coors3D (c)
            Coors3D (c) -> InitPolyTri (x (1), y (1), z (1), x (2), y (2), z (2), x (3), y (3), z (3))
        end loop
        numLines := c
        close : fileIn
    end LoadARF

Author:  Homer_simpson [ Sat May 31, 2003 2:32 pm ]
Post subject: 

yer right... i thought eof works only for binary files...

Author:  templest [ Thu Nov 13, 2003 8:49 pm ]
Post subject: 

sick (in young 16 year old terms) means "insanely amazing". Or something quite similar. And I have to say...

THAT'S THE ILLEST THING EVER! (ill = sick Wink )

Author:  santabruzer [ Sun Nov 16, 2003 5:40 pm ]
Post subject: 

cool

Author:  CITC [ Fri Jan 09, 2004 9:35 pm ]
Post subject: 

Wow amazing job that is so cool Very Happy

Author:  zylum [ Tue Feb 17, 2004 10:04 pm ]
Post subject: 

pretty cool and nice shading!Smile btw, i noticed that your depth sorting is a little buggy though...

Author:  Homer_simpson [ Sun Feb 22, 2004 10:29 pm ]
Post subject: 

lol there is no sorting....

Author:  zylum [ Sun Feb 22, 2004 11:09 pm ]
Post subject: 

lol... no sorting??? Shocked how do you determine which faces are drawn first??? no wonder sometimes the back faces show up infront of the front faces... my engine's depth sorting is a bit off and it has problems when 2 faces have the same depth so i thought your sorting was screwed up too lol...

Author:  Forumer [ Wed Dec 17, 2008 10:39 am ]
Post subject:  RE:Homer\'s 3D engine (added the source code)

nice i wonder if we can actually implent directx in turing

Author:  [Gandalf] [ Wed Dec 17, 2008 3:14 pm ]
Post subject:  RE:Homer\'s 3D engine (added the source code)

Well Turing is Turing complete, so there exists some massively hackish way of doing it, but that hardly means anything. So, basically, you can't.

Edit: Gah! Massive necro post. Read the rules before posting again, posts that are months (not to mention years) old are dead. Don't post in such topics unless you have something immensely useful and related to contribute. Even then, creating a new topic is probably a better idea.

Author:  Insectoid [ Wed Dec 17, 2008 3:16 pm ]
Post subject:  RE:Homer\'s 3D engine (added the source code)

Really nice necro skillz there forumer. 5 years old? not bad! (best I've seen was 6 years)

Joking aside, pulling up old threads is frowned upon.


: