LODs

LODs

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
Axel
Posts: 14
Joined: 11 Jun 2006, 23:29

LODs

Post by Axel »

Hello, new to spring moding and I have a question. Does the spring engine support Level of Detail Meshes for the models??
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Yes, in theory, Trepan wrote support for it awhile ago. Nobody's using it yet, however.

Please study how the S3O model works before asking further questions. Get a copy of UpSpring, and read our documentation in the Wiki. Spring's animation system isn't like most game engines (which is both good and bad).
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

mostly bad ;)
User avatar
MR.D
Posts: 1527
Joined: 06 Aug 2005, 13:15

Post by MR.D »

In bf1942, Lods could be a real pain in the ass.

The structure for Lods in that game were as follows

Each object that was seperate from the main object, such as turrets, or anything that would move/animate/or need scripted aid to function had to be its own model object + each model object contained the LOD steps within.

Each model object also required a collision mesh + shadow mesh.

An example for a tank would be.

1. Main chase = lod00 - lod01 - lod02 - lod-03 - lod04 - col01 - shad01
2. Turret = lod00 - lod01 - lod02 - lod-03 - lod04 - col01 - shad01
3. Gun barrel = lod00 - lod01 - lod02 - lod-03 - lod04 - col01 - shad01
4. Wheel (could be cloned, but vehicles could only use 4 driving physics wheels due to networked objects limit) lod00 - lod01 - lod02 - lod-03 - lod04 - col01 - shad01
5. Dummy Tracks lod00 - lod01 - lod02 - lod-03 - lod04 - col01 - shad01

As you can see, this was a pretty massive process, mostly what would happen is you make the highest detail LOD model as a complete unit, and then 3-4 Optomised by 1/2 for each stepdown in triangles.

You would then break off each part, such as turrets/ or main, and group them together and export them into 1 single file. reset the origins of each object to match the rest in the LOD.

Then you go and make your script, and there you had a big mess of work to complete an otherwise fairly simple task.

I'm going to assume that in Spring, the best avenue is to make each LOD its own complete unit model, and just seperate the LODS by naming each fully completed model as ex. Team1Tank01, Team1Tank02, Team1Tank03. and so on.

The real question, and I'm sure this could be the hardest part of using that method in spring..

Can these models all share a common script, to avoid needing to clone an entire script and modify each one independently?

Can sombody shed the details of how it will actually work in spring?
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

Post by SpikedHelmet »

The easiest way for it to work, in my mind, would be for lod s3o's to be auto-loaded in a similar manner as .bmp textures are/were (ie, you'd have your "ARMHOVRTANK" as your highest detail s3o, and then "ARMHOVRTANK001", "ARMHOVRTANK002", etc

Or edit objectname so that rather than directly pointing to a model, it points to a file where all models w/ their LOD are listed (similar to armor.txt).

Actually I'd prefer the latter. As for scripts it should use the same script or a default blank script (with no animations), or you can choose; it'd be nice to have LOD scripts optional, as S44 has some fairly script-heavy infantry and it'd be nice for them to 'go away' at long range.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Problem with scripts is that they're synced, you can't have synced code depend on the camera distance.
Post Reply

Return to “Game Development”