don't click here

SADX/SA1 Hacking/Modding

Discussion in 'Engineering & Reverse Engineering' started by MainMemory, Aug 15, 2009.

  1. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    yes, but the only real reason for including the COL for loading would be so you can get an index of all the models.

    Also, levels don't utilize parent/children relationships, so there's less positioning work required.
     
  2. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,745
    338
    63
    SonLVL
    I'm going to make a separate level viewer rather than try to fit it into the model viewer. I'll also need to come up with a different camera, as it doesn't make much sense to look at a level by rotating around the center. Also, the first model in Emerald Coast 1 doesn't have UV's.
     
  3. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    Models without UVs are usually specifically for collision. Alot of the time they used nonsolid level models combined with solid invisible models for a number of reasons. Most of the time, the view model was too complex to allow for proper collision. Other times, it was because they were trying to save on rendered polys, or the view model was larger than the collision buffer allowed for.
     
  4. Dark Sonic

    Dark Sonic

    Member
    14,631
    1,611
    93
    Working on my art!
    Damn, then I must ask what are you guys doing?
     
  5. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,745
    338
    63
    SonLVL
    Making a model viewer, then editor, then maybe an importer. I have to be sure I know how to read the format before I can create new models.

    Also, I am officially naming the struct before the COL struct, the GEO struct.
     
  6. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    by 'before' the col struct, you mean the one that links directly to the attach struct?

    Because honestly, GEO is a better name for ATTACH, and SEG/OBJ would be more aptly described as "matrix" or "transform"
     
  7. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,745
    338
    63
    SonLVL
    By 'before', I mean the one that links to the COL struct and the texture list. Honestly, I think MODEL is a much better name for ATTACH, and CHRMODELS.DLL seems to agree with me. Also, I'm torn between animation and action.
     
  8. Woofmute

    Woofmute

    stuck in ram Member
    184
    0
    16
    turning into a dreamcast
    If you make the level viewer, you'll implement it in the SET editor won't you?
     
  9. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    I think being able to see the object & level models in SETedit would be a huge improvement, I'd be able to align things much more precisely. In fact, its that level of precision that is the last thing keeping me from using SETedit exclusively. For example, its much easier to align an object in 3dsmax where I have it's actual model in front of me.
     
  10. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,745
    338
    63
    SonLVL
    Sure why not?

    Edit: Well, there are two ways I could do that.
    1. Rewrite SETEdit's display code to use D3D.
    2. Simply draw flat wireframe models.
     
  11. Woofmute

    Woofmute

    stuck in ram Member
    184
    0
    16
    turning into a dreamcast
    I got used to SETedit, even with the random ring.png error every now and then, and it's level of precision isn't terrible, just takes a bit of trial and error. And Dude, I'm jealous again, I forgot you had the models.

    I guess it would be so much easier with D3D, but would it be quicker to implement in wireframe?

    EDIT: MainMemory, did you get the messages from Spyke4995 on Youtube?
     
  12. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,745
    338
    63
    SonLVL
    Well, if I wanted to use Direct3D, I think there are two ways I could do that:
    1. Render the model in 3D with the object sprites drawn over that. This would cause all sprites to be drawn on top of the model.
    2. Figure out how to draw the sprites in the 3D space.
    3. Draw the models for the objects.

    And yes I did.
     
  13. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,745
    338
    63
    SonLVL
    Okay, I got all of the objects in the level to render and I got the camera to work like I want it to, but some of them aren't in the right places.
    Am I missing something?

    Also, why do I never get a "ring.png not found" error?
     
  14. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    Sometimes sadx does funky things. How often does the misaligned object error occur? Does your rotation import work properly? In what order are you applying the transforms? (Rotations have to come AFTER positioning)
     
  15. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,745
    338
    63
    SonLVL
    If I do rotation after positioning, the object would rotate around the origin rather than itself. I don't know, there may be a way to apply them to the vertices rather than the world. Basically there are several improperly positioned and rotated objects, but the main islands are in the right place.
     
  16. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    As I'm sure you know, there are 2 different coordinate spaces, local and global. The rotations are applied locally. Objects should rotate around their individual pivot point. So maybe you applying them before moving is a good idea, because that way you won't have to keep track of coordinate spaces as much. But in that case, if you want to make a level arranger you'll have to move the object back to the world origin every time you want to rotate a model.
     
  17. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,745
    338
    63
    SonLVL
    I was thinking that I would just recreate the vertices every time they are changed, and I reapply the rotation/position/scale every time I draw the screen.
     
  18. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,745
    338
    63
    SonLVL
    Whatever, you can get the beta version of the level viewer here.
    First, find your exe. I only tested this with mine, so I don't know if it will work with the other version.
    Second, select an address either manually or with the dropdown menu. These are pointers to the GEO struct, not the COL struct, so the level headers page won't help you. You can also choose whether to draw invisible models or not.
    Controls:
    Up - Move forward
    Down - Move backward
    Left
    Right
    A - Move Up
    Z - Move Down
    J - Rotate Left
    K - Rotate Right
    I - Rotate Up
    M - Rotate Down
    Q - Increase Interval (Move Speed)
    W - Decrease Interval
    E - Reset Position
    R - Reset Angle
    T - Move to first object
     
  19. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    What are the required assets to get it to run? It crashes upon startup for me, before it loads anything. I assume I'm missing a library or something.
     
  20. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,745
    338
    63
    SonLVL
    I put SAModel.dll in there, right? And you have the .NET Framework installed?

    Does it give you an error message? If it does, post it here.