PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

creating a opensource 3d engine graphics library

Ok, so I'm willing to invest some decent amount of time in this, now all I need to know what is actually wanted :-)

so this thread has a couple of goals

(fear my leet usage of formatting tags now!!)


  • Identyfying what is possible
  • Identifying what we want
  • Finding people who want to collaborate / donate source code for studying/integration
  • Discussing the design issues
  • anyting usefull that doesn't spring to mind now


my idea:
free to use in commercial and non commercial work
(reference would be nice)
a decent c++ design :-)
well performing/versatile


sounds like your average wishlist doesn't it ? :-)

I suggest to NOT try to model it after a known api, that way we have a complety empty start, which allows us to take all the best features for ppc's

but before i am going to invest alot of time in this, i wanna hear some other opinions :-)


First of all, I like very much the idea of not modeling it after a known api which lets us do some additional optimizations to get the max performace out of the PPCs.

Do you mean OOP design under the C++? Cause I'm quite bad with it...

my wish list would include portability (so with one code I can use it under PPC,PC(gdi/ddraw/ogl and/or d3d) which helps a lot during debugging and also for all those folks which doesn't have a PPC or need their app to work on both types of machines. The good thing is that it's quite simple to do. Especially the GDI/ddraw part.

Another good thing would be to couple this 3d engine with EasyCE to get a fully-featured library.

I can donate some time to this project, too. Also some working code (which would need to be cleaned up, but I can do it) of a .3ds loader, some basic triangles drawing functions, radix sort etc.

unfortunetly I can't help out with any specific (asm) code or PPC testing as I don't own a PPC.
I only own a iPAQ 3850, but I am sure that there are a lot of people who are willing to test in on other devices :-)

I would really like to use easyCE, because it already has alot of hardware abstraction going on..  Actually, I'd like to greatly extend the functionality of easyCE, adding a generic imageloading component, include the zlib library in a clean way, adding some more 2d graphic api's, including mikmod, and of course the 3d stuff

I'd really love to see all this in a clean, well structured library, nicely documented :-)

i don't really care what the name of that library is, wheter it will be part of easyCE or not

about the oop design, i'm not unfamiliar with it, and i am sure there are more people out there

besides that, it is never too late to learn, and the only reason i do this becasue it's a fun way of learning :-)

let's see what this becomes ;-)

Kind Regards,
Willem

talking of mikmod, I think a wave mixer api should be included as mikmod is crap with wav's, sound is very noisy, fine with mods but not many people use mods or can create them.

Jim
GeoffSulcer · 13 Dec 2001, 13:40 UTC
Oh I forgot...

We should definitely build on top of EasyCE.  Jacco has already done a good job on this and it provides a good foundation.

What I've been doing is using EasyCE and then replacing the primitives with my own functions when I need to.

-Snork
GeoffSulcer · 13 Dec 2001, 13:57 UTC
I'm in too.

I have a casio so I can give some assistance on MIPS testing.

open source and free is vital of course.
3d engine and maybe some additional sprite support for 2d games.

I've started on a 3d engine for a game i'm working on.  i haven't got very far yet and I'd love to replace it with this new effort.

I've got a good background in OOP and C++, but I don't know if that should really be a requirement.  Let's shoot for functional and readable.

What ideas do you all have for the functions the API should provide?

-SnorkLast modification: Snork - 12/13/01 at 11:57:16
easyCE is the way to go, because if there is one thing that i dont want is having to take the different platforms into consideration too much :-)

but first i have to get that working on my 3850

it also has grown too big to just be 2 files i think, it could do with some major redesign, making it nicely modular and stuff

I wouldn't mind doing that, but well, it's jacco's library soo he should have his input as well

Kind regards,
Willem
snork: background not really required, lets just do this for, fun, learning, and resume-building :-)
GeoffSulcer · 13 Dec 2001, 14:05 UTC
Sorry, I meant i didn't think that OOP should be a requirement for the 3d engine.  we could do it that way, but i tend to think that non OO code is a bit easier to read and follow.

-Snork
well, it really doesn't have to

i don't really mean oop as in extensively using classes, you can write perfect oop code in plain c

it is more style of coding, keeping things modular and small

each subsection is then easier to understand, easily replacable with a more efficient/ optimised for certain platform  part

and it really should make everything as a whole more comprehensible :-)
Hi. A couple suggestions right off.

Create a seperate project within the EasyCE workspace for the 3D portion, that way a seperate lib is generated for the 3D library. That library could then use the main EasyCE library for its display output (assuming it will even blit directly to the screen).

