Qbasicnews.com
May 26, 2018, 02:46:50 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: 3d engine  (Read 2472 times)
mot19
New Member

Posts: 12


« on: October 21, 2003, 07:12:19 AM »

im planning on programming a 3d engine for qb. I know its been tried before but im taking a differnt approach to mine. It will save data points to files and when the engine loads those points into the engine it draws the lines to the points and places the object on screen using a data map. This way i can easily map differnt 3d models on the screen just by using a sub command. Expect it to be very cpu stressfull though as on my AMD Anthlon 2800+ it runs great but on my older p3 my models running look a bit choppy and take a while to load. Tell me what you guys think of my idea.
Logged

nthlon 1800+ OCed to 2800+ speeds
512 mg of crucial pc3200 ram
Radeon 9600 pro
.......
I know that computer is complete overkill for qb but hey, who cares
---Turbo Fx---
Member
*
Posts: 51


« Reply #1 on: October 21, 2003, 09:54:55 AM »

hmmm, I don't realy believe in 3d engines for QB..
syn9 does a good job.. also mux is a cool game...

but quality is about for a 486, while we need 1ghz or higher to run it on qb...

But if you're good, go ahead... Smiley
Logged

xpect to see some great stuff from us...
Neo
Na_th_an
*****
Posts: 2150



« Reply #2 on: October 21, 2003, 10:04:23 AM »

If you need a fast computer for a program... Well, even QB will be having it's system requirements Smiley

Imagine it:
    MYGAME
    Requirements:
    CPU 3000 MHz or faster
    512 MB of RAM
    30 GB of hard disk space
    Quad-speed CD-Rom or more
    DOS 7.0 or higher
    Mouse with 5 buttons
    Keyboard


As I was trying to tell... Saving points to files really slows down your program, as for refreshing the level/map, many MANY points have to be read from the file, which means ... Disk I/O. Better think of some way of storing them in memory with some kind of compression or something Smiley
Logged
Jark
Ancient Guru
****
Posts: 566



WWW
« Reply #3 on: October 21, 2003, 10:23:15 AM »

is really slow, I can confirm that: you can check my horrible land renderer at http://mandelbrot.dazibao.free.fr/Ground/Ground.htm to see an example of extra-slow 3D program based on external data file. I do hope my future TC-Land will be faster :lol:

But you can also load the files into XMS/EMS, and that should be fast: so you can keep the files for their functional aspect, and still try to make a fast 3D engine...

I had the same issue to solve when I made the first Buddhabrot programs: disk access was a real lead-weight ! The SVGA version, which does not access the disk, is much faster, since the video RAM has the same role as the file...
Logged

hink Global, Make Symp' All !
Dj Dennie
Member
*
Posts: 35


WWW
« Reply #4 on: October 21, 2003, 12:04:45 PM »

Im not quite sure I understand what you are trying to do. Are you planning to load 3d models at the start of your program? Or do you want to constantly load them and update them each frame?

It's not that difficult to write a routine that will save/load 3d models. In fact, I wrote save/load routines in my 'Original 3d Demo'.

The file structure I used was something like:

Code:
FILE STRUCTURE
1  = number of points
2  = number of poly
3  = starting rec pos of poly info
4  = start of point info
.  .
.  . =  end of point info
?  ? = start of poly info
.  .
.  .
.  .
.  . =  end of poly info


where each number represents a record in the file.
Each point is represented by its x,y, and z coordinates. Each polygon refers to 3 points.

If youre interested check out my 'Original 3d Demo' code (particularly the saveshape and loadshape routines).
You can get it from: http://yallara.cs.rmit.edu.au/~dhotson/shad.zip

or just the source at: http://yallara.cs.rmit.edu.au/~dhotson/cgi-bin/trans.cgi?zipf=24&file=SHAD1.BAS


Anyway, Good luck! 3D demos are fun. Cheesy
Logged

: Dj Dennie ::
TheBigBasicQ
*/-\*
*****
Posts: 4549



WWW
« Reply #5 on: October 21, 2003, 04:15:46 PM »

Using EMS/XMS would be a better option. Also, an ASM lib would prolly speed  up things a bit =)
Logged
Antoni Gual
Na_th_an
*****
Posts: 1434



WWW
« Reply #6 on: October 21, 2003, 05:42:33 PM »

If it can help I once made this 3d mesh rotator
http://www.geocities.com/antonigual/qbsource/3drot.zip
(Right-click and Save As...)
It gets data from PLG and 3DS files, although the implementation of both formats is very primitive (only the first mesh found is displayed).  
It would be interesting to combine with TC-Ray!
Logged

Antoni
mot19
New Member

Posts: 12


« Reply #7 on: October 21, 2003, 10:03:07 PM »

Yes ill be updating them each frame. I dont know how to use xms memory yet or anything like that so thats beyond me. If there are any good tutorials for storing info in memory please link them. Also this is going to be an engine and then it loads anything you want, so you can make less complicated models which i think wil work greatly in the process of making this for lower end computers.
Logged

nthlon 1800+ OCed to 2800+ speeds
512 mg of crucial pc3200 ram
Radeon 9600 pro
.......
I know that computer is complete overkill for qb but hey, who cares
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!