Author Topic: Managing turrets in multiple LODs  (Read 3317 times)

0 Members and 1 Guest are viewing this topic.

Offline SeeNeYe

  • 25
Managing turrets in multiple LODs
Hi guys  :D

I've done a bomber with a turret on his top. Works fine in game... though when LOD1 appears, my turret disappeared. Obviously, for the reason that this one is a child of detail0. I wonder what could be the best method to be able to see this turret in LOD1 (and with the turret arm rotation if possible  :nod:). I was thinking of gluing the base to the detail1 but if i do this way, either the arm will not be visible at all or if present not animated (fixed position due to the fact it will be attached to the model). Any good trick to share ?  :yes:

Thanks in advance for your help.  :p
-----------------
The Thuth is a pathless land

 

Offline Angelus

  • 210
  • The Angriest Angel
Re: Managing turrets in multiple LODs
You have to link a lower poly copy of that turret to Lod1.

Your hierarchy should look like this:

Lod0
    -Turret01
       -Turret01-arm
     -other Lod0 stuff

Lod1
    -Turret01
       -Turret01-arm
    -other Lod1 stuff

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Managing turrets in multiple LODs
TBH, on a bomber, you shouldn't be able to see the turret in LOD1 anyway. Check your LOD switch distances, as they may be too small.

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Managing turrets in multiple LODs
Yeah, turrets on bombers are things you really shouldn't see at LOD1. Leaving them out is the best idea.
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 SeeNeYe

  • 25
Re: Managing turrets in multiple LODs
Wow thank you guys !

Fast replies  :D

Hmm I just forgot to specify is that my LOD0 is used for the cockpit view (only visible when inside the ship), so my LOD1 should be visible as fast as you see the ship from outside, that's why i want my turret to be visible in this detail1. I think I'll try to make one full turret hierarchy linked to the detail1. But, in LOD2 (which is sort of LOD1  :D) it will not be visible at all. Do you think it will be optimized this way ?
-----------------
The Thuth is a pathless land

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Managing turrets in multiple LODs
Uhhh.

You are misunderstanding something. LOD0 is the model that gets shown when you are close to the ship. LOD1++ are used when you are further away. The cockpit pof is a _separate_ model. Look at the wiki's ships.tbl entry for details.

See also: http://www.hard-light.net/wiki/index.php/Ships.tbl#.24Cockpit_POF_file:
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 Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Managing turrets in multiple LODs
Indeed, you don't need to do it that way. Either make LOD0 the cockpit pof file or leave it fully visible from the outside. FSO should be able to handle that.
Doing it they way you're trying to is unnessesary and, as you've just seen, can create problems.

 

Offline SeeNeYe

  • 25
Re: Managing turrets in multiple LODs
Quote
You are misunderstanding something. LOD0 is the model that gets shown when you are close to the ship. LOD1++ are used when you are further away. The cockpit pof is a _separate_ model. Look at the wiki's ships.tbl entry for details.

I completely understand what you mean, and we were doing this way at the very beginning of our pit development. But, it was some kind of buggy at that time (for example, any player ship swap and you loose the cockpit view, also you cannot see the animation details of your ship - guns firing, missile launching, etc - that are visible logically when you are inside the pit). I've asked Reprobator and it seems to us that these issues were mantis-ed but not fixed.
-----------------
The Thuth is a pathless land

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Managing turrets in multiple LODs
Well, you see, you might want to bump issues, if you think they're deserving of work. Maybe some coder will pick them up; you never know. I can, however, pretty much guarantee that you're going to see even greater weirdness with the solution you're trying to do (As a test, try shooting at those turrets).

You see, LOD0 is used by the engine as the collision mesh for any collisions; if its geometry is vastly different from the rest of the ship, gameplay will be affected.

In the end, Dragon's solution of integrating the cockpit mesh into the fighter and using that as LOD0 (with the cockpit mesh placed in a detail box) will probably work best for you.
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 SeeNeYe

  • 25
Re: Managing turrets in multiple LODs
 :) I think i've not been clear when I try to explain the way we've done the pit. The LOD0 is the whole ship hull + cockpit. That way we have no problem like collision and such things.
-----------------
The Thuth is a pathless land

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Managing turrets in multiple LODs
You should still use it like a normal LOD0.
Just set the thing up like you would any normal fighter. Even if LOD0 is very high detail, FSO should be able to handle it pretty well. Turrets on LODs in FSO are, in general, dodgy and should be used only when needed, i.e. on large capship turrets.

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Managing turrets in multiple LODs
Yep. As I said, if you hide the high-detail cockpit mesh in a detailbox, performance impact should be minimal.
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 SeeNeYe

  • 25
Re: Managing turrets in multiple LODs
Thanks, we'll try this way with a detail box when displaying the cockpit is not necessary  :)
-----------------
The Thuth is a pathless land

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Managing turrets in multiple LODs
BTW, what mod is it for?
I always liked flying with cockpits, but not many mods make use high quality ones.

 

Offline SeeNeYe

  • 25
Re: Managing turrets in multiple LODs
Quote
I always liked flying with cockpits

We love too  :D

It's for "The End Project" mod. We hope to show you some our advancement soon.
-----------------
The Thuth is a pathless land

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Managing turrets in multiple LODs
Ah this.
Good to know it's still being worked on, it's been a while since last (awesome) WIP shots.

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: Managing turrets in multiple LODs
Yeah, the End Project looked really cool.

 

Offline SeeNeYe

  • 25
Re: Managing turrets in multiple LODs
We have never stopped the dev but we're just 2 on the project (Reprobator and me) so it takes more time for everything ! Really hope to bring something to the community as soon as we could !  :D
-----------------
The Thuth is a pathless land

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Managing turrets in multiple LODs
Are you sure you don't need a 3rd member?  :)

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Managing turrets in multiple LODs
In july and august, I'm going to have plenty of free time (june will also be quite free, though I'm going to a paramillitary camp at 26th).
Most mods I'm in are either on hold, in FREDing or modelling phase (I'm mostly working on testing and textures), so despite my collection of badges, I have less to do than I expected.