Software 3D Engine

Hello,
Is anyone working on some type of 3D Engine in SDL without OpenGL? If
not, wouldn’t it be a good idea to start some sort of SDL_3d? I’m
willing to help. ThanX in advance,

   JVFF

heya, theres Mesa which is software rendered OpenGL. Mesa inst written in
SDL but you can use it inside SDL.> ----- Original Message -----

From: jvffprogramming@ieg.com.br (Janito Vaqueiro Ferreira Filho)
To: “SDL Mailing List”
Sent: Saturday, May 17, 2003 4:34 PM
Subject: [SDL] Software 3D Engine

Hello,
Is anyone working on some type of 3D Engine in SDL without OpenGL? If
not, wouldn’t it be a good idea to start some sort of SDL_3d? I’m
willing to help. ThanX in advance,

   JVFF

SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

It’s also insanely slow, like any reasonably correct software
implementation of OpenGL.

I suspect “JVFF” is thinking about something that can actually be used
to create playable 3D games. Sounds like lots of work and a bunch of
restriction… I think there are a few of these, though. How about
finding a good one with a truly Free licence (such as LGPL) and
porting it to SDL?

Or why not just use OpenGL like everyone else? :wink:

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Sunday 18 May 2003 02.04, Atrix Wolfe wrote:

heya, theres Mesa which is software rendered OpenGL. Mesa inst
written in SDL but you can use it inside SDL.

