News:

Building a 3D Ray Tracer  By stevmjon

Main Menu

UW3D Returns

Started by kevin, January 13, 2005, 09:54:51 AM

Previous topic - Next topic

kevin





UW3D Returns


 This shot is of the UW3D software render engine ported into PlayBASIC. While there's a few things that need to be corrected in the port. It Does make for an impressive tech demo for an interpreted language.

This version of the engine supports,

 * Flat/Gouaud Shading
 * Near/Far plane Z Clipping
 * Freq Sorted Z buffering (pre polygon)
 * Objects
 * Height map Collision, even LOS (line Of Sight)..

Obviously because it's a software 3D engine it's not going to be all that fast.  But then again I haven't opt'd anything really, just dumped it across. Took most of last night :)


Video

 





Download

Get Latest Version


tomazmb

Hello Kevin,

Is this some sort of experiment of yours or are you making a foundation for a 3D version of Play Basic ?  :)

Have a nice day,

Tomaz
My computer specification:

AMD Athlon 64 2800+
MB ASUS K8V Socket 754 VIA K8T800
SB Audigy 2
3 GB RAM DDR 400 MHz PQI
AGP NVIDIA GeForce 7600GT 256 MB-Club 3D
Windows XP Pro SP2
DirectX 9.0c

kevin

Yeah it's just a little (8500 line) experiment.  Just wanted to sort of show that even though PB is an interpreted language (at this point), it's still fairly capable.  Now, Obviously writing a 3D engine IN PB probably isn't the best idea.  But it's a good experiment, none the less..  

  Just so there is no confusion though, NO this is not PB3D related.

tomazmb

#3
Hello Kevin,

QuoteYeah it's just a little (8500 line) experiment.
:o

I'm speechless. You must be a very determined person to put so much work in a "little experiment".  :)

Have a nice day,

Tomaz
My computer specification:

AMD Athlon 64 2800+
MB ASUS K8V Socket 754 VIA K8T800
SB Audigy 2
3 GB RAM DDR 400 MHz PQI
AGP NVIDIA GeForce 7600GT 256 MB-Club 3D
Windows XP Pro SP2
DirectX 9.0c

kevin

#4
Nah, it's just a port of an old DB classic project, to test the theory :)

kevin

uw3D

Flat shaded + objects

Draco9898

DualCore Intel Core 2 processor @ 2.3 ghz, Geforce 8600 GT (latest forceware drivers), 2 gigs of ram, WIN XP home edition sp2, FireFox 2.

"You'll no doubt be horrified to discover that PlayBasic is a Programming Language." -Kevin

kevin

#7
Pretty much finished the port yesterday.  The only real issue has been the array cache manager.  Which is the fundamental storage media behind the Mesh/Object library. Since standard DB classic didn't have memory banks.    Which explains why objects wouldn't work without runtime errors.   It is frustrating though, as since this engine was written in DB to mimic DB, as the basis of Visible Worlds  (Visible Worlds Home Page) there was and awful lot of illegal memory accesses occurring in some of the flawed logic in the original version and  DB just ignores them.    

Anyway the mesh/object engine supports various primitives,

* Basic Primitives
  - Cubes, Boxes, Triangle, Sphere's, Cones, Cylinders, Disc, Torus, Planes, Vertex planes
* Custom meshes
* Real time Vertex/Face editing
* Dual sided faces
* Two rotated mode XYZ,ZYX

The picture above is a flat shaded pic the full thing running in PB.. I've tweaked some of the routines to make them more PB friendly, this has allowed for the Z depth to be increased.  It'll never be huge in this form though.  But it does make for an interesting tech demo.

Draco9898

#8
Very neat for being in Playbasic, but I bet you could make something deadly cool using DirectX and what not inside C++, but this just shows how powerful playbasic is.

Oh yeah and I could not  stand how darkbasic had little or no error trapping for arrays over bounds    :blink:
DualCore Intel Core 2 processor @ 2.3 ghz, Geforce 8600 GT (latest forceware drivers), 2 gigs of ram, WIN XP home edition sp2, FireFox 2.

"You'll no doubt be horrified to discover that PlayBasic is a Programming Language." -Kevin

kevin

#9
Software 3D Render Engine Tech Demo

 Well, figured i'd better post a version of this running.  It runs pretty well in flat shaded mode, gouraud is pretty hopeless (single figures frame rates)  as you'd expect.  Mostly because there's no gouruad polygon commands in PlayBASIC (yet), then edge translation is lot of work for the interpreter.  But I'm pretty happy with it's performance at this point, of course when we more to the second / third generation VM's  or support compiling to machine code,  we'll revisit this test.

Anyway, just remember the engine is entirely written in PlayBasic V1.06


Download Tech Demo

Get Updated Version


kevin

Update  UW3D running PB1.068

 Here's a shot of the UW3D tech demo running in PB1.068.   Since PB now has gouraud shading built in, the demo runs much better now.   It's great little show case for what can be done, if you explore the PB command set.

kevin

#11
Software 3D Engine Tech Demo V0.20

  Here's a re-issued version of our UW3D software engine (tech demo) running in PB1.068.   Which has had a massive speed boost care of the new polygon rendering commands.

Anyway, just remember the engine is entirely written in software in PlayBasic V1.068 (beta)..


Download Tech Demo

Get Updated Version


kevin

#12

kevin

#13
UW3D in PBFX V1.64 alpha

 With the addition of hardware rendering  in PBFX 1.64 I dug up this old chestnut.   The demo code is unchanged, the only difference is that it's running on PBFX 1.64b (Alpha).    As per the original demo, all geometry rotation / frustum culling / polygon clipping / sorting is being reforming in PB code,  it's not using anything built in devices of PBFX, (ie. like vertex and mesh translation which are added long after this demo was written)

 One benefit of rendering with 3D hardware is that you get virtually free alpha blending.  In PBFX 1.64 the triangle primitives (Tri / GouraudTri) can now use the Ink mode properties.  So they can be drawn using transparency.  Which can be seen the following screen shots.  

  Now given the original demo was never designed to batch triangles out to direct 3D, so each triangle here is drawn as an separate 3D scene... Which is NO/NO in direct 3D .     Even so,  it's still fast enough for testing purposes.

Ian Price

Sounds cooler than a polar bear's wotsits :D
I came. I saw. I played some Nintendo.