Jump to content
The Dark Mod Forums

Al_B

Member
  • Posts

    6
  • Joined

  • Last visited

Posts posted by Al_B

  1. Screenshot does look good - even with the unaligned textures :)

     

    One of the first things you'll see is the way the sloped surfaces are all misaligned. Now when I did the texturing for the vertical walls in the tool I cheated a bit in two ways:

    1. I have a config file for scaling each texture and

    2. since I knew the textures would be aligned in steps of 1/8th portions(8 "steps" being the height of a non repeated texture) depending on how high up they are so I just set the vertical offset param by that fraction and it just works.

     

    I'm not sure I understand the motivation for having a separate scaling per texture. Isn't the scaling factor(s) that you need determined by the world coordinates that you're using when you write the map file rather than the textures themselves?

     

    Now I had assumed that I could do something similar with sloped surfaces but I can't quite seem to get it to work. I'm able to work out the scaling value from the ratio of a sloped hypotenuse to a flat surface (it's based on a tilemap so everything has fixed dimensions) but not the offset value.

     

    What I want to achieve for those sloped textures is for each tile to consist of a 1x1 aligned none repeating texture.

     

    I'm not an expert on this but from what I've seen you essentially need to determine the matrix required to transform surface coordinates of the tile to texture coordinates. This would be something like:

     

    [rs0 rs1 tx]

    [rs2 rs3 ty]

    [ 0 0 1]

     

    rs0..3 control scaling and rotation, tx and ty control translation. As the "Z" coordinate isn't useful the last row is always 0,0,1 and not saved in the map file. Even for flat floors you'll eventually need to tackle rs0..3 to ensure textures are rotated correctly although in Underworld at least the rotation is always the same for all tiles from what I remember.

     

    The tricky bit is obviously computing this matrix as in a general case I'd guess you'd need to compute the inverse of the world -> surface matrix and then use that to set up the appropriate scaling, rotation and offset. However, in this case I'd guess that you may get away with altering the values of tx and ty by an amount based on the direction of the slope and it's height.

     

    As far as specific links, this seems the most useful I spotted in a quick google but obviously it doesn't hold your hand through the matrix maths: http://www.doom3world.org/phpbb2/viewtopic.php?f=1&t=16228

  2. Hm.. Does it necessarily even need level persistance: deus ex-games, for example, ran pretty well so that each mission was a single encapsulated mission, similarily to TDM missions.

     

    If this is going to act in a similar way to the original games then yes, persistence is essential. Unlike Deus Ex the games freely allow you to leave objects in any location and return to them later - it would break quests if essential items could be lost by a level transition. In the Underworld games interactions with NPCs also rely on character specific and global variables being maintained.

     

    That's not meant to discourage - I'm sure it's possible to implement but it's potentially a big task.

  3. Great to see the new screenshots. Hope you don't mind a little feedback on the UW2 pics:

    • I'm sure it's on your list but it appears that you have green and red swapped in the UW2 textures which gives those levels a strange appearance.
    • The textures appear quite dark - my guess would be that you may not have scaled the colours from the original 0..63 to 0..255.
    • The orientation of floor textures on non-sloping floors are out by 90 degrees. It's quite noticable in the throne room near the bottom of the ramp.
    • The vertical scaling of the level seems a little "squashed". Again, looking at the throne room each "step" should roughly correspond to a run of stone blocks. It looks about half to three quarters of that at the moment.

    These are just nitpicks, of course, and I suspect some of them may be because you've been concentrating on getting things working for SS. Looking forward to the next installment!

×
×
  • Create New...