Author Topic: Turret bounding box  (Read 4140 times)

0 Members and 1 Guest are viewing this topic.

Offline Enioch

  • 210
  • Alternative History Word Writer
Hello, people!

I've run into a snag while trying to test-export our first Renegade Legion ship to FSO. The problem is this:

In the RL universe, ships use 'broadsides' of laser guns, synchronized to fire together, like old ships-of-the-line. The obvious solution to that problem is to create a turret model that spans the length of the ship with firing points  at regular intervals and 'salvo mode' enabled.

Thus far, all's good. The turret works perfectly.  :)

However.  :(

The length of the turret is a problem, in that the FSO (or PCS2, I dunno what to blame) creates cubic 'bounding boxes' for turrets based on the submodel radius -the distance from the center of the model to the furthest vertex. Which means that, since my turret is pretty long, it gets a bounding box about 400 meters on every side. Which, of course, extends to the other side of the model.

So, I get a situation where a fighter fires at the starboard laser guns of a capital ship and also damages the port guns, since their bounding box extends to the starboard side...

This, of course, is highly unrealistic, as you can probably figure out for yourselves. If I'm firing at you from the right, I should damage only your guns on the right, not blow holes into your left side...

My question is this:

Is there any way to manually adjust the dimensions of a bounding box, or force the engine to register hits on a turret only when the turret model itself is hit?

Thanks!
'Violence is the last refuge of the incompetent'  -Salvor Hardin, "Foundation"

So don't take a hammer to your computer. ;-)

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
fix up your model. that shouldnt happen unless you have very glaring mesh problems and/or stray vertices/polys in the mesh.
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline Enioch

  • 210
  • Alternative History Word Writer
How does the integrity of the mesh come into it? I can't guarantee that there aren't any problems, of course, and I'll definitely look into it, but I don't get it.

Is it possible that you misunderstood? My shots aren't 'flying through' the ship. There are no collision errors. But when my shots hit the hull of the warship that lies within the limits of the turret bounding box, damage gets carried to the turret.

'Violence is the last refuge of the incompetent'  -Salvor Hardin, "Foundation"

So don't take a hammer to your computer. ;-)

 

Offline Sushi

  • Art Critic
  • 211
Isn't there a flag or something that forces FS to look for submodel collisions before doing damage, instead of just using the distance between the impact point and the submodel center?

 

Offline Enioch

  • 210
  • Alternative History Word Writer
Is there? I looked in the wiki, and couldn't find it.
'Violence is the last refuge of the incompetent'  -Salvor Hardin, "Foundation"

So don't take a hammer to your computer. ;-)

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Do you have the pivot of the turret set to it's center? If so you should not be getting a bounding box that wide.
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
No, I'm pretty sure PCS2 calculates the bounding box based on the actual dimensions of the subobject, otherwise everything we have would have perfectly square bboxes (take a look at a few models - they don't).  Make sure the object center is where you want it to be, and that there isn't any extraneous geometry floating around anywhere.

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
I don't think its the bounding box, but rather the radius.
FSO applies damage to subsystems based on radius by defualt, IIRC.
(´・ω・`)
=============================================================

  

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
No radius is used for special point subsystems.  Subobject based subsystem use the actual mesh for detection if done right. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 
I've had problems with the bounding boxes before with the Carrack. Not the same problems, mind you. I wanted to have the turret model really big so that when it blew up it took a chunk out of the ship, but the interpreted turret would actually be really small. Visually it was convincing, but the target's bounding box betrayed the real size of the turret mesh.

As far as I could tell, there is no way to manually alter the size of a bounding box. In your case, however, the mesh might have some stray vertices lying about.

 

Offline Aardwolf

  • 211
  • Posts: 16,384
I've had problems with the bounding boxes before with the Carrack. Not the same problems, mind you. I wanted to have the turret model really big so that when it blew up it took a chunk out of the ship, but the interpreted turret would actually be really small. Visually it was convincing, but the target's bounding box betrayed the real size of the turret mesh.

I reckon you could do some very clever POF-ing to make that work... at worst, you would end up using Lua-scripting to destroy the larger hull section whenever the turret went down.

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
How does the integrity of the mesh come into it? I can't guarantee that there aren't any problems, of course, and I'll definitely look into it, but I don't get it.

Is it possible that you misunderstood? My shots aren't 'flying through' the ship. There are no collision errors. But when my shots hit the hull of the warship that lies within the limits of the turret bounding box, damage gets carried to the turret.
*snipped picture*
as i've said, check your mesh thoroughly. bounding boxes are determined on the maximum distance of points, edges and polygons from the objects center. either your object center is out of whack or you have extraneous poly's/points/edges somewhere.


provide the pof and an .obj of the offending file so that we can check.
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline Enioch

  • 210
  • Alternative History Word Writer
Be my guest!  :)

Clicky

The POF is still WIP, so many turrets do not have subobject info yet. What you wanna check are the 'chains' of hexagons in the sides of the ship.

I could provide a .tbl entry as well, if you think you need it.
'Violence is the last refuge of the incompetent'  -Salvor Hardin, "Foundation"

So don't take a hammer to your computer. ;-)

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
oh.. dear.. god...


dude, no offense, but forget the way you did turrets till now, and just observe retail pofs.



IIRC, max firepoints per turret is 3, otherwise engine doesnt give a flying one.




for sanity's sake, do you have the latest mediavp's? if you do, open the GTD Orion and observe how all of its turrets are composed and then apply said stuff to your model while pofing.



the geometry doesnt have anything that should **** up the bounding boxes, so my guess is that the turrets get damaged a lot is because the firing points expand the bounding box.


also, it crashed PCS2 for me when viewing one turret, but no biggie there.


add me on msn if you have it, i can guide you thru the process of turreting
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
IIRC, max firepoints per turret is 3, otherwise engine doesnt give a flying one.

Wrong. Max number of firingpoints is 10.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
IIRC, max firepoints per turret is 3, otherwise engine doesnt give a flying one.

Wrong. Max number of firingpoints is 10.
thats something i didnt know.



amusing :D

*thinks about a 10 FP 2-part beam turret...*


*my brain asplode*
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline Enioch

  • 210
  • Alternative History Word Writer
Yep. Max number is 10. That much I checked before even working on the mesh.

@pecenipek: No offense taken. But I do know something about turreting.  :p

And I know which turret you mean (the one that crashed PCS2). It does that for me too. Its mesh has flipped normals. I fixed the issue in the original mesh and next export will be OK.

But that still doesn't solve my issue. If it's the firing points that expand the bounding box, then they shouldn't, because I did everything by the book.

Is the issue solvable, or will I have to live with it? Because I can live with it. I just don't want to.

'Violence is the last refuge of the incompetent'  -Salvor Hardin, "Foundation"

So don't take a hammer to your computer. ;-)

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Something is wrong with the bounding boxes of those turrets according to PCS2. In fact almost every bounding box including detail0. They all seem shifted to starboard. o_O

I'd say it's the result of a bad conversion - what format was it converted from or which program?

Edit: Correction - some bounding boxes for objects that are NOT on the ships centreline are shifted either too far (always along the X axis) towards or away from the centreline. Quite odd.
« Last Edit: August 19, 2010, 08:35:15 am by Vasudan Admiral »
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline Enioch

  • 210
  • Alternative History Word Writer
Huh. You know, I never noticed.

Bad conversion is possible, but unlikely. Conversion was from Blender to PCS2 via .dae format.

I even followed the instructions!
'Violence is the last refuge of the incompetent'  -Salvor Hardin, "Foundation"

So don't take a hammer to your computer. ;-)

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
oh yes its very very possible. even when following instructions :p
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.