Sign in to follow this  
Guest

LOD FOR SCENERY? HOW?

Recommended Posts

Hello guys,How can I make different LOD for scenery objects? For example I have a 10,000 polygon model, I want to change it to 5,000 when looking from a further distance and 2,000 when looking even further. The mipmaps helps a little as it uses less detailed textures from a distance but how does the LOD work? Do I create different models, like removing some parts and saving as a new name? Thanks all,Leandro

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Leandro,I am not sure what you are using to create your models. But, the final BGL contains all LOD versions of the model in the same file. At the source code level, the model that should be displayed is processed using "jump" statements.Here is some sample BGLC code (with the actual vertice and triangle definitions removed).- The first IFIN1 statement determines when the model will be displayed at all.- The IFIN3 statement determines whether the high-poly (complex) or low poly version will be displayed (by jumping to the appropriate label).SCASM works the same way I believe.I am not really sure what you are looking for, but I thought I would throw this out anyway. If interested, you can find more information in the FS2002 Scenery SDK.;--------------------------------------------------------------; OBJECT #23;-------------------------------------------------------------- NEAR_FAR_HUGE_OBJECT_HEADER 3629986, -1158352968, Obj_23_End IFIN1 Label_Obj_23_32, image_complex, 2, 32767 ADDOBJ Label_Obj_23_38 SHADOW_CALL Label_Obj_23_38Label_Obj_23_32: BGL_JUMP_32 Obj_23_EndLabel_Obj_23_38: SCALE_AGL Label_Obj_23_80, 10000, 80, 65536, 3629986, 0, -1158352968, 0, 0, 0 INSTANCE_CALL Label_Obj_23_82, 00000h, 00000h, 03544hLabel_Obj_23_80: BGL_RETURNLabel_Obj_23_82: BGL_CALL Label_Obj_23_94 BGL_JUMP_32 Label_Obj_23_174 BGL_RETURNLabel_Obj_23_94:Label_Obj_23_172: BGL_RETURNLabel_Obj_23_174: BGL_BEGIN 2048 TEXTURE_LIST_BEGIN .....Texture definitions go here TEXTURE_LIST_END MATERIAL_LIST_BEGIN MATERIAL_DEF 1.000000, 1.000000, 1.000000, 1.000000, 0.392157, 0.392157, 0.392157, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 MATERIAL_LIST_END IFIN3 Label_Obj_23_SIMPLE, xv, -1024, 1024, yv, 0, 1024, zv, -1024, 1024 Label_Obj_23_COMPLEX: VERTEX_LIST_BEGIN ......VERTEX defintions go here for complex model VERTEX_LIST_END BGL_TRANSFORM_MAT 0.000000, 0.000000, 0.000000, 0.000977, 0.000000, 0.000000, 0.000000, 0.000977, 0.000000, 0.000000, 0.000000, 0.000977 MATERIAL 0, 0 DRAW_TRI_BEGIN 0, 1200 ......TRIANGLE defintions go here for complex model DRAW_TRI_END BGL_JUMP_32 Obj_23_ObjectEnd Label_Obj_23_SIMPLE: VERTEX_LIST_BEGIN .......VERTEX definitions go here for low-poly version VERTEX_LIST_END BGL_TRANSFORM_MAT 0.000000, 0.000000, 0.000000, 0.000977, 0.000000, 0.000000, 0.000000, 0.000977, 0.000000, 0.000000, 0.000000, 0.000977 MATERIAL 0, 0 DRAW_TRI_BEGIN 0, 112 .......TRIANGLE definitions go here for low-poly version DRAW_TRI_END Obj_23_ObjectEnd: BGL_TRANSFORM_END BGL_END BGL_RETURNObj_23_End:EOLCheers,Allen

Share this post


Link to post
Share on other sites

I'm using gMax. Isn't there a way to select something during export? There's a LOD tab there. I don't know how to work it though.

Share this post


Link to post
Share on other sites

Hi!This is how I have done it in gMax and I think that's also the way Microsoft describes in MakeMDL_sdk (makeMDL.doc).First I do the more complex parts, group them and name it bladibla_LOD_100. Then I clone that one and make it simple, or design totally new simple part that shows far away. Then I group the simple part(s) and name it bladibla_LOD_99. That's all. The name (bladibla ;-) ) has to be the same, only the number in the end changes, from 0-100. LOD_100 shows near and LOD_99 far away, you can of course tune it with the number as you wish. Have LOD_80 if you want the complex part show earlier etc. read the sdk! I think it works well. There is nothing necessary to do in makeMDL!Greetings,Tatu

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this