AI Distance at which it dissappears?

Post and discuss what YOU are working on. This is the place to preview and/or discuss your modern day military AI projects.
Post Reply
ptds.lane
Second Lieutenant
Second Lieutenant
Posts: 10
Joined: 17 May 2010, 16:38
Version: FS9

AI Distance at which it dissappears?

Post by ptds.lane »

I am having a go at some AI aircraft, and one thing I have come up against is that the aircraft turn white (Loose Textures) at a certain distance away from your view. I did think this was a 'MIP'S' thing or even LOD problems. On closer investigation of other AI it would appear that the actual model dissappears at a certain point and you are just left with the red text if switched on in FSX.
My question is how do you determine and make the plane dissappear at a given distance? I am using FSDS, but can find no setting in the software. I am sure it will be just a number somewhere in a .cfg file.

Any help will be most useful.

Regards

Pete
User avatar
Firebird
MAIW Admin
MAIW Admin
Posts: 12399
Joined: 11 Aug 2006, 21:04
Version: FS9
Location: EGLL

Re: AI Distance at which it dissappears?

Post by Firebird »

Welcome, Pete.

A very reasonable question. The answer, I believe, is greater than you can see it. I don't know the exact distance but to prove this point try loading up, say an F-15 base with 60 Coral F-15 models and even at 10 miles away from the target if you are looking in the direction of the base you will notice a massive hit on framerates, even though you can't see the individual aircraft. If you loaded up the same base with 60 NBAI F-15s there will still be a framerate hit but no where as much. Such is the importance of LODs for AI aircraft.

I don't know the exact distance but I would think that 10 miles is probably the limit. I can only talk about FS9 here but if the text appears at 10 miles in FSX my guess is that the limit is probably the same.

On whether you can make it disappear at a distance smaller than 10 miles the answer is probably yes. Fishlips, on this forum has done some work with his Australian base sceneries so that some items will only appear at a shorter distance. I don't exactly know now he sets his compiles to make this happen or whether you can do this with aircraft but it is possible.
The other thing I don't know is if you can do this in both Gmax and/or FSDS.

Hopefully a knowledgeable person will wander past this thread and reply.
Steve
_______________________________________________________
Image
Quid Si Coelum Ruat
_______________________________________________________
ptds.lane
Second Lieutenant
Second Lieutenant
Posts: 10
Joined: 17 May 2010, 16:38
Version: FS9

Re: AI Distance at which it dissappears?

Post by ptds.lane »

Steve,

Thanks for the prompt reply.

My AI's are turning white much sooner than 10 miles, and the AI I am comparing them to are Capt Sim's AI from the weapons package. I am thinking more and more perhaps it could be a LOD thing. I was reading somewhere just now that you can make your 3rd LOD model a 'blank'. Could this be the answer?

I will hold out a bit more to see if anybody who is an expert in these things can tell me how to do it.

Thanks again.

Pete
MIKE JG
MAIW Veteran
MAIW Veteran
Posts: 10976
Joined: 12 Aug 2006, 02:25
Version: MSFS

Re: AI Distance at which it dissappears?

Post by MIKE JG »

I have read that FSX handles AI models a bit differently than FS9. One of those differences is the distance at which the model is no longer textured. What LOD distance that is, 50 pixels, 30 pixels, I'm not sure but it does seem to happen sooner in FSX than in FS9.

From a modeling standpoint, there is nothing you can do about this as this is a function of the AI engine in game.

Here is a little trick you can try to see what distance (in pixel size) the model retains its textures:

Using per part LODs, take your model and create a cube just above your model, you want to put it as close to your model as you can so that this extra part does not affect your model's pixel size as your view gets farther and farther away.

Name that part something like "Box_LOD_400" and then texture it a very bright, noticeable color from your texture sheet, something neon pink or green or similar.

Then copy that part and paste copies of it. Here's the neat part, by changing the name of the part to "Box_LOD_100" or "Box_LOD_050", etc., you can control the distance at which the part still appears using the LOD system.

So what you could do would be to make a part for ever decreasing LOD sizes and then watch the model fly off, noting at what point the box part is no longer textured.

I supposed to do this right you would need to make each different LOD box a different color so that you could quickly determine which LOD was being displayed at that time.

I for one would be curious to see at what distance FSX drops the model's texture.
-Mike G.

Recovering flight sim addict, constant lurker.

Check out my real life RV-8 build here: RV-8 Builder Log
ptds.lane
Second Lieutenant
Second Lieutenant
Posts: 10
Joined: 17 May 2010, 16:38
Version: FS9

Re: AI Distance at which it dissappears?

Post by ptds.lane »

Mike,

Thanks for the suggestion. I have to admit that at this point in time I have made no LOD models, as I have done before and it made no change to the display.
However I will give it a try - I have no idea how the LOD's wrk in terms of switching, but I guess this will be a earning curve for both.

