Results 1 to 17 of 17

LODs, HODs and Modeling

  1. #1

    LODs, HODs and Modeling

    I've created a new model based upon an original HW2 model (expanded Mothership basically) and I have a few problems I need answers to.

    LODs:

    They're misaligned. How do you ensure each LOD model is aligned when you're modeling? The problem I have right now is when I zoom in or out, the three LODs appear in different positions. I understand what the problem is, I just don't know how to fix it.

    HODs:

    When in the hod editor, I'm importing each LOD from the new models in order to have the textures automatically applied. Works great, insofar as the textures. Problem is that the collision sphere and collision boxes are misaligned, or to be more precise, aligned to the original model.

    So again, how do I align a LOD model to the original position or how do I calculate the new size because recalculate is also based upon the original model, rather than the new.

    Models:

    When I create a model in Wings (for example), how do I set the alignment axis? If I have a 300 meter wide model, I don't want the center axis to be 200 meters portside. I want it 0 m portside, i.e. dead center.

  2. #2
    well, collision spheres and collision boxes aren't supposed to change in relation to how far away the camera is. That would mean that a shot that would have hit the ship when it was shown up close could miss it entirely if the player was viewing it from further away.

    Imagine in a multiplayer match if one player is viewing the ship up close while another is seeing it at the edge of his vision. He orders a ship to fire on it, and he sees a hit, while to you it appears like a miss. You now see a ship that he just witnessed blow up, and the game crashes.

    that's why there's only one collision model for each hod.
    Babylon 5: War Without End Official Site.

    "I keep telling you people that it's only a build animation, NOT a hyperspace animation." - Me, about the Babylon 5 mod hyperspace build animation.

  3. #3
    I understand what Collision boxes and spheres are for, I think you misunderstood my enquiry. They're both aligned to the original models axis. Since I don't know how to align the new model's axis up with the old ones, the box/sphere is off alignment. Where 0 should be dead centre, on the new model, 0 is now several hundred meters to the port (as it looks in-game).

    What I need to know is how do I align a model up with the correct axis?

  4. #4
    My mistake then.

    If CFHodEd has a reposition function, then I haven't found it, so you'll probably need to import your model into a modeling program. The 0,0,0 position is marked by thicker lines in Wings3D, so confirming if it's aligned properly visually is easy.
    To actually align it, you highlight the entire model and select absolute commands from the right click menu. Then you select move and enter 0 in all three coordinate boxes. This should center the model.

    Then when you've made the modifications you want, you can re-import it into CFHodEd.

    This shouldn't affect the texture mapping of the model if you do it right, so you probably won't have to worry about that.

  5. #5
    Member Krnt's Avatar
    Join Date
    Jul 2009
    Location
    Bridge Between Worlds, Core of the Universe
    I´ve always used CFHodEd to resize and reposition models for ships, to solve you problem I usually dot the following:

    Create a New Joint in the Root.

    Export the LOD .obj file, then re import it as a new Geometry Mesh and assign its parent name to the New Joint .

    Now in the "Hierarchy" tab, using the Position preview and the Matrix I try to figure out its new values (Position, Rotation, Scale and Axis), then I copy those Values in a text and restore them to Defaults.

    Back to "Geometry" tab I transform the mesh using the Values copied (I can still check if the values are being applied correctly using the "Position" button in "Hierarchy"), when finished export and reimport again as the desired LOD.

    Now I just delete the not needed any more like the Geometry and Joint created in the process.

  6. #6
    That didn't work. I used the absolute function and set all three LODs to 0, 0, 0. Fire up a CPU match and there's a dirty great hole where the engine should be when zoomed out. I managed to fix it by importing LOD 0 to LOD 1 and LOD 2 but I'm pretty sure that's just jury rigging. In addition, the Goblins where misaligned, as where the resource drop off and engine hardpoints suggesting that the original model is not on this alignment.

    Now I'm sure you could say "oh well at least it's working now" but that doesn't help me understand what's gone wrong.

    Krnt, I can't find the Import new Geomertry Mesh (unless you mean the import function on the LOD) nor can I find a Hierarchy tab.

  7. #7
    Member ajlsunrise's Avatar
    Join Date
    Jun 2008
    Location
    Binaryland
    can you upload the HOD so that we can take a look at it?

  8. #8
    O.K., here's an unaltered HOD as it appeared before I jury rigged the thing. You should see a mis match between models in the Engine giving the appearance of a hole on one side. At the risk of causing offence, I'd also like to point out I've not had a great deal of success when it comes to getting people to look at HOD files. I'm still waiting for a solution to my Weapon sound problem... (AJLSunrise excepted of course).

  9. #9
    I've taken a look at the unaltered file, and there's simply several big holes in the mesh on the right side mothership mesh. You'll probably have to redo lod1 entirely to fix that. Possibly just import it to Wings, delete the right mothership mesh and mirror the left one to fix it.

    The reason why moving the mesh like I suggested in Wings didn't work is that it is a model composed of several meshes. The absolute move function centers all the parts of the model, without regard to where they were before.

  10. #10
    You can center all parts by selecting vetrices and then centering. This keeps the parts as they were before.

    Works for scaling too.

    Just my 2 cents.
    Path To Victory

    - I can count to 1024 on my fingers! -

  11. #11
    Tell me then, what exactly is the difference between LODs 0, 1 and 2 from a modeling perspective? Any HOD I take that's only one LOD and I add the other two using LOD 0's .obj file works a charm.

    I've also just tested that model (the "fixed" version) by playing Hiigaran's and all damage passes through the side pods and straight to the center, as if the game isn't recognising the original model has changed. Why might that be, please?
    Last edited by saladin1973; 11th Aug 10 at 9:23 AM.

  12. #12
    Member MatthCoFreak's Avatar
    Join Date
    Aug 2006
    Location
    France
    LOD means level of detail. If LOD0, 1 and 2 are identical, it makes no sense to have LODs at all. You can simply have just LOD0 and delete all lines with "LOD" in the .ship so the games doesn't try to switch to unexisting LODs when you zoom out.

    Shots getting through a ship -> Collision mesh issue. Be advised that issues are to be expected with multi-mesh CM. You'd be better at merging all your meshes in a single one and use it as a CM.
    Lead developer of the Homeworld: Blue Planet TC.
    Member of The Apocalypse Project TC for Freespace 2.
    To all newbies : remember to use S110's clean data.
    Latest version of CFHodEd.

  13. #13
    weaponsfire passing through is a collision mesh issue. You need to import your model, or a simplified version of it, over the original collision mesh. You can then automaticly recalculate your collision box and sphere from that mesh, which generally takes care of any problems there.

    From a modeling perspective, LOD 1 should be a simpler, less detailed version of LOD 0, and LOD 2 even simpler. This makes it cheaper to render at a distance. If done properly, the player won't even notice the transition. If any meshes are missing the higher LODs, those meshes will vanish when you zoom out, unless LODing is disabled in the .ship file.
    Co-founder of Homeworld:@
    Open to new members

  14. #14
    Thanks, I understand now.

    Quote Originally Posted by MatthCoFreak
    LOD means level of detail. If LOD0, 1 and 2 are identical, it makes no sense to have LODs at all.
    Mat, the problem with doing that is when you zoom out, the model disapears and is replaced by an empty icon. Unless I've done something wrong?
    Last edited by saladin1973; 11th Aug 10 at 12:29 PM.

  15. #15
    the .ship file controls at what distances the ship moves up and down LODs. If it instructs the ship to move to an empty LOD, it will display, as you have seen, nothing. Modifying the .ship file or adding meshes to those LODs will resolve the issue

  16. #16
    So rather than adding the same mesh in, I could just edit the ship file to not change the LOD on a zoom or change the distance to something outside the maximum zoom, either way ending up with the same result as having the same mesh in each LOD?

    What's the line that controls that, please?

  17. #17
    Member Krnt's Avatar
    Join Date
    Jul 2009
    Location
    Bridge Between Worlds, Core of the Universe

    VGR Mothership LOD´s



    The values that you see above are the values that control the LODs switching distances and their description, these values are in meters, and to disable a certain LOD you must delete a pair of them (one that rises and one that lowers)

    Ex.: To disable the LOD2 from the ship it should look like this:

    Modified VGR Mothership LOD´s


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •