• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSX Volume shadow - How to?

Messages
1,057
Country
ca-ontario
I posted this in "graphics" forum, but I figured this forum may be more appropriate...

I've scoured this site and on-line in general but I didn't get any info on this... I've been designing FS9 and FSX models for quite a while now (I'm not a novice) using 3DS MAX and the SDK, but one thing I can't get to work is a correct volume shadow (shadow that object casts on itself). I get the shadow going, but it is projected wrong, as if it gets projected on normal-inverted surfaces. The shadows are moving when I rotate camera around the object - and they shouldn't, obviously, since the light source is not moving.

I first thought it was my (outdated) hardware, but default aircraft display volume shadows correctly. So, the hardware is behaving properly.

Then, I started experimenting with very simple, manifold (no open edges) shapes, with simple materials - and I get the wrong results (so, it is not the complexity of my geometry). I applied a very simple materials (base colors, no textures) and, of course, "volume shadow" tickmark in the "Enhanced Parameters" section. I am still getting wrong volume shadow projections on my objects.

Is there a "trick" that I am missing in this? Has anyone been successful in designing geometry with correct volume shadows? (correct projections). I can attach a screenshot if necessary to illustrate.

Thanks for any info!
 
I have been working with volume shadow but I do not see that problem. The requirement for volume shadow are:
1. Manifold objects.
2. Assume vertices normal ( the shade of object plus with volume shadow make it too dark.
3. Tick on Volume shadow in the material properties.
4. Do not do drawcall batching. It will make shadow flicker. http://www.fsdeveloper.com/forum/threads/volume-shadow-cause-flickering.429503/#post-666558
It is not without problem in FSX, the shadow cut through aircrafts http://www.fsdeveloper.com/forum/threads/volume-shadow-how-do-you-think-about-it.430548/#post-676212
 
Thanks! Do you use 3DS MAX for modelling, and if so, what version?

When you say "Assume vertices normal", do you mean a FlightSimX material setting "Assume vertical normal"? I used that, and it makes all normals in one direction - and shades the objects flat.

Do you get proper volume shadows on user aircraft?

I've done done tests on simple manifold objects, and I do not get proper volume shadows at all. I am definitely missing something :(
 
Would you mind show the picture how volume shadow does on your object? A picture is worth more than a thousand words.
If you use 3dsmax, you need .xanim to the X file. Since 3dsmax has drawcall batching by default.
Please read http://www.fsdeveloper.com/forum/threads/volume-shadow-cause-flickering.429503/#post-666558.
The #15 reply what is need to do. You need to notepad and get a text file and change .txt to .xanim. Then compile it as animation.
 
Last edited:
I most certainly can. To make sure I have a valid test object (manifold, no open edges, no excessive amount of vertices....) I started testing with the most simple object: a plate, a sphere and a box. They all have a FlightSimX material, and are all linked to LOD_400 LOD node. There are no other LODs. Also, they do have xanim file they are compiled with. The following sets of screenshots are in pairs, each pair is at certain attitude, with 2 different camera angles showing inconsistencies. Light source is from above, almost straight up.

The first shot looks just about right, although the self-shadow on the sphere is wrong, it should be lower. The second shot, as I rotate camera around, shows how the shadows of the sphere and the box have moved on the plate. Also, the self-shadow on the sphere always moves to face the camera. This shadow movement shouldn't be happening because light source isn't moving.
upload_2016-9-14_12-24-16.png
upload_2016-9-14_12-24-56.png



Pitching slightly forward, the shadows properly move along the plate, but rotating the view, the shadows get completely obliterated by a giant shadow that simply shouldn't be there.
upload_2016-9-14_12-29-43.png
upload_2016-9-14_12-30-13.png


Pitching inverted, looks ok from this camera angle, but viewed from different direction, plate has a shadow on top of surface completely exposed to light.
upload_2016-9-14_12-35-25.png
upload_2016-9-14_12-33-8.png


Continuing to pitch from inverted, all kinds of weird stray and broken shadows get projected, depending on the viewing angle. They move along surfaces as camera angle is changing...
upload_2016-9-14_12-38-33.png
upload_2016-9-14_12-38-41.png



Closing the full rotation, shadows continuing to display incorrectly and in different positions depending on the camera viewing angle:
upload_2016-9-14_12-41-48.png


I hope this helps illustrate the problem. It almost seems as if, depending on the camera angle, shadows shown are projected on the wrong surfaces, or have their normals flipped or something similar.
 

Attachments

  • upload_2016-9-14_12-32-49.png
    upload_2016-9-14_12-32-49.png
    248.1 KB · Views: 391
I don't see this behavior in the model on the ground. Seeing your pictures, those objects are floating in the air, aren't they?
The building on the ground is different. Since you cannot see from below the ground. If you want your model to be on the air like this, such as space station, I think you need to do it as an aircraft. I am not sure either. May be someone else can answer. But I am pretty sure that, the weird result is from the object floating in the air which is not suppose to be the building or scenery objects.
 
Hi... this IS an Aircraft object (I build it as an aircraft object, not as scenery object). I just simplified it so I can test with the lowest common denominator.

However, after playing around a bit more, I have determined that:

1 - The shadows do NOT work high up above the ground. I'm not sure where the threshold is, but at orbital heights (390 km in my case) they do NOT work. If I place the object on the ground, the shadows work as expected!

2 - I was able to get the shadows working ONLY if the object part did not contain multimaterial. All separate parts must contain only one material. This means that parts that were designed with multimaterial will have to be separated and then linked as separate parts.
 
OK, I got it.
I think the program has limitation on this.
One other thing, you cannot mix volume shadow material with non-volume shadow material. All the shadow will disappear. I think baking shadow on texture might be a better idea in your case.
 
OK, I got it.
I think the program has limitation on this.
One other thing, you cannot mix volume shadow material with non-volume shadow material. All the shadow will disappear. I think baking shadow on texture might be a better idea in your case.

Yes - I read somewhere that they all have to be volume shadow materials. As for texture baking, I'm afraid that in my case that's not an option. Unlike atmosphere aircraft, Spacecraft in zero-G can have any attitude, they "fly" without any regard for up and down, so texture baking would look odd in most cases... No shadows at all is the best option for now... and, hopefully I can raise this with dovetail people.
 
It seems to me as if the model radius is too big and that's the reason this shadow appears. Had it with the F-4.
If you set model radius to too big or too small, zooming in and out of the model you'll get those "external" shadows. You need to find the sweet spot in raditor that will make the shadow go away in all conditions.

I thought Volume Shadow was only used in the VC to enable self-shadowing. Exterior models w/o volume shadow self-shade properly, so you wouldn't need to enable the material there.
 
Thanks, I just checked that link, and it deals exclusively with ground structures (not custom user aircraft) and there are no insights by Chuck or Bill (unless you meant their research in other threads influenced approach in this thread)
 
Hi Misho:

OOPS !

Thanks for the heads-up; it was a posting error (too many browser tabs open ! :oops:); URL in my post immediately above is now corrected. ;)

GaryGB
 
Heh - thanks. Much better - although, this thread deals with VC shadowing (I was looking at exterior model volume shadow) and it is a fairly old thread. I think I read somewhere that the VC shadows were "figured out"... I haven't gotten that far yet ;)
 
Back
Top