Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: JGZinv on December 05, 2010, 02:45:30 pm
-
I understand LODs and the why and how of their workings... but I'm a bit befuddled
with how to determine a good LOD distance for FringeSpace.
We've a got a double issue in that we have large distances to travel, huge and small objects
generally in the same play space, and fast fighter ships in combat.
So small objects will need a different set of LOD values than large objects. But where's the cut off
point to say "this should be the visual limit for x?" Right now everything is tabled with a placeholder
value that's choking the life from my GTX275, basically LOD0 everywhere.
I've thought of BtRL, but the distances/units were modified there so it somewhat makes it useless.
I don't believe Stellar Assault has had to deal with this yet...
Default FS2 values are well & good, but don't apply much in a fast moving environment.
What mods have taken the time to optimize their LODs with a similar scale model inventory?
Thoughts?
-
I would make a mission in fred where you have a bunch of ships. Fly towards them. I f there's a really noticeable pop, then exit freespace and set the distance farther away. If you don't notice anything, then decrease the range. You might have to tweak it a bit.
-
Okay, the first thing you should do to tweak this stuff is to drop the "Model Detail" slider in the detail options to 4 dots. Otherwise the engine multiplies all LOD distance values by 1.2.
Second, I'm not sure there really is a hard-and-fast rule that can be applied here (Other than the general rule that LOD transitions should be as invisible as possible).
-
The first thing to consider is this - how do your model geometry and texture relate to each other? Given that you've modeled a fair portion of your assets, you should have a good idea of this from the get-go. I'd then establish this test: Find the FOV which is in FSO, and apply it to your 3D view in the modeling program of your choice. Create various points at reasonable distances from the model with which to determine when and where you need to apply the next LOD. When fine details can no longer be seen, it's time for the next LOD down - if the texture is good and is the same one used on the primary model, you'll never even notice the lower-detail LOD. As you very well know, the best LOD is one which is not noticed - you should not be able to tell when the lower-detail model or higher-detail model is swapped in for the other.
And of course, every model will have different LODs and distances at which those models are applied. Your best option is to go in and test every one individually... and that will be a lot of work. Otherwise, making size and detail comparisons between similar ships could cut out some additional time. In terms of speed, the best way to work with this is to test it in game, running with a similar approach as the static LOD distance test proposed above.
Last, there are multiple resolution sizes to consider. LODs on a 1024 x 768 monitor can be drawn in sooner because the resolution is lower than on a larger screen. I'm not sure what algorithm FS2 has built in to handle details in-game, but you should shoot for proper detail distances on a precieved monitor size which would be common for most users, where the assumption is also that they can run the program on full details. I personally would balance the LODs for monitors of a width between 1200 and 2000 pixels.
Note that this post was a bit late, and a few others popped up before I could complete it.
-
Okay, the first thing you should do to tweak this stuff is to drop the "Model Detail" slider in the detail options to 4 dots. Otherwise the engine multiplies all LOD distance values by 1.2.
Model detail should be at three dots for actual table distance. Four dots is table value multiplied by four, with five dots being multiplied by eight.
Use retail values as a guide for fighters. Same for cap ships, but some have larger values - Very long ships and ones with large turrets.
Normal maps are used on lod 0 and 1.
For fast fighters, how you lod could be an issue, as a fighter will go through several lods very fast.
Lod 0 full detail.
Lod 1 looks like full detail, but has dropped a lot.
Lod 2 very aggressive removal - eg only looks similar to lod 0 from a distance.
Lod 3 ummm, if you squint it sorta looks like a fighter.
A lot of people try to make lod 2 and 3 look to much like the actual fighter. It only has to look vaguely correct from a large distance.
-
Well like here's an example:
(http://files.fringespace.org/jgz/fenris.jpg)
Approximately 26 seconds to cover 2828 meters between towers diagonally.
78 bouys and 6 towers. Tower is 781x465 meters and a bouy 58m square.
Depending on where you spawn, and people within the arena space, that's a lot
of items on screen. All of it being stationary thankfully. This is using a mid range ship for the
timing test, as there are faster things in our inventory.
Caps wise, longest thing is probably the SP cruiser @ 1076m. But it's also
one of the thinner designs @ 312m; the others are shorter but 2x as wide. So you're looking
at something that is visible from a long distance due to size.
-
:doubt: The obvious solution there is to use simpler models, since you have so many of the things.
-
I understand LODs and the why and how of their workings... but I'm a bit befuddled
with how to determine a good LOD distance for FringeSpace.
We've a got a double issue in that we have large distances to travel, huge and small objects
generally in the same play space, and fast fighter ships in combat.
So small objects will need a different set of LOD values than large objects. But where's the cut off
point to say "this should be the visual limit for x?" Right now everything is tabled with a placeholder
value that's choking the life from my GTX275, basically LOD0 everywhere.
I've thought of BtRL, but the distances/units were modified there so it somewhat makes it useless.
I don't believe Stellar Assault has had to deal with this yet...
Default FS2 values are well & good, but don't apply much in a fast moving environment.
What mods have taken the time to optimize their LODs with a similar scale model inventory?
Thoughts?
Never use BtRL for such things. Ever.
While the Demo is great, has an awesome atmosphere, VA and the like, the way the ships are scaled sucks balls.
BtRL uses for whatever reason scaled ships, so a Viper Mk II, which is 8,50m long is in BtRL 17m long.
This introduces a myriad of issues, especially when it comes to capships.
-
A lot of people try to make lod 2 and 3 look to much like the actual fighter. It only has to look vaguely correct from a large distance.
thats not necessarily a bad thing, it allows you to be a little more aggressive at the close in stages of the detail distance, and you can always add a few more lods to spread out the load at higher lods.
what a lot of people do is make a set of lods, and then cut+paste the detail distances from another model and not tweak them for optimal performance. this is actually kinda difficult to do because it requires you to run the game check it in game and then exit to apply a tweak. so its really time consuming work. i kinda think the lab or pcs2 need an lod distance debugger where you can view the transitions at distance to see what they look like, then tweak the lod distances in real time, instead of having to do several tweak-test cycles.
-
And don't forget the final LOD should be something tiny, usually nothing more than 20 polys, for when the ship is literally smaller than the average pixel.
As a general rule, if it takes up a significant portion of the screen it should be LOD0. If it takes up a small portion of the screen it should be LOD1. If it takes up less than a square centimeter of screen space it should be LOD2, and if it takes up only a few pixels it should be the final LOD3, since it's not recognizable anyway.
For instance, all those additional pylons in that pic, seen from that distance, would do best at LOD2. Which, for that model, shouldn't be any more than 100 polys. The stations don't seem too deatiled at any rate, but the one farthes off from there could be bumped down a LOD at that distance. Wouldn't help much for someone inside the arena, but then most of them would be behind him then anyway and shouldn't get rendered(Stuff behind you doesn't get rendered, right? Plz say it doesn't).
-
20 polys? You have got to be kidding. More like 300-700 for LOD3 on a fighter these days.
-
OK, what details are necessary that would require 300-700 polys at that range?
That far out, I see a roughly circular center and four extrusion thingies going outward. Close up they may need more detail, but 100 or maybe 200 polys would be sufficient at that range.
and LOD3- assuming you mean the fourth and final LOD- should have next to no detail since it's for practically infinite range.
-
20 polys? You have got to be kidding. More like 300-700 for LOD3 on a fighter these days.
Heh, You did read the final part of the sentence? And don't forget the final LOD should be something tiny, usually nothing more than 20 polys, for when the ship is literally smaller than the average pixel.
If you want to limit the game to modern hardware then 300-700 on lod 3 is definitely a step in the right direction.
-
Does anybody know if 3D Max has the same perspective view as the game? Meaning, if you move such and such meters away from the object in Max it would look exactly the same if you where such and such meters away from the object in game.
If so, modelers could simply do most of their LOD work in 3D Max. 3D Max has a group modifier floating around in there that switches LOD levels as you get further away from it.
However, it does it's LOD's based on how much the bounding box takes up the screen, not on distance. So if this where to be used, you'd have to use a camera object and move it to the distances needed.