Ultima

  • Thread starter Thread starter ficedula
  • Start date Start date
Status
Not open for further replies.
I know that problem with the one-way-convert...  :DBut that's not why I'm postin':
I'm going to make a break with FF7 hacking and Utlima programming for 'bout 1 week. But i'm not going to lay myself back and watch TV. I've started reading a book 'bout C++. That's with wath I'll spend my time.
I've also started programming some *basic* (not VB) apps...I see C++ is harder than VB...but I'm going to learn it anyway. (I think that are good news for Fice, SaiNt and other 'VB-enemies'  :wink:

BTW: But I'll still be postin'...

- Alhexx
 
Nooooooo!I've lost another person to the corrupting influence of C++!

(Learn Delphi! Learn Delphi!)

Well, good luck anyway. You'll need it  :wink:
 
Hm?
I didn't want Fice to feel losing everyone...I mean learning Delphi would be fine, but:
I'm a 3d model freak. I wanna get every 3d model outta almost every game I got. But many tools are written in C++ or for another OS (yes, I'm talkin' 'bout that Onitools-thingy...)And C++ is for many OS, so..ehm, you know.
Perhaps I'll take time next year and learn Delphi, too   :)

BTW: My page is also available at   [url="<a]http://alhexx.cjb.net[/url]" TARGET=_blank>http://alhexx.cjb.net , too.

- Alhexx

- edit -
Forgot to mention the exporters from 3ds. Heavy Metal F.A.K.K. 2, ie, has 3ds exporters, but no importers. But the source is included...

[This message has been edited by Alhexx (edited August 25, 2001).]
 
Yeah! Learn Delphi! (Latest versions of Delphi for Windows and Linux are *both* free, *with* IDE's, I might add. Free C++ compilers tend to be horrible command-line jobs).
 
is there any way of going from p file 2 milkshape and back? i wanna start smoothing some models out.
besides why not use blender? its free for godsake and its powerfull, cross platform too [url="<a]http://www.blender.nl[/url]" TARGET=_blank>www.blender.nl
 
I'm d/l-ing it at the moment. The screenshots look well, perpahs I'm going to build an im/exporter...for Ultima   :D - Alhexx

- edit -
To that Milkshape thing: no, not yet. First we've got to figure out (most of) the rest of the p format.
I was testing with the different parts, but if there's any illegal value in one of the parts of the p file, FF7 crashes. So I see no sense in converting milkshape files into not-working p files...

[This message has been edited by Alhexx (edited August 27, 2001).]
 
Hehe, I had to push this topic up-to-date  :wink:But that's not the reason...

1) I've started to work on Ultima after my break.

2) I thought 'bout makin' a Universal-Texture-Converter, but that's not  important now.

3) I've got an OpenGL-Problem...:

Fice:
When you (or I) zoom too close to the model, some parts aren't shown. See the problem?
What have I to do that this doesn't happen?

I'm askin' b'cause I wanna change the 2D-Views. 'Till now it's simple bmLines, now I wanna view them via Wireframe...

- Alhexx
 
Well, that doesn't happen on my programs, so it's something with the way you've set OpenGL up. So I can't really tell without seeing your code.I'm guessing it's something to do with the way you've set up your projection matrix. How *have* you set up your projection?
 
lol. i feel so left out. oh well. hope i win the Powerball this month and ill have enough money to buy 1 million GF3s. Till then, i have to transfer a lot of files.
 
code:

Code:
    Dim pfd As PIXELFORMATDESCRIPTOR    Dim RetVal As Long        pfd.nSize = Len(pfd)    pfd.nVersion = 1    pfd.dwFlags = PFD_SUPPORT_OPENGL Or PFD_DRAW_TO_WINDOW Or PFD_DOUBLEBUFFER Or PFD_TYPE_RGBA    pfd.iPixelType = PFD_TYPE_RGBA    pfd.cColorBits = 16    pfd.cDepthBits = 16    pfd.iLayerType = PFD_MAIN_PLANE        RetVal = ChoosePixelFormat(picFront.hDC, pfd)    SetPixelFormat picFront.hDC, RetVal, pfd    hGLRC2 = wglCreateContext(picFront.hDC)    wglMakeCurrent picFront.hDC, hGLRC2        RetVal = ChoosePixelFormat(picSide.hDC, pfd)    SetPixelFormat picSide.hDC, RetVal, pfd    hGLRC3 = wglCreateContext(picSide.hDC)    wglMakeCurrent picSide.hDC, hGLRC3        RetVal = ChoosePixelFormat(picTop.hDC, pfd)    SetPixelFormat picTop.hDC, RetVal, pfd    hGLRC4 = wglCreateContext(picTop.hDC)    wglMakeCurrent picTop.hDC, hGLRC4        RetVal = ChoosePixelFormat(picOutput.hDC, pfd)    SetPixelFormat picOutput.hDC, RetVal, pfd     hGLRC = wglCreateContext(picOutput.hDC)    wglMakeCurrent picOutput.hDC, hGLRC            glEnable GL_DEPTH_TEST    glFrontFace GL_CCW                 Dim SpecRef(3) As GLfloat            SpecRef(0) = 0.5    SpecRef(1) = 0.5    SpecRef(2) = 0.5    SpecRef(3) = 0.5        glEnable GL_COLOR_MATERIAL    glColorMaterial GL_FRONT, GL_AMBIENT_AND_DIFFUSE    glMaterialfv GL_FRONT, GL_SPECULAR, SpecRef(0)    glMateriali GL_FRONT, GL_SHININESS, 128    glEnable glcTexture2D    glClearColor 0#, 0#, 0#, 0#    glEnable glcDepthTest    glShadeModel smSmooth    glEnable GL_BLEND    glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA    glClearColor 1, 1, 1, 0
