Object Shadows and P3D Shadowing

falcon409

Moderator
Staff member
I've posted this over on the LM Forums but thus far no takers. Here's the problem: I'm utilizing the great shadowing effects of V2.4, clouds, buildings and so on. . .looks great. However when I place grass around buildings and along the runways or anywhere in my sceneries for that matter they also cast a shadow because while they are vegetation in a sense, they are also "objects" and so P3D wants them to have a shadow. . .it looks terrible. I've recompiled all the grass objects I have using the "No Shadow" option, however it appears that P3D doesn't care about that and it continues to force a shadow. Has anyone had experience with this and is there a workaround? The only other option is to turn object shadows off and I'd like to keep those.
 
Ed,

in P3D there's a shadow setting for scenery objects that overrides the model's material configurations ("no shadow"). I think it's the last entry in the list of shadow objects.

I think I didn't tick that checkbox and my grass (normally vertical planes, material: vertical normals, double sided, no specular, no shadow=false (!!)) looks like this:

cbi-sanhupa-new4.png


Did you make the grass model? If you have control over the material settings you could play with the "assume vertical normal" setting. This affects the shadow, as I observed. It will change the brightness though and setting it to "false" on vertical planes that intersect will look ungainly. I thought I'd mention it since I don't know how the grass you are using looks like or if the planes intersect when you populate the scenery with it.

[Edit: a screnshot would help :) ]

HTH,
Mark
 
Thanks for the reply Mark. This grass was purchased from FSAddon. . .some nice options for varying types of grass from single objects up to patches of 200. I have played with the "no shadow" option (False/True) and "assume vertical normal" and nothing has any effect on the final display. The only thing that turns the shadowing off is to uncheck object shadows in the P3D setup. If that's the only option then I'll forgo the grass, as much as I like the general appearance of the grass the shadow is just a no-go for me.
 
It's strange, because if I remember correctly, the grass elements in the OrbX sceneries do not cast shadows (and the object shadows are activated in my P3D options).
The problem might come from the grass object itself.
 
It's strange, because if I remember correctly, the grass elements in the OrbX sceneries do not cast shadows (and the object shadows are activated in my P3D options).
The problem might come from the grass object itself.
Apparently Daube as I do have less desirable grass objects that don't cast this shadow. I'm going to load one of those into ModelConverterX and look at the settings and see if I can spot what the difference might be.

Just an update: After a comparison, I made a few changes to the desired grass objects to mimic those of the "shadowless" grass, saved and loaded P3D back up and found no change at all so I'm unsure as to why some grass I have insists on projecting a shadow and others don't despite the settings being the same.
 
Just a long shot here. Have you tried placing the grass using the latest ADE, updated for P3D and tick the relevant "no shadow" tickbox?
 
Just a long shot here. Have you tried placing the grass using the latest ADE, updated for P3D and tick the relevant "no shadow" tickbox?
I use Instant Scenery 3 for all my placement, it's far more precise that way. IS3 also has a tick box for "no shadow" but it has no effect. I've gone through every "no shadow" option there is and nothing works.
 
I just mentioned ADE because it is now specifically updated for P3D, with all available options for objects, some of them not available before in FSX. Maybe the "no shadow there" works differently. At least it seems to work for me with default FSX trees and bush.
 
Here's a screenshot of the material definition of some grass I made for the CBI project, the image in my post above above shows the depiction in the sim.
If you want, Ed, I'll send the MDL with the texture and you can give it a try for comparison.

Cheers,
Mark

ms-cbi-grass-material.png
 
Mark, just had a thought, can you take a screen of your shadow settings in P3D? Showing what options you check?
 
After messing with this some more, I don't think the settings have anything to do with the problem. There aren't that many that affect shadowing and since grass is an "object" it's either off or on. Off turns off shadowing for "all" objects and On turn everything "on" including grass. I've changed my material definitions to match the ones Mark offered and it makes no difference in how it displays so. . .since this isn't a scenery that will have a public release I'm doing what one member suggested to correct the problem. . .I'm cutting the grass.
 
Hmmm, Ed, this must be viral. Now I have it, too. Never noticed it before, at least it wasn't bothering me until now. I'll dig into it a bit.

--> when the sun is low the effect is the stronger, of course.

ms-cbi-kunming-AVG-hangar.png
 
Mark,
I may have found a material setting than eliminates the shadow. I loaded one library of 15 various grass types into MCX and with the first one that loaded on screen I went through every setting and made some changes, saved it and went back into P3D. When I selected that grass library in Instant Scenery 3, initially the first type I selected showed a shadow, but when I got to the one in that library that had loaded first in MCX. . .the shadow is gone. I don't profess to understand exactly what change made the difference, because I made quite a few, but at least one and possible others in that setup did the trick. Below is the full list of settings.
 
I've succeeded in converting all 90 variations of grass and their material settings and while I still see a minor problem, I at least have removed the shadow, which was the main goal. It apparently had nothing to do with the "No Shadow" material setting as that had been the setting from the beginning, I believe it had more to do with the alpha as it was set to "opaque" rather than "transparent". More testing might bear that out and I still need to find where the "glare" is coming from on some areas of the grass (probably a setting I changed that wasn't necessary), but right now I'm happy to have the shadows gone.
 
Ed,

Just a few explanations for the material settings that are usually important for grass or other objects that are made of planes (2d geometry):

- assume vertical normals: this is normally set on alphachanneled objects that consist of vertical 2d planes (e.g. vegetation). Controls the lighting so that all planes look the same. Important when you have crossed planes like you have on trees. The normals usually face in a horizontal direction to which the texture is visible. the backface, if double sided is darker. Switching to vertical will render the backside as bright as the front side.

- double sided : if true, the plane type object can be seen from both sides (normally you only can see it from the side the normals point to). If you switch this to false the object will be completely transparent from the other side.

- no base material specular: if this is set to true the object will not reflect specular light. It will be flat. This is the setting that makes your object "glare" if you set it to "false" (I guess this is what you meant by glare).

- z-write alpha: the alpha-channel of the object is sorted in the z-buffer. If this is not set other objects with alpha channels, interior structures behind alpha channels (e.g. windows) or clouds etc will be messed up behind the alpha-transparent plane area.

Another important figure is the z-testing parameter (equal, greater, less....) and number, which control the transparency level and the logic according to the grey level of the alpha channel.



Cheers,
Mark
 
Ed,

Just a few explanations for the material settings that are usually important for grass or other objects that are made of planes (2d geometry):

- assume vertical normals: this is normally set on alphachanneled objects that consist of vertical 2d planes (e.g. vegetation). Controls the lighting so that all planes look the same. Important when you have crossed planes like you have on trees. The normals usually face in a horizontal direction to which the texture is visible. the backface, if double sided is darker. Switching to vertical will render the backside as bright as the front side.

- double sided : if true, the plane type object can be seen from both sides (normally you only can see it from the side the normals point to). If you switch this to false the object will be completely transparent from the other side.

- no base material specular: if this is set to true the object will not reflect specular light. It will be flat. This is the setting that makes your object "glare" if you set it to "false" (I guess this is what you meant by glare).

- z-write alpha: the alpha-channel of the object is sorted in the z-buffer. If this is not set other objects with alpha channels, interior structures behind alpha channels (e.g. windows) or clouds etc will be messed up behind the alpha-transparent plane area.

Another important figure is the z-testing parameter (equal, greater, less....) and number, which control the transparency level and the logic according to the grey level of the alpha channel.



Cheers,
Mark
Thanks Mark. . .it was the "no base material specular" setting that was causing it.
 
Back
Top