PocketMatrix forums

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

Loading models up

Ok i dont really need any code for this im not planning on doing this anytime soon or anything like that. Im just curious how hard it would to load up models and rendering them for a game engine on the ppc, not using pocketgl or anything like that.
Does this require alot of knowlege in 3d math or what?
How long is a piece of string?

Displaying a flat-shaded polygonal model on the screen isn't that complicated in itself (there are *loads* of tutorials around for that kind of thing).

The maths is pretty simple, too - certainly for basic rendering. Later on it gets more interesting with more triganometry involved when you start light-sourcing, but it's not hugely complicated.

The hard part is probably going to be organising things so you get a good speed out of it.

All you need is some time and tenacity.

Cheers,

Refractor.
see flipcode.com and places like that.
ianf · 08 Feb 2002, 16:17 UTC — Loading a model
:idea: This best examples for 3D that you can apply to the PocketPC are the NeHe OpenGL tutorials on www.gamedev.net

Because the PocketPC does not have an OpenGL port I have been using PocketGL and I am converting OpenGL examples to work with PocketGL ( a gapi based 3D toolkit )

Among the tutorials at NeHe there is a model loading one so you should be able to understand how to open the file & read the data for use in your own code.

Ian
Thanks
hmm, I have got a huge problem...
My 3d engine in emulator works fine, the same with windows9x GDI version... but after bringing it to the real device (ipaq and hp, both with Arm cpus) some incorrect lines are being drawn. It didn't draw them with my old version of engine and the new version works in emulator without a problem as well. I have tryed both debug and release arm code and they both produce this effect.
Anyone knows what might be the reason? I don't have the real device so testing my 3d engine for such problems is nearly impossible:(

PS.If anyone is interested, currently it's a simple one, supports flat/gourand/tmapped polys, normal, addictive and alpha-blending drawing. Trying to add 3d clipping atm. It uses pure C code for everything and 16:16/24:8 fixedpoint numbers (althrought they are often stripped to much less - during a mul/div operation)
If you're willing to send your code to a stranger, I'll have a look at it for you if you like.

I have an iPAQ 3630.

When you say "incorrect lines", do you mean, horizontal, vertical, random? What device did you test it on?

Cheers,

Refractor.
I think only vertical(or close to vertical) lines appear. I did change my line function from 24:8 to 16:16 fixedpoint math, but works like a charm here. I will try it out with the old function when I get a chance.
Sorry, but I don't want to send the source over...hope you understand.(and it's a total mess;)
not sure which devices, I think IPAQ 36xx and no idea about the hp. Any known problems with evc++ or so???
No problem about the source :-)

The reason I asked about the line orientation is that it could be something to do with the screen refresh?

Try putting a wait-for-key-press between frames, then step through frames and look for the lines. If the problem still occurs then either there's a problem with your code, or the compiler. If the problem goes away, then it's a problem with the way you're writing to the screen...

Are you plotting to an offscreen buffer then blitting, or writing directly to the screen?

Cheers,

Refractor.
no problem with screen, i'm using a backbuffer in memory and plot it to screen at the end of each frame.
I'm currently trying to fix all smaller problems and add full 3d clipping, once I get it done I will try it again and hope the problem just goes away:)