|
Basic 3d engine Displaying 21-32 of 32 total.
prev
1 2
zenogais
|
Well, the Playstation's GPU was actually more of a 2D card with a seperate chip for performing 3D Graphics calculations such as rotations, lighting, vector and matrix maths, it was called the Geometry Transformation Engine(GTE). But, In order to create the effect of Z-Sorting you actually had to arrange it manually, but the method for doing so was quite efficient. You basically used a linked list ordering-table(OT) containing packet headers with the end of each header pointing to the next. Then the packets can be arranged from highest Z-value to lowest Z-value. So it wasn't a true 3D chip, but it had all the environmental support to make it trivial to have it behave like one. That doesn't necessarily mean the saturn pushed twice as many polys as the PSX, that merely means that the PSX, while not truly 3D, could perform 3D operations extremely efficiently. Having seperate processors for graphics and Geometry operations meant that you could perform Geometry calculations and Graphical operations concurrently. This is what made it so extremely efficient.
Now back on to this awesome example :)
I dunno, I would think 200,000 polys with less RAM would could be possible, but that depends on the size of each polygon I suppose. Anyway, I'm looking forward to more updates.
Posted on 2004-07-18 20:29:37 (last edited on 2004-07-18 20:33:22)
|
Gayo
|
Hmm. How would a rectangle primitive even work? Wouldn't that make it impossible to draw most things?
Anyway. Basil, you are a god among men. This is sex on wheels.
Posted on 2004-07-18 23:57:21
|
basil
|
Well, it depends how primitive you mean I guess. You could draw everything in terms of rectangles if you'd like, that would be quite possible. But by my understanding of things, when you're drawing filled shapes pixel by pixel you take the approach of dividing the shape into flat bottomed/topped triangles. So at the most primitive level it's all triangles. Correct me if I'm wrong.
McGrue's suggestion of 3d elements integrated into a 2d BS intrigues me, so that's the new direction I'm currently looking into. Just don't hold your breath, because this is all backseat to my horrendous uni workload.
Posted on 2004-07-19 01:46:27
|
Kildorf
|
Most 3d engines do run on triangles for one simple reason: It's impossible to make a triangle that doesn't lie in a plane. With quad primitives, you have the opportunity to (accidentally or otherwise) produce primitives that don't lie on a flat plane, so they're harder to render quickly. You don't have to figure out if a triangle flexes toward or away from the camera, or have extra values for curvature and so on.
Posted on 2004-07-19 02:54:41
|
Gayo
|
I tried to lie on a plane once, but they made me leave.
Posted on 2004-07-19 03:56:49
|
Omni
|
Kildorf: I was wondering about how to calculate the normal for a quad for lighting purposes when I realized they don't lie on a flat plane, either.
The Saturn doing quad based 3D meant that it was inherently biased towards sprites, I think. It is essentially rendering two triangles, because you can morph the quad into two triangles that share common vertices.
Posted on 2004-07-19 05:58:06
|
zenogais
|
That's fairly common 3D Engine behavior. As for lighting normals, it actually depends on the type of shading you're using. If you're using flat shading then there's really no lighting to be done. However, for more information you should check out this document, will probably help alot: http://www.devmaster.net/articles/software-rendering/part4.php
Posted on 2004-07-19 18:29:24 (last edited on 2004-07-19 18:30:03)
|
Omni
|
Those tutorials are really spiffy.
Posted on 2004-07-20 02:00:44
|
Toen
|
Whoa. I can't wait to see this fleshed out. I'm really impressed.
Posted on 2004-07-21 00:23:11
|
Omni
|
Okay! I was working on my 3D engine, right? And I was wondering how to do clipping, when I figured I would check on how Basil's engine did it, if any.
Well, I decided to zoom way far in on the model. And...the weirdest thing happened! I zoomed in and the vertexes started distorting madly, and then I began zooming back out, even though I was holding the zoom in button! And I was like, what's going on?
Then I tried it with my own 3D demo (which is no where near as advanced...all it can do is rotate four points right now), and when I zoomed in really really far...my object starting distorting madly and then zooming back out!
And I was like, what the crap!
Then I realized what I read about Verge integers so long ago! They have an upper bound of 128,000,000,000 something, right? And they're signed! So that means, when it gets too high, the negative bit on the integer changes, and the variable begins incrementing in reverse! That's why the models zoomed back out when I was trying to zoom in!
Well, now I've just got to figure out a way to cover this up.
EDIT: Okay, no, that's not right. My model is displayed as zooming out in reverse on the z-axis when the z value reaches nothing greater than 5000. But then I have several scalars...5000 3D units * 100 (3D unit to 2D pixel scale) * 2000 (that number is really, *just there*) = about 2000000000.
Okay, this is weird, since I can't figure out why Verge is doing this. My 3D integers aren't wrapping, but my projection of 2D coordinates is.
2ND EDIT: It seemed that my translation function to move a polygon x, y, z, units, didn't work. When I passed it the local variables tx, ty, tz, and then called Log() on them from within the function, they were always zero.
Then I realized I had global variables with the exact same names. A change of variable names remedied the wrapping of my 3D units...
Was that really a global-local conflict? Shouldn't V3 automatically give preference to local variable names?
Posted on 2004-07-22 04:47:21 (last edited on 2004-07-22 06:23:54)
|
basil
|
Yeah, I was aware of that issue but it's the kind of thing I can't be bothered fixing because under normal circumstances it won't come up.
And yeah, I don't clip, primarily because it runs fast enough without it but also because I just never got around to it. Doing a little work on it at the moment by the way, should be quite neat if I finish it up
Posted on 2004-07-22 10:00:33
|
Omni
|
I figure just clipping all vertexes that have z
Posted on 2004-07-22 15:21:22
|
Displaying 21-32 of 32 total.
prev
1 2
|
|