Some people don’t have OpenGL accelerated cards or their card isn’t
supported by linux (although most popular provide drivers, I had tons of
problems with nVidia’s driver). It is possible, there are tons of info
on the net and I think I can use SDL_prim (umm, need to ask for
permission or something?). The problem is it’s very hard and
time-consuming (and that it’s not as much fun as writing a game :-).
I’ll see if I can do it. ThanX for your replies,

   JVFF ( <= Strange nick isn't it?!)

David Olofson wrote:>On Sunday 18 May 2003 02.04, Atrix Wolfe wrote:

heya, theres Mesa which is software rendered OpenGL. Mesa inst
written in SDL but you can use it inside SDL.

It’s also insanely slow, like any reasonably correct software
implementation of OpenGL.

I suspect “JVFF” is thinking about something that can actually be used
to create playable 3D games. Sounds like lots of work and a bunch of
restriction… I think there are a few of these, though. How about
finding a good one with a truly Free licence (such as LGPL) and
porting it to SDL?

Or why not just use OpenGL like everyone else? :wink:

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
.

Some people don’t have OpenGL accelerated cards or their card isn’t
supported by linux (although most popular provide drivers, I had
tons of problems with nVidia’s driver).

Yeah, I know. It might make sense to support s/w rendering if the game
is actually playable with it, and it’s not too expensive for the
game’s budget. (I think that’s where it fails most of the time; low
end games just don’t have the budget for 3D.) This still applies to
Free games: someone has to hack the code whether he/she gets paid for
it or not.

It is possible, there are
tons of info on the net and I think I can use SDL_prim (umm, need
to ask for permission or something?).

Just read the licence…? I would think most libs meant to be used
with SDL are LGPL, just like SDL.

The problem is it’s very hard
and time-consuming (and that it’s not as much fun as writing a game
:-).

Exactly. If you just want to create a low end 3D game, you’re probably
better of grabbing an existing engine and hack it, or just use it.

The Doom engine is GPL, BTW. (The engine; not the data.) It’s not
really a full 3D engine though, but it should work well enough for
many kinds of games; not just FPSes. I’d probably look at the
enhanced ports around, as they usually have scripting, various 3D
engine improvements (slopes, room-over-room, movable sectors etc etc)
and new optimizations for modern CPUs.

ZDoom is rather nice (very fast rendering!), but it’s not GPL. AFAIK,
it’s based on the original Doom source; not the GPL rerelease, and it
depends on some stuff that isn’t compatible with the GPL.

Not sure about the Quake I and II engines, but I think the original Q1
is s/w only and and Q2 does both OpenGL and s/w. (Might be confusing
that with Half-Life, though. HL supports OpenGL, Direct3D and s/w,
IIRC.)

Anyway, I’d think you can create a commercial game based on a GPL
engine, although since the GPL prevents you from linking with any
closed source binaries, you can’t “protect” you game logic and any
other code you add. Your engine will have to be GPL like the
original. However, the data shouldn’t be affected by this any more
than the images you edit in GIMP are affected by GIMP’s GPL license;
that is, not at all. I’m quite sure playing a game in the engine
counts as “normal use”.

I don’t think anyone’s tried this yet, but it might work, at least for
single player games. A multiplayer game would have to have very
thin clients to have any chance of preventing cheating with an open
source engine. Might work in a very honest commutity, or with some
kind of game where cheating is inherently pointless and/or very hard.

I’ll see if I can do it. ThanX for your replies,

   JVFF ( <= Strange nick isn't it?!)

Why, yes! And you’re not going to explain it, right? :slight_smile:

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Sunday 18 May 2003 06.05, JVFF Programming wrote:

If you’re interested in writing one yourself, there’s a great book out
by John De Goes called “Cutting-Edge 3D Game Programming with C++”.
Newer editions are all about D3D/OGL I think, but if you can find the
edition from 1996, the first one I think, it’s an entire book dedicated
to the math behind making an engine similiar to the quality of Descent.
Pretty fun stuff if you like math. :slight_smile:

– chris (@Christopher_Thielen)On Sat, 2003-05-17 at 16:34, JVFF Programming wrote:

Hello,
Is anyone working on some type of 3D Engine in SDL without OpenGL? If
not, wouldn’t it be a good idea to start some sort of SDL_3d? I’m
willing to help. ThanX in advance,

   JVFF

SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

You can use almost any library alongside SDL, since the LGPL isn’t viral.On Sun, May 18, 2003 at 06:25:43PM +0200, David Olofson wrote:

It is possible, there are
tons of info on the net and I think I can use SDL_prim (umm, need
to ask for permission or something?).

Just read the licence…? I would think most libs meant to be used
with SDL are LGPL, just like SDL.


Glenn Maynard

Sure, but the licence of that “any library” might be, and that might
prevent you from using the license you want for your gam. That’s what
I was thinking about.

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Sunday 18 May 2003 21.27, Glenn Maynard wrote:

On Sun, May 18, 2003 at 06:25:43PM +0200, David Olofson wrote:

It is possible, there are
tons of info on the net and I think I can use SDL_prim (umm,
need to ask for permission or something?).

Just read the licence…? I would think most libs meant to be
used with SDL are LGPL, just like SDL.

You can use almost any library alongside SDL, since the LGPL isn’t
viral.

JVFF Programming wrote:

Hello,
Is anyone working on some type of 3D Engine in SDL without OpenGL? If
not, wouldn’t it be a good idea to start some sort of SDL_3d? I’m
willing to help. ThanX in advance,

Hi,

check out crystal.sf.net it has a pretty good software engine. Although
no one is really working on the software renderer part of it now.

Also see softwire.sf.net (a run time assembler) and
http://sourceforge.net/projects/sw-shader for a pixel shader
implementation done with software.

Back when there was no hw acceleration for 3D (at least on PCs) I played a
while with implementing my own sw rendering (just polygon rasterizaton and
clipping). What I focused most on was having sub-pixel accurancy and
perspective correct texture mapping. I don?t have much time to work on that
now, but I?m willing to contribute with that code (under LGPL) and help with
the project.

Drirr C.

Hello,
Is anyone working on some type of 3D Engine in SDL without OpenGL? If
not, wouldn’t it be a good idea to start some sort of SDL_3d? I’m
willing to help. ThanX in advance,

   JVFF

----- Original Message -----
From: jvffprogramming@ieg.com.br (Janito Vaqueiro Ferreira Filho)
To: “SDL Mailing List”
Sent: Saturday, May 17, 2003 5:34 PM
Subject: [SDL] Software 3D Engine

Back when there was no hw acceleration for 3D (at least on PCs) I played a
while with implementing my own sw rendering (just polygon rasterizaton and
clipping). What I focused most on was having sub-pixel accurancy and
perspective correct texture mapping. I don?t have much time to work on that
now, but I?m willing to contribute with that code (under LGPL) and help with
the project.

Drirr C.

A long time ago, in the days of VGA, I wrote a 3D texture mapping engine
for a game (don’t ask, I don’t admit to having worked on it) and helped
port a famous 3D engine to the Mac. The key to those old engines was not
the 3D graphics part of the code. It just isn’t that hard to write a
textured polygon renderer (http://gameprogrammer.com/5-poly.html
http://gameprogrammer.com/6-text.html both origianlly written in '93), a
clipper, or a 3D transformation
library((http://gameprogrammer.com/4-fixed.html). What is hard is
getting hidden line and surface elimination working so that you only
spend time rendering the visible surfaces. A lot of modern 3D engines
count on a Z buffer to get the details right and use approximate
visibility techniques at the model level. In a software renderer a
Z-buffer can be a serious problem. Z-Buffers are big and when combined
with rendering buffers tend to cause cache instabilities. If you go back
and look at the DOOM engine, there were two key technologies that made
it possible. The first was the use of binary space partitioning to
eliminate hidden surfaces and a special case solution to the texture
mapping transformation that eliminated the per pixel divide in texture
loop. The second is no longer that much of a problem, but the use of
something like BSP trees is critical.

All in all, why not move this over to the gameprogrammer.com mailing
list where it is ON topic rather than here where it is OFF topic.

	Bob Pendleton

P.S.

I would like to see a 3D model layer based on something like BSP trees
(or what ever is current) with a graphics layer that can be mapped to
OpenGL or software. It would be nice to have. Now that I have said
that I’m hoping someone will point to the thirtyleven projects that
already do that. :-)On Sun, 2003-05-18 at 14:59, Drirr C. wrote:

----- Original Message -----
From: “JVFF Programming”
To: “SDL Mailing List”
Sent: Saturday, May 17, 2003 5:34 PM
Subject: [SDL] Software 3D Engine

Hello,
Is anyone working on some type of 3D Engine in SDL without OpenGL? If
not, wouldn’t it be a good idea to start some sort of SDL_3d? I’m
willing to help. ThanX in advance,

   JVFF

SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

±----------------------------------+

  • Bob Pendleton: independent writer +
  • and programmer. +
  • email: Bob at Pendleton.com +
    ±----------------------------------+

What’s really reason for that? Each new gfx card supports hw accelerated 3D. In
DOS times I wrote few simple engines with texture/bump/lighting, and it was
cool experience, but I don’t understand why could anyone be interested in that
stuff in 2003.On Sat, May 17, 2003 at 08:34:07PM -0300, JVFF Programming wrote:

Is anyone working on some type of 3D Engine in SDL without OpenGL? If
not, wouldn’t it be a good idea to start some sort of SDL_3d? I’m
willing to help. ThanX in advance,


Free Software - find interesting programs and change them
NetHack - meet interesting creatures, kill them and eat their bodies
Usenet - meet interesting people from all over the world and flame them
Decopter - unrealistic helicopter simulator, get it from http://decopter.sf.net

Unfortunately the book appears to be out of print. However…

“Mathematics for 3D Game Programming & Computer Graphics”, by Eric Lengyel,
Charles River Media, 2002, appears to be an excellent text. Be forewarned,
it’s not a game programming text, it is a math textbook. If partial
differentials scare you, or you think “eigenvector” is a mountain in Germany,
then save your money ($50US). Otherwise, you can really have fun with this
one. The last three chapters (10-12) are devoted to the physics that apply to
game play.

JeffOn Sunday 18 May 2003 12:23 pm, chris wrote:

If you’re interested in writing one yourself, there’s a great book out
by John De Goes called “Cutting-Edge 3D Game Programming with C++”.
Newer editions are all about D3D/OGL I think, but if you can find the
edition from 1996, the first one I think, it’s an entire book dedicated
to the math behind making an engine similiar to the quality of Descent.
Pretty fun stuff if you like math. :slight_smile:

Hello,
Is anyone working on some type of 3D Engine in SDL without OpenGL? If
not, wouldn’t it be a good idea to start some sort of SDL_3d? I’m
willing to help. ThanX in advance,

   JVFF

I created a Software 3D engine for my dissertation (no texture mapping
btw).

The following books (in no particular order) will help you if your
thinking of doing this. But I strongly suggest you use Mesa or similar
and save yourself the bother :-), then you get a GL type interface for
free so you can make an OpenGL and Mesa version.

  1. Sergei Savchenko, ‘3D Graphics Programming: Games and Beyond’, ‘Sams’
  2. Alan Watt, ‘3D Computer Graphics’, Addison Wesley

The CG Bible (this one is sometimes out of print for a time):

  1. James Foley, Andries Van Dam, Steven Feiner, John Hughes, ‘Computer
    Graphics:Principles and Practice in C’, Addison Wesley

HTH

  • Tom.

Christopher Thielen wrote in
news:mailman.1053285966.25319.sdl at libsdl.org:

If you’re interested in writing one yourself, there’s a great book out
by John De Goes called “Cutting-Edge 3D Game Programming with C++”.
Newer editions are all about D3D/OGL I think, but if you can find the
edition from 1996, the first one I think, it’s an entire book dedicated
to the math behind making an engine similiar to the quality of Descent.
Pretty fun stuff if you like math. :slight_smile:

– chris (chris at luethy.net)

I am forced to chime in here. The first edition, which was the only one I
have had experience with, is potentially the worst example of poorly
written, badly edited ‘shovelware’ that I’ve ever had the misfortune of
paying good money for. If the figures aren’t incorrect, they’re completely
unhelpful. The writing is poor and the code is downright abysmal - also
there’s way too much of it in the hard copy for a book that includes a CD-
ROM.

-Daniel