Jump to content
The Dark Mod Forums

Bounding Boxes


sparhawk

Recommended Posts

When you select an entity in the editor you can see a box around it which seems to be the bounding box. For the items like the coins and books I just copied over the definition from the backback and now the bouding box is way to big. Especially with the coins this is glaring. Another problem is with the frobhighlight. The trace seems to test against this box and this means that you can frob the item by looking something else because the box is to large.

 

In the def file for the entities there are these lines which contains this box:

	"editor_mins" 	 "-5 -5 -5"
"editor_maxs" 	 "5 5 5"
"size"    "5 5 5"

 

I'm not toally sure what mins and max exaclty means or if it is the size that determines that box (I had not the impression that this is the case). So can somebody fix these boxes? New Horizon? Can you do this? We will need to do this for all items. To determine the correct size and define it in the def files.

 

I hope there is an easier waz, because you can't change this in the editor. You must edit these settings with a texteditor and then restart the d3 editor for the changes to take effect. Maybe somebody knows a faster way to do this.

Gerhard

Link to comment
Share on other sites

Just playing around with the bounding boxes in the .def files. It definately helps to decrease them here, but for some reason the boxes are not in the center of the object. They are somewhat offset to the left hand side of each object. Same with the doors. If I open a door, I can line up with the edge on one side and frob it from a fair distance away, if I go to the other edge of the door I have to be very close to it before if frobs. I'll try to post a screen shot.

 

Not sure how we can line up the bounding boxes...unless it's one of the settings that we're playing with that determines that.

Link to comment
Share on other sites

Just playing around with the bounding boxes in the .def files.  It definately helps to decrease them here, but for some reason the boxes are not in the center of the object.

 

This is a problem of the object then. Can make a screenshot or a list where we can see which objects need to be redefined? The center must be set in Blender (or whatever is used for modelling) and exported.

 

They are somewhat offset to the left hand side of each object.  Same with the doors.  If I open a door, I can line up with the edge on one side and frob it from a fair distance away, if I go to the other edge of the door I have to be very close to it before if frobs.  I'll try to post a screen shot.

 

Wasn't this the problem I posted in the Bug Reports? This is due to the distance calculation because it uses the center of the object. I guess I should use the bounding box to determine the distance. Or the center of the bounding box. We definitely have to tweak this.

Gerhard

Link to comment
Share on other sites

Been working on this for awhile now. I'm not sure if this can be fixed through the .def files completely. I'm going to drop Sledge a line to see if he has any info on how to get the frob centered.

We must fix the centers of the objects. Unfortunately this is a bnit of a problem because the center also defines the rotation axis. A door with the center in the geometric middle would frob fine from all angles but it would most likley rotate around the center like the superman doors.

What we should do instead is to calculate the centerpoint of the bounding box and use this for distance calculation.

Gerhard

Link to comment
Share on other sites

We must fix the centers of the objects. Unfortunately this is a bnit of a problem because the center also defines the rotation axis. A door with the center in the geometric middle would frob fine from all angles but it would most likley rotate around the center like the superman doors.

What we should do instead is to calculate the centerpoint of the bounding box and use this for distance calculation.

I totally get what you're saying, but I have no idea how to do it. :)

Link to comment
Share on other sites

I totally get what you're saying, but I have no idea how to do it. :)

The bounding box itself has to be done in the editor. To improve this task I asked how to do this on D3world and got this answer http://www.doom3world.org/phpbb2/viewtopic...afab36c0ea91cf1 which should help quite a lot.

 

The center must be done by the modelers and the calculation for the frob must be done inside the SDK code.

Gerhard

Link to comment
Share on other sites

Not sure if this will help us, but I asked Sledge about his problem. Just wanted to see how they did it in T3.

 

Yeah, frob can be a little tricky.  You should find out how exactly it works.  Does the frob check run a raycast to the object's center point, to a pivot point, or to a bounding box that surrounds the object?

 

If you can hilight objects off center, it might be checking against a strange point on the object.  In Unreal, there is a "pivot point" which is a random or chosen vertex on an object model that is used to determine the object's location in the game.  So the game stores the XYZ coordinates of the pivot, not necessarily the center point.  I have no idea if Doom uses a similar system, but it's possible.  If Doom uses a center point instead of a pivot point, maybe the object was constructed off center in the 3D program in which it was created?

 

I believe on Thief we used the pivot point location on a mesh to determine it's frob-ability.

Link to comment
Share on other sites

Not sure if this will help us, but I asked Sledge about his problem. Just wanted to see how they did it in T3.

In D3 I'm pretty sure that the boounding box, you can see in the editor, is used for that. I noticed this with the coins. I tried to change the box and it was in such a way that it was off center. Very high above the coinstakc, but the bottom end of it was almost exactly at the bottom of the stack. When I tried this ingame I noticed that I couldn't frob the stack on the bottom end but I had a large area at the upper end. So I guess that D3 is using this bounding box unless you are using a collision model.

Gerhard

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...