The OOP is a good idea, but can raise additional issues. First off, you don't need to restrict yourself rigidly to it within the engine itself (IE every vector represented by a class, etc). You could just expose the various user-accessible objects as Classes, so it would be more for interface functionality. One potential problem is that a lot of source out there is in C, which would raise compatibility issues. Take Pocket Quake for example. If it were to be modified to use this new 3D library, a substantial amount of extra effort would be required to convert the Quake C sources to C++ so they could call your library. So perhaps offering parallel interfaces (like MFC enhances the Windows API) would be the best overall.

Good luck! :)

Dan East
well, like i said, programming oop is not restricted to a specific language :-)

the interface to all the rasterization routines will be c, and on top of that i intend to build some classes that handles for animated models etc  (stuff you'll never backport to pocketquake if you're sane :-)

but you still have the possibility to acces teh rasterization routines if you want.

i doubt that'll bring you alot though :-)

and yeah, i'm currently thinking how to fit in easyCE, because there is no way that I am going to do all the device abstraction myself :-)

but I really would like to see some added features to easyCE, for instance "native" landscape support..

then you can request an orientation, and easyCE then gives you either a 320*240 or 240*320 buffer

this has the added advantage that you can return the actual hardwarebuffer on the iPAQ if you are in the correct mode.

right now i am really doubting what to do

branch of the current easyCE, and redesign it to my wishes seems the most appropriate, then people can always backport it if they find things usefull..

still thinking what to do though ;-)

Zen:easyce gives you either 240x320 or 320x240 buffer... haven't we spoken about it already? a 320x320 buffer would be much better, because you won't have to implement all drawing routines twice, at the expense of some (not much) memory space, which could in the end be regained by not compiling twice a bunch of graphic routines into the exe file
I don't think I can participate a lot on the coding front; I'm going to work for a VR company and I don't want to mix things up too much (I'll be doing a 3D engine for them as well). I do have some code to donate however; I've developed a rapid 3D engine that you might want to take a look at. The interesting stuff is a fixed point matrix class (includes most of the common operations, including transformations / translations of 3D vectors), and quite fast sub-pixel / sub-texel correct texture mappers.

Besides that I can only donate knowledge. :)

- Jacco.
Phantom:hey, that's a lot already. It would be great if we could include it in our codebase.
I wish you luck and a fair wind on this project.
As I'm already more than a month into PocketGL ( which is not a PocketPC OpenGL port ) I don't have the heart to give up & start on something new & I think Pierre has done agreat job so far. Virtually all of the code is C source with a small lib containing the core of the 3D system added in. It's GAPI, has landscape, all the mesh / texture functions, alpha blending, Fixed point math & iPaq 36/Casio support, 2D text, tga loading so you can pick up some ideas from the demo source. The code is reasonably well documented and actually easier to follow in some cases than EasyCE.

Hey Good!!!! A Sure Inclusion and help from my side.

Regards
Dips
I'm just posting this here for reference. Here is the PocketGL main page:
http://pierrel5.free.fr/ThemePGL.htm

Anyone know what the licensing costs are for commercial use?

Dan East
Jacco: sounds VERY interesting :-)

it would be very appreciated

I looked into pocketGL as well, and it is indeed very nice..  

I think the licencing for commercial development are around $50, not much but it can be a hurdle for the younger developers ( i'm 20 now and have a good job, but three years ago i was dependent on free sourcecode for studying purposes)

I will start on making/(ripping :-) triangle_rasterization functions in optimised c and asm, and on putting together a fast fixed point math lib (which should not be much work with phantoms help :-)

suggestions and help always welcome!

Kind regards,
Willem

PocketGL is $49 but the demo is almost fully functional. Pierre is really helpful & anyone wanting advice on 3D for PocketPC to help with this project should get in touch with him.

Ian
OK, I uploaded some stuff. I lost the final state of the project somewhere; that's why I uploaded just the engine core that I used for the wireframe model in The Nutcracker. The sources include stuff for fixed point matrix calculus, a fast radix sorter, flat shaded affine texture mapping (perspective correctness is extremely expensive on the PPC thanks to the lack of an FPU) and some convenient classes like 'Polygon', 'Mesh' and so on. I don't think you should use it as a basis for a full-fletched 3D engine (I coded it in like 3 nights, just to test the achieveable performance on a PPC) but it might contain interesting portions.

Someone should really try to do the fixed point stuff in asm: It's cool right now, but due to the 22:10 precision, the range is very limited. Using intermediate 64bit results could make this really cool.

Oh yeah, before I forget, here's the url:

http://www.pocketmatrix.com/phantom/3dengine.zip

Just 10Kb, and 5 sources. The fixed point macro's are still the same in EasyCE 1.6, so if you really want to attempt a compile, use that. :)

Have fun,
- Jacco.
Phew, i really enjoyed that vacation :-)

didn't do a single thing in a few weeks, somtimes a break from those damn computers really is nice ;-)

anyway, back to work ;-)