I hope that's what you asked for...

- Alhexx

- edit -
Deleted comments in source

[This message has been edited by Alhexx (edited September 03, 2001).]

[/quote]
 
No, it's not. I want to know how you've set up your projection matrix. If you don't know what I'm talking about, maybe you haven't set one up, which is your problem.You'd change the projection matrix using glMatrixMode(GL_PROJECTION);
got anything like that in your source?
 
Hm, nope - the above code is everything is set up. So how can I set up the matrix to make it work well?
(I hope I'm now annoying you with that trash...) - Alhexx
 
OK ... time for another OpenGL lesson.There are 3 matrixes in OGL: Modelview, Projection and Texture.

The Modelview is the one you're familiar with; it holds rotations, translations, scalings, and so on, that are applied to any points (polygons) you draw - ie. glVertex commands.

The Texture matrix does exactly the same thing, but for texture coordinates (glTexCoord commands). It's not used very often of course, because it's fairly rare that you need to change texcoords at all, never mind do anything fancy like translate or rotate them. Nevertheless, the matrix IS still there if you need it.

The Projection matrix affects points, like the Modelview matrix, but in a different way. The Projection matrix basically sets how the final image is "projected" onto the 2D screen window.

So, one thing the projection matrix is used for, is setting how "wide" the field of view for the scene is. Also, the "aspect ratio" of the display - you can use that to stretch out the display up or sideways. It's also related to, for example, how many "units" wide and high you can see on the screen at once. For example, if you draw a point at (1,0,1), will that appear *just* to the right of middle, or over on the far right of the screen? That's the sort of thing it controls. A *bit* like a "zoom" control.

Finally, the projection matrix ALSO controls the depth clipping planes. In other words, how far away an object has to be before it's totally ignored and not drawn - also, how CLOSE to the "camera" an object has to be before it's ignored and not drawn.

Hence, if an object is disappearing when it gets close up, then your near depth clipping plane is set too far in front of the camera.

To set up a projection matrix, the easiest way is (when you're setting up OpenGL, ie. after it's been initialized and you're just setting up default stuff like lighting):

glMatrixMode(GL_PROJECTION);
{Switch to editing projection}
glLoadIdentity;
{Default matrix load}
gluPerspective(90, Width/height, 1, 1000);
{Set up projection properly}
glMatrixMode(GL_MODELVIEW);
{Switch back to editing normal matrix}

gluPerspective - look it up in the help files. It's the easiest way to set up projections.

Why bother setting near and far depth clipping? Accuracy. Think about it: If you only deal with objects between 1 and 10 "units" distance away, you can store the distances (depths) with MUCH greater accuracy, than if you need to deal with objects between 1 and 10000 "units" away. In that case, because the numbers are larger, you'd have much less accuracy - possibly very little or no decimal point accuracy at all.

So you set up the depth clipping depending on what you're viewing. If no object EVER gets more than say 100 units distance away from the camera, then tell OpenGL that! It can then devote less space to storing the integer part of the distance, and more to storing the fractional part - giving more accuracy, and better quality depth calculations.

OK ... I think that's all you need to know (and a bit more!)  :)
 
Yeah, that's it...but now I've got another fine problem... I've created a fish-eye-view   :D
http://www.8ung.at/alhexx/yuffie_fish_eye.gif" border=0>

- Alhexx

- edit -
Had to correct the link for the pic

[This message has been edited by Alhexx (edited September 04, 2001).]
 
First of all, try a different FOV setting (first parameter to gluPerspective).Secondly, have you set the aspect ratio correctly?

Thirdly, have you got the min/max depth distances ok? Remember, if you set the max depth too high, you lose a lot of precision for when polygons are close together.
 
Ops, I've forgotten sth: I wanted to post this, too:
code:

Code:
    glMatrixMode mmProjection    glLoadIdentity    gluPerspective 90, picOutput.Width / picOutput.Height, 0.001, 1000    gluLookAt 0, 0, 1.5, 0, 0, 0, 0, 1, 0    glMatrixMode mmModelView
That are my current settings, but since I've got some ideas by you now, I'm going to try a bit around...

- Alhexx

- edit -
PicOutput is the output window for the 3d view.  :)

[This message has been edited by Alhexx (edited September 06, 2001).]

[/quote]
 
Status
Not open for further replies.
Back
Top