Shadows and Custom GPs

#1
I can't seem to get a Custom GP of any texture to show a shadow in P3Dv2.1. Aprons, taxiways, runways, etc., do just fine. But it is impossible to cast a shadow on a Custom Ground Poly it seems.

??
 

gadgets

Resource contributor
#2
But it is impossible to cast a shadow on a Custom Ground Poly it seems.
That appears to be correct.

There's no ability for ADE or ADE_GP to control shadows. Sounds like something you should complain about to LM. (This is only one of many legacy items they seem to have eliminated without replacement.)

Don
 
#3
That appears to be correct.

There's no ability for ADE or ADE_GP to control shadows. Sounds like something you should complain about to LM. (This is only one of many legacy items they seem to have eliminated without replacement.)

Don
I posted a gripe to LM. I wish I knew more about this stuff. I wonder if an apron with the same texture would work. Is there any way to put custom textures in aprons in ADE?
 

gadgets

Resource contributor
#4
Is there any way to put custom textures in aprons in ADE?
Unfortunately, no. (That's what ground polys are for.) Aprons use a set of standard textures which apply to all airports, not just yours. Replacement textures are available, but you are still limited to that set.

Don
 
#5
I don't know how ADE-GP manages ground polys, as I use MCX's ground poly wizard, but it was reported with P3D 2.0 that some layers no longer showed shadows. Increasing the layer numbers sorted this out for me. I was hoping for a fix with 2.1, but it looks like nothing has changed.

However starting with layer 16 rather than 8 brings my shadows back completely. If ADE-GP works in a similar way, you should get the same result.
 

gadgets

Resource contributor
#6
I don't know how ADE-GP manages ground polys, as I use MCX's ground poly wizard
They both generate FS8-style ground polys.

However starting with layer 16 rather than 8 brings my shadows back completely. If ADE-GP works in a similar way, you should get the same result.
That's good news. Seems like an unnecessary complication. But, if it works ...

Don
 

gadgets

Resource contributor
#8
Jon, given this good news, is there any way to globally change layer numbers in ADE. If not, at least as a temporary measure, I can add an "increment" function to the ADE_GP compiler that would offset layer number stored by ADE by a user entered amount.

Don

EDIT: Jon, I've already got the layer offset function working for my own use. If you want it included in 1.0.08, please let me know (and do not release the version I sent you earlier today.)

Don
 
Last edited:
#9
I have another question related to shadows. Some of my AI aircraft cast shadows and some do not. Here's my elementary FS question.

Are shadows determined by the model or the texture (or some combination of both)?
 

gadgets

Resource contributor
#10
By the model - assuming you have aircraft shadows enabled. You can easily check whether the aircraft .mdl has a shadow by opening its .mdl file (preferably with a hex editor, but Notepad will do - though it may take a few seconds) and look for the string "SHAD" (FS9) or "SHAM" (FSX). That's the shadow. If it's not there (or that section is very short), then there will be no shadow. (Details on .mdl file formats can be found in the Wiki.)

The only way to get the shadow back is to recompile the model. You'll have to contact the aircraft designer to make that happen. Easier to use another AI aircraft.

Don
 
#11
By the model - assuming you have aircraft shadows enabled. You can easily check whether the aircraft .mdl has a shadow by opening its .mdl file (preferably with a hex editor, but Notepad will do - though it may take a few seconds) and look for the string "SHAD" (FS9) or "SHAM" (FSX). That's the shadow. If it's not there (or that section is very short), then there will be no shadow. (Details on .mdl file formats can be found in the Wiki.)

The only way to get the shadow back is to recompile the model. You'll have to contact the aircraft designer to make that happen. Easier to use another AI aircraft.

Don
OK. There are some aircraft that show shadows when I fly them in the sim, yet they lose their shadow when I use them as AI. I assume the same model us used for either. What's changes when they are used as AI?
 

gadgets

Resource contributor
#12
Since you haven't indicated what version of the sim you are using, I cannot be more specific than:
assuming you have aircraft shadows enabled
other than to note that I don't recall AI shadows being suppressed in FS9 or FSX.

In any case, if the model has a shadow as a user aircraft, then the .mdl file clearly contains a shadow. If the shadow is suppressed when used as an AI, then it's the sim that suppressing it. Check your display settings.

Don
 
#13
It gets even more strange. The sim is P3Dv2.1. The aircraft in question include the P-38 that came with P3Dv2 and some Wings of Power WWII aircraft made for FSX and a couple of FSX Warbirds downloaded from Avsim.

If I choose one of the offending (non shadow) AI aircraft as the user aircraft......then it casts a shadow and so do all of the previously offending AI aircraft. In fact, ALL AI aircraft cast shadows if the user aircraft is one that would not cast a shadow as an AI. Could this be some weird DX11 thing that gets set when the user aircraft loads?

I'm going to try it with FSX and see what happens.

[Edit] FSX shows all shadows all the time. This may be a P3Dv2.1 thing...
 
Last edited:
#14
I can't seem to get a Custom GP of any texture to show a shadow in P3Dv2.1. Aprons, taxiways, runways, etc., do just fine. But it is impossible to cast a shadow on a Custom Ground Poly it seems.

??
Thanks to your recommendation on the LM forum to use layers 16 to 18, I now have shadows on GP polys. The red is on layer 16 and the white on 18:



I haven't had time to change the line layers.
 
#18
Actually, I think your're both right. The ground poly thing is addressed here including a viable workaround. There is also a problem in P3Dv2 with aircraft shadows that doesn't seem to be related to GPs. It seems to be related to some characteristic of the user aircraft.

User aircraft: FS9 Based model. >> All aircraft show shadows including AI aircraft.
User aircraft: FSX based model. >> Only FSX based models show shadows. FS9 based AI aircraft will not show shadows.

The only question left in my mind is the FS9/FSX basis. It appears to be the controlling characteristic, but I can't be sure. It could be some other characteristic that is usually different between the two.
 
Top