Author Topic: Ultima Bug  (Read 6599 times)

ShinRa Inc

  • *
  • Posts: 416
  • The Ascension of the Ordinary Man
    • View Profile
    • http://shinrainc.org
Ultima Bug
« on: 2002-07-18 02:08:27 »
Narrowed down another of the random "Runtime Error 9" triggers;

Trying to view any field sprite head that doesn't use textures for it's eyes (ie; anyone wearing glasses)

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
Ultima Bug
« Reply #1 on: 2002-07-18 09:19:59 »
Hm ... strange. I never had this problem before ... let's see:
Could you do me a favor and tell me an example file ? I'll take a look at that problem, okay?

 - Alhexx

ShinRa Inc

  • *
  • Posts: 416
  • The Ascension of the Ordinary Man
    • View Profile
    • http://shinrainc.org
Ultima Bug
« Reply #2 on: 2002-07-18 19:32:22 »
hiaf.p
cugc.p
Those two've crashed me recently.  Others I recall having done it are;
clcb.p
cfia.p

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
Ultima Bug
« Reply #3 on: 2002-07-19 09:18:01 »
Okay, thanx - I'll have a look at it...

Oh, BTW:
I've implemented some of the functions you told me to. But:
I'm Sorry, but I can't implement a multiple-selection yet. That means you will have to move every single vertex or polygon :(

For multiple selection, I'll have to change a lot of Ultima's internal code - that wouldn't be too hard - but the new system works more buggy and it slows down the renderer *a lot* ... :(

However, Ultima 0.31 should be a fine release at all !

 - Alhexx

ShinRa Inc

  • *
  • Posts: 416
  • The Ascension of the Ordinary Man
    • View Profile
    • http://shinrainc.org
Ultima Bug
« Reply #4 on: 2002-07-19 16:38:26 »
Every little bit helps.  :)

I posted a while back about sprite head models, and an odd quirk in how it seems to interpet texture verts, might this bug be related somehow?

http://forums.qhimm.com/viewtopic.php?t=1301

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
Ultima Bug
« Reply #5 on: 2002-07-20 11:58:34 »
Okay, the crashes are fixed. However, these vertices you are speaking about in the other topic - yes they really seem to be unused. The problem is, that we still cannot say, how many vertices are really used in a model ... that seems to differ very much. If you have taken a look at any of our p format description, you'll see something called Value3. Thsi value is a real mistery to me ... it has got to do something with texture coords, but also with the polygon count ...
The way Ultima used to calculate the real number of Polygons is:

Code: [Select]
 If Value3 = 0 Then
    PolyGonS = NumPolys
  ElseIf Value3 >= Additional Then
    PolyGonS = NumPolys
    Scele = 0.01           'Scale for Model -> Battle Location
  Else
    PolyGonS = NumPolys - Value3 + 6
  End If


now it is:

Code: [Select]
 If Value3 = 0 Or Value3 <= 6 Then
    PolyGonS = NumPolys
  ElseIf Value3 >= Additional Then
    PolyGonS = NumPolys
    Scele = 0.01
  Else
    PolyGonS = NumPolys - Value3 + 6
  End If


The problem is, that when Value3 is: 0 < Value3 < 6, then Ultima crashed, b'cause it calculated more polygons than it can read out...
However, the bugfix in Ultima is a temporary solution - we have to find out how the real count of polygons is calculated ...

 - Alhexx

ShinRa Inc

  • *
  • Posts: 416
  • The Ascension of the Ordinary Man
    • View Profile
    • http://shinrainc.org
Ultima Bug
« Reply #6 on: 2002-07-20 22:58:56 »
The only reason I've thought those verts might have to do with Texturing, is because they match up *exactly* with existing verts on the model, specifically, the ones on the face.  example, using Rufus' head;


Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
Ultima Bug
« Reply #7 on: 2002-07-21 11:19:57 »
Hey, man, cool colors! However, what do I see there? Multiple Vertex Selection ?!? How have you made this ?? (oh, hell, now you have done something with my app I didn't know you could do it :D )

 - Alhexx

ShinRa Inc

  • *
  • Posts: 416
  • The Ascension of the Ordinary Man
    • View Profile
    • http://shinrainc.org
Ultima Bug
« Reply #8 on: 2002-07-21 19:00:21 »
LOL, sorry.  No, I just took like, 8 screenshots and overlayed them to onto one image instead of putting up each seperate one.  Those are where the extra Verts are located;  Exactly where you'd need to apply the eye and Mouth textures, no?

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
Ultima Bug
« Reply #9 on: 2002-07-22 11:36:00 »
Like I said before, textures in FF7 .p models is a big mistery to me. Texturing a Battle location is no problem - every single vertex has a tex coord there. But the other models do have only a few tex coords, and I don't know how to find which verts use these coords and blah blah blah ...

 - Alhexx

ShinRa Inc

  • *
  • Posts: 416
  • The Ascension of the Ordinary Man
    • View Profile
    • http://shinrainc.org
Ultima Bug
« Reply #10 on: 2002-07-22 20:48:51 »
I'm assuming you mean what kind of formula to use or whatnot, since it seems that these extra Verts are the ones for texturing;  They're not used on any polygons, and are always located at the same coordinates as at least one other Vert that is used for a Poly.  Further graphical example;



I connected and filled in those spare Verts and that's what you get.  Orange is where the Eyes are, and blue is where the Mouth is, no?

For Rufus' head, they're currently labeled as Vertices 108-122.  On *all* of the models, these spare Verts will be the last ones listed, and have 255-255-255 color values; I don't think *any* sprite has actual verts with maxed out colors like that.  I just looked at the Nurse's head, and her white uniform is only 230-230-230.  Rufus' trenchcoat is only 204-204-204.  Hojo's lab coat is only 179-179-179.

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
Ultima Bug
« Reply #11 on: 2002-07-23 10:48:27 »
Hm ... I cannot see that pic, however, your theory is very interesting ... I'll have to take a closer look at that ...

Well, and Ultima 0.31 is almost finished! And something that should make the 3ds users of you happy: I've included a 3ds-exporter ! However, it is not able to export colors, too, but I hope that'll be added soon...

 - Alhexx

ShinRa Inc

  • *
  • Posts: 416
  • The Ascension of the Ordinary Man
    • View Profile
    • http://shinrainc.org
Ultima Bug
« Reply #12 on: 2002-07-23 18:44:37 »
Jiveness.  Edited a typo in the image URL; works now.