I will report back with some results.

Pete
MIKE JG
MAIW Veteran
MAIW Veteran
Posts: 10976
Joined: 12 Aug 2006, 02:25
Version: MSFS

Re: AI Distance at which it dissappears?

Post by MIKE JG »

With FSDS (and Gmax as well) you can either make your whole model a level of detail model or you can make individual parts of your model level of detail parts.

The level of detail is simply based on the width of your model or part in pixels as measured across the screen. The highest level of detail that FS9 allows will be displayed when the whole model or part is equal to or exceeds 400 pixels, in other words when you are looking at it fairly close up.

As your view zooms out, the model or part appears smaller and smaller on the screen relative to your screen width display settings. If you are using an AI model that has been compiled using multiple level of detail models, as soon as the model drops to less than 400 pixels in width, the sim knows to then display the next lower level of detail model or part.

That next lower level of detail model or part is the next LOD model or part that you have designed. Once we have made the main model, we then can choose the next level of detail model and at what pixel width it gets triggered. We simply designate how many pixels we want it to display at by using the pixel number in the part name or model name. MakeMdl and FS9/X do the rest of the work for us.

The beauty of using per part LODs is that you can just use the main model that you have and it will display the whole time no matter how far away your view gets. But by naming that individual part as described above, the part will morph the next level of detail on it's own, independent of your main model.
-Mike G.

Recovering flight sim addict, constant lurker.

Check out my real life RV-8 build here: RV-8 Builder Log
ptds.lane
Second Lieutenant
Second Lieutenant
Posts: 10
Joined: 17 May 2010, 16:38
Version: FS9

Re: AI Distance at which it dissappears?

Post by ptds.lane »

Mike,

Can you clarify the 'Per Part LOD'. I thought that the whole model was included in the 400 pixels, or have I missunderstood it?

Now I understand why you call the LOD's 400, 200 etc. I dont think I have seen that explained anywhere as meaning pixels, so thanks for explaining that.

Regards
MIKE JG
MAIW Veteran
MAIW Veteran
Posts: 10976
Joined: 12 Aug 2006, 02:25
Version: MSFS

Re: AI Distance at which it dissappears?

Post by MIKE JG »

Sure, each individual part can be made to use multiple levels of detail simply by including "_LOD_300" etc as a suffix on the part name.

For example if I have a part named "antenna", if I rename this part "antenna_LOD_400" instead, this antenna will only show up on the model when the antenna is at that view distance or less. An antenna is probably not a good example but I hope you get my point.

Per part LOD's actually are better used for scenery objects in FSDS since those tend to be large sized objects. For example, hangar doors are a good use of this method. If I make a hangar model, I can make the doors multi LOD by using this naming method. The first set of doors I'll call "doors_LOD_400" and these will be the most detailed, they will be 3 dimensional and have staggering like you might see on a real hangar. To do this I can either make each individual door and then join them all together at the end into one object, or I can make them one single object from the outset or I can even name each individual door separately, something like "door.1_LOD_400", "door.2_LOD_400", etc.

So there's multiple ways to do it. Then when I want the door to use less detail=less polygons, I simply make a flat polygon that is textured to look like a set of three dimensional doors from a distance. I name this part "doors_LOD_100" or something similar meaning that this second part will show up once the part is 100 pixels wide or less. At that distance you wouldn't be able to make out the three dimensional shape of the original doors in the first place so you might as well save some polygons and make a second, less detailed part.

Hope that makes sense.

Scenery really isn't the big fps killer. Scenery models generally don't use a whole lot of polygons because of their more standard (less curves) shapes.

But my point is that you can still use per part LODs on an aircraft model as well if you want.
-Mike G.

Recovering flight sim addict, constant lurker.

Check out my real life RV-8 build here: RV-8 Builder Log
ptds.lane
Second Lieutenant
Second Lieutenant
Posts: 10
Joined: 17 May 2010, 16:38
Version: FS9

Re: AI Distance at which it dissappears?

Post by ptds.lane »

Mike,

Thanks for the explanation, again I did not know that you can use it on a part basis as well.

I have just made an LOD model of my AI object (missile in this case) and did it by what it says in the FSDS help file. That is have the main model as the full complete item (LOD_400), then make another duplicate model LOD_200 that has some of the detail parts removed, and then keep going down to LOD_25 that has just 2 parts - a very simple tube for the body and a flat wing section.

The final result was I got the very basic model close up!

Not sure if I have done something wrong, but that was making the whole model reduce in detail rather than the parts like you describe.

Now I'm confused!


Pete
MIKE JG
MAIW Veteran
MAIW Veteran
Posts: 10976
Joined: 12 Aug 2006, 02:25
Version: MSFS

Re: AI Distance at which it dissappears?

Post by MIKE JG »

You can always send me your .fsc FSDS project file via personal message through the forums here. I can usually see what's going on pretty quickly.

My guess is that the problem is in the compilation of the model with MakeMdl not necessarily something you are doing.

To be honest the FSDS autocompiler is not the best thing to use to compile your models. You don't have a lot of control over the process using it. There is an easier way to compile a model by doing it manually.
-Mike G.

Recovering flight sim addict, constant lurker.

Check out my real life RV-8 build here: RV-8 Builder Log
ptds.lane
Second Lieutenant
Second Lieutenant
Posts: 10
Joined: 17 May 2010, 16:38
Version: FS9

Re: AI Distance at which it dissappears?

Post by ptds.lane »

Mike,

Unfortunatly I have deleted it as part of my weekly clean up. I will be trying again though and if the offer still stands and it does not work out, I can send it to you.

Going back to your previous post, do you make the LOD parts as part of the main model or do you still create seperate models with the LOD parts?

I have never bothered with LOD's before and on the one previous time I had a go they did not work. This has only come about now due to my planes going white. Back to that subject again briefly, they loose texture at about 1.6 Miles. If however you zoom in just one press of the '+' key, the textures return, hence why I had a further go with the LOD's. I did think it was my graphics card but it is the same on a friends set up.

Thanks again.

Pete
ptds.lane
Second Lieutenant
Second Lieutenant
Posts: 10
Joined: 17 May 2010, 16:38
Version: FS9

Re: AI Distance at which it dissappears?

Post by ptds.lane »

Mike,

Sorry I have not got back sooner, been working on other things.

I had a go at the tutorial in FSDS help file on LOD's. Still can not get the object to change when moving away from it. I am using Mkmdl and compiling to FSX, can I use this?

What was the other method of compiling you refer to?

Thanks in advance for any help.
Regards

Pete
MIKE JG
MAIW Veteran
MAIW Veteran
Posts: 10976
Joined: 12 Aug 2006, 02:25
Version: MSFS

Re: AI Distance at which it dissappears?

Post by MIKE JG »

Don't you need to use a different compiler for FSX??
-Mike G.

Recovering flight sim addict, constant lurker.

Check out my real life RV-8 build here: RV-8 Builder Log
ptds.lane
Second Lieutenant
Second Lieutenant
Posts: 10
Joined: 17 May 2010, 16:38
Version: FS9

Re: AI Distance at which it dissappears?

Post by ptds.lane »

Hi Mike,

Thanks for the reply, I am now thinking that this might be the case as well. I should change across to Xtmol but have been using Mkmdl for years and making scenery and planes without issues. It is only now that I am trying to make things correctly and frame rate friendly that I am starting to hit problems.
I think I will have another go but compile to FS2004 to prove the method works & if so start using the Xtmol compiler.

I dont suppose anybody knows if it is easy to switch across or not without reinstalling FSDS?

Pete
MIKE JG
MAIW Veteran
MAIW Veteran
Posts: 10976
Joined: 12 Aug 2006, 02:25
Version: MSFS

Re: AI Distance at which it dissappears?

Post by MIKE JG »

I think you just have to have XtoMdl installed and then point FSDS to it in the FSDS preferences section.
-Mike G.

Recovering flight sim addict, constant lurker.

Check out my real life RV-8 build here: RV-8 Builder Log
ptds.lane
Second Lieutenant
Second Lieutenant
Posts: 10
Joined: 17 May 2010, 16:38
Version: FS9

Re: AI Distance at which it dissappears?

Post by ptds.lane »

Mike,

Thanks for the reply. I will try it.

For scenery, that I was using as an example though just uses BGLcomp, so would Xtomdl make any difference to this?

Pete
MIKE JG
MAIW Veteran
MAIW Veteran
Posts: 10976
Joined: 12 Aug 2006, 02:25
Version: MSFS

Re: AI Distance at which it dissappears?

Post by MIKE JG »

I honestly do not know anything about compiling models or objects for FSX, sorry.
-Mike G.

Recovering flight sim addict, constant lurker.

Check out my real life RV-8 build here: RV-8 Builder Log
ptds.lane
Second Lieutenant
Second Lieutenant
Posts: 10
Joined: 17 May 2010, 16:38
Version: FS9

Re: AI Distance at which it dissappears?

Post by ptds.lane »

Mike,

Just to let you know I have now got things sorted. I have to make the parts as you suggested (Parts/per) in the same model, and not as a seperate model like the FSDS tutorial shows (have a main model, and then create another model and assign it as a LOD model). For info it does also work using the MakeMDL compiler as well.

Many thanks again for the help.

Regards

Pete (UK)
Post Reply