Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Model bound box(es)

  1. #1

    Default Model bound box(es)

    G'day folks,
    Time to pick someone's brain again. I'm looking at you Zappa. lol Sorry mate.
    Although anyone with the answer is more than welcome to reply.

    Background / Insight:
    I've edited the default BMWbike for a non-period correct map.
    I've removed the side car and made four motorcycle variants including two "choppers" with extended forks.

    If anyone has taken a look at the BMWbike in a 3D modeller they would notice that all parts are made of a mismatch of every other part.
    It's a real mess to say the least.
    So I cut away what didn't belong to each part.
    For example the rear tyre was made of 5 other bike parts including half of the handlebars, part of one seat, 2 separate parts of the rear fender, and a portion of the rear wheel. Or something like that.
    The whole bike is like that.

    I went through all parts separating them from what doesn't belong then attached the respective pieces together, before reassembling the bike.
    This was for two reasons, to be able to customize the bikes and to separate glossy parts from non-glossy parts (tyres and seat) using two shaders and two textures.
    Now that has left me with a lot of bound box center points, for lack of a better name, on each bike model.
    They still work in game and they look pretty amazing with mirror finish chrome and glass like paint jobs, but it's a bit messy behind the scenes and I'd like to learn how to fix it.
    Some time ago I removed the wooden tray / bed from the Opel truck which made the truck cab & chassis hover some 80+ units above ground (in game).

    The issue:
    All of the bike variants sit well until I change angle direction (90° or 270°) in the entity window. Then they appear somewhat higher in game, about 32 units above the ground.
    In Radiant I have to pull them down half a wheel height so they look as though they're bogged to the axles.

    They sometimes face 180° off the angle they were set at and I've recently had one jittering up and down when walking around it in game.
    I deleted that bike and replaced it again only for the next bike to carry-on in the same manner after the next compile.
    They're all happy to sit motionless in place now, only if they are half buried into the ground.

    I am sure this has to do with the multiple bound boxes of each model due to the bike rebuilds but I don't know how to edit them without losing parts of the model.
    I am so close to releasing the map, this is the final tweak, so I haven't started to learn Blender yet as I'm almost done by using LightRay3D.

    Help resolving this issue would be greatly appreciated. Thank you.

  2. #2

    Default

    I understand what the problem is,
    what I don't understand is, did you divide the model into multiple .tik files? or is it still one .tik model with multiple groups? (like the original)

    If it's one .tik file, do the following

    In LightRay, make sure the "origin" bone is at the coordinates 0,0,0 before exporting the model.
    When exporting the animation file, select the "origin" bone in the second "Select" option (not the Delta one).
    In the original bmwbike the origin bone is called "Box02"; it probably would be better to rename it to "ORIGIN" for your custom model
    and you probably need to tweak the bounding box in the quaked specs if the size is different than the original

  3. #3

    Default

    G'day Zappa, I knew you'd have the answers.

    Each of the four bikes have one .tik file
    There are a total of five tik files as there are 5 different coloured bikes.
    Five individual TGA files for the different colours plus one TGA for the non-gloss parts (tyres and seats) that all five bikes share.

    I tried your suggestion on the 4th bike which has the most parts.
    I could not select the origin bone "Box02" as there are 63 bones on top of each other in 4 different coordinates (reasonably close to each other).
    All are either on the horizontal line (ground level) of LR3D or slightly above it.

    Box02.jpg


    I already have the models centered to the bound boxes when viewed in Radiant's Top View.
    I've just added the default BMWbike for size comparison.

    4bikes_Radiant.png


    I still followed through with your export instructions, selecting "Box02" in the .skc (animation file).
    Nothing has changed in game or in Radiant, obviously as "Box02" coordinates haven't changed.

    I had thought of tweaking the tik file quaked specs but didn't follow through.
    With the exception of the two choppers having extended forks the only difference to the original size is the sidecar being removed.
    The bound boxes appear to be the same size as the original.

    This really isn't a major issue as in game nobody can tell, I was just hoping to learn for future model tweaking.
    It would make life easier to know that the model will stay seated on the ground and not raised in game by 30 -80 units.

    I am more than happy to send you the map.
    Then you could understand the situation more (not being able to select "Box02") and tell me if there is a way around it.
    Is there a way to select the box from a list before exporting?

    Thank you so much for the help already given.
    Much appreciated, mate.
    Last edited by AccadaccA; February 23rd, 2020 at 03:11 PM.

  4. #4

    Default

    yeah, send me the map or just the models so I can see better what's the problem

    one think I can tell you is, having 63 bones on top of each other is not normal and probably that's what is causing the issue


    Quote Originally Posted by AccadaccA View Post
    Is there a way to select the box from a list before exporting?
    You can select any object in the scene from this "Scene List" button

  5. #5

    Default

    I've just found how to select the bound box via list.

    Edit menu "Select From List"
    Moving the Box02 also moves the frame and fuel tank so I might just leave it, at least for now.
    It's only slightly off 0, 0, 0.

    Sorry I didn't see it before but I haven't been in a good place for a few days (family loss last Thursday).
    Last edited by AccadaccA; February 23rd, 2020 at 04:01 PM.

  6. #6

    Default

    Oops sorry mate, we were writing posts at the same time.

    Cheers
    Last edited by AccadaccA; February 23rd, 2020 at 03:59 PM.

  7. #7

    Default

    ok, I just saw one model and noticed that all the vertices in the model are assigned to different random bones, and none of those bones are in the center of the scene. That is the problem, the bones.

    To fix that you'll need to edit the model in LightRay and replace all the random bones by one "origin" bone.

    just follow this steps:


    1. select the skins one by one
    2. edit the vertices of the skins and remove all assigned bones (make sure you do this to all vertices from all the skins before doing the next step)
    3. now you can safely delete all the bones in the scene
    4. make a new bone (only one), put it in the center of the scene (0,0,0 absolute position) and rename it to "ORIGIN"
    5. edit the skins and assign all the vertices to the "ORIGIN" bone
    6. you are ready to export the model



    another thing I can suggest you is to make the bikes static models instead of having them as vehicles
    just moving the models into the static folder and editing the tik's, Im sure you know how to do that

    edit: one more thing.
    in your pk3 you have a shader file called "sprites.shader". there is a default "sprites.shader" in the game, so you will need to rename that to not override the default one

    and BTW, the map looks awesome and the bikes looks really goood.
    congrats for your work

  8. #8

    Default

    Thank you mate.
    I have read through the instructions but I'm sure I'll understand a bit better the more I read them with LightRay opened, after my visitor goes. lol

    Thank you for the heads-up about the sprites shader. I'll change that.

    Cheers mate, I'm kind of proud of this one myself.

  9. #9

    Default

    Okay I did as instructed starting with the bike #4.
    I successfully removed the bones after following steps 1 & 2.
    Created one bone. It keeps going with the next bone like bubble-gum stuck to your shoe. lol
    I managed to escape that schumozzle and deleted all but the first bone situated at 0, 0, 0.
    I then named that bone "ORIGIN".

    After assigning a part to the bone, I clicked the "Edit Vertices" button again to deselect it then hit F5 to hide that selected bike part and moved onto the next part.
    This was to ensure I had assigned the only bone "ORIGIN" to all parts, one at a time without missing any part.

    I got an error when trying to export.
    Found verts with no bone weight
    Abort export?

    Yes / No

    I opted to not abort, then selected "ORIGIN" in the orign bone selection box.
    It was set to "Bone01" by default.

    I moved all of the bike models to the "static" folder and adjusted the tik files model paths accordingly.
    The bike that I re-boned does not appear, only an empty bound box.
    I deleted it from the map and re-applied it from it's static folder / Radiant menu item.
    Still nothing but an empty box frame outline. Not black or purple as other model errors suggest.

    The remaining 4 bikes with multiple bones showed as usual in Radiant.
    I have tried it with the tik files in the "models/static" folder as well as trying it with them just in the "models" folder.
    Same results.

    What have I done wrong this time? lol

  10. #10

    Default

    Quote Originally Posted by AccadaccA View Post
    Found verts with no bone weight
    This means some vertex are not assigned to any bone
    if you export the model ignoring this error the model won't work

    you need to find those loose vertex you missed and assign them to the origin bone

Posting Permissions

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