Board index FlightGear The FlightGear project

No shadows in FSX or FG 3.0 what's with these modern sims?

Questions about the FlightGear organisation, website, wiki etc.

Re: No shadows in FSX or FG 3.0 what's with these modern sim

Postby openflight » Sat Oct 10, 2015 2:22 am

There is a shadow for the DH2CW - wheels version, and curiously an entry in the xml file . No other reference to a shadow. dh2cwheels,xml

<animation>
<type>noshadow</type>
<object-name>LndLight</object-name>
<object-name>Fastprop</object-name>
<object-name>Slowprop</object-name>
</animation>
openflight
 
Posts: 350
Joined: Fri Sep 16, 2011 11:14 am
Version: 1.0
OS: Lubuntu 16.04LTS

Re: No shadows in FSX or FG 3.0 what's with these modern sim

Postby LesterBoffo » Sat Oct 17, 2015 5:38 pm

Interestingly Wings over Flanders Fields just recently added a patch to the old DirectX 9-ish code that they use from MS CFS3, that adds self shadowing and specular highlights to everything in the visible scene. What's amazing is that it runs on my older gaming rig without a big frame rate hit from the coding change.

Same for WarThunder.
User avatar
LesterBoffo
 
Posts: 2105
Joined: Sun Oct 02, 2011 4:02 pm
Location: Western USA
Callsign: LesBof
Version: 2016.1
OS: WinXP 32 bit

Re: No shadows in FSX or FG 3.0 what's with these modern sim

Postby Hooray » Sat Oct 17, 2015 5:42 pm

if you think about what kind of visuals were created (pioneered) in the early 386/486 days, it is unfortunately obvious that we got accustomed to having tons of RAM, CPU cores and VRAM/GPU cores without necessarily making best use of those ... back "then", people had to think to solve certain problems, these days we just tend to throw more hardware at these problems (without referring specifically to fg though)
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11340
Joined: Tue Mar 25, 2008 8:40 am

Re: No shadows in FSX or FG 3.0 what's with these modern sim

Postby LesterBoffo » Sat Oct 17, 2015 5:52 pm

Well think about how old and creaky the Combat Flight Sim 3 renderers are.

What OBD software has accomplished with a sim that premiered in 2000 is amazing, and the Ankor shadowing patch for WoFF is a volunteer effort, as is a lot of their liveries and game play patches.
User avatar
LesterBoffo
 
Posts: 2105
Joined: Sun Oct 02, 2011 4:02 pm
Location: Western USA
Callsign: LesBof
Version: 2016.1
OS: WinXP 32 bit

Re: No shadows in FSX or FG 3.0 what's with these modern sim

Postby Thorsten » Sun Oct 18, 2015 6:46 am

What's amazing is that it runs on my older gaming rig without a big frame rate hit from the coding change.


Maybe they did a second pass anyway before for other reasons and just used the results.

if you think about what kind of visuals were created (pioneered) in the early 386/486 days, it is unfortunately obvious that we got accustomed to having tons of RAM, CPU cores and VRAM/GPU cores without necessarily making best use of those ... back "then", people had to think to solve certain problems, these days we just tend to throw more hardware at these problems (without referring specifically to fg though)


Hm... somewhat ironic coming from you, usually advocating clear and maintainable code over compact and messy but optimized code.

ALS often favours a fast solution for the case at hand over a multi-use-case general solution. I've only ever heard the feedback that this'd be 'bad GLSL' or 'a bad way of coding' (since it's much harder to understand what is happening because the shader uses implicit assumptions or solves the same thing in different ways in different effects). I have yet to see anyone appreciate the performance gain by 'thinking to solve certain problems' rather than 'code a general solution by the book'.

The truth is that FG by its very structure of being open, modifiable and not dedicated to a particular use case makes it hard to optimize for a particular problem, simply because 'my' usage may be different from 'your' usage case. In many cases wer're practically forced to keep options open, and that restricts what we can do.
Thorsten
 
Posts: 11059
Joined: Mon Nov 02, 2009 8:33 am

Re: No shadows in FSX or FG 3.0 what's with these modern sim

Postby LesterBoffo » Sun Oct 18, 2015 3:58 pm

Maybe they did a second pass anyway before for other reasons and just used the results.


Yeah I'm not sure about Direct X's rendering methods, but AnKor's patch is bringing the CFS3 visuals up to 21st century 'standards'. There's not wind/water effects yet but, they have ground height shadowing with low sun angles, shadows for all of the objects in a scene, aircraft shadowing especially with biplanes with the struts and rigging wires, and reflection highlights, which I still think a far too overdone, considering that WWI aircraft aged rather rapidly due to the oxidation of the primitive paints used.

Not easy to find images of what the patch looks like at low sun angles..Image

Image

Image
User avatar
LesterBoffo
 
Posts: 2105
Joined: Sun Oct 02, 2011 4:02 pm
Location: Western USA
Callsign: LesBof
Version: 2016.1
OS: WinXP 32 bit

Re: No shadows in FSX or FG 3.0 what's with these modern sim

Postby Thorsten » Sun Oct 18, 2015 6:37 pm

Image


Hm. this aircraft doesn't seem to cast any shadow - for looking right into the sun, it appears far too bright, it should appear rather dark (I guess wrong balance of direct vs. indirect light).

The soft shading of the ground we have as well.
Thorsten
 
Posts: 11059
Joined: Mon Nov 02, 2009 8:33 am

Re: No shadows in FSX or FG 3.0 what's with these modern sim

Postby LesterBoffo » Sun Oct 18, 2015 10:29 pm

Yeah the shadow if it exists in that shot is probably really faint and stretched. And yes we do have the ground self soft/shadowing. plus a bunch of other effects in ALS that looks much better.

I was trying to find a particular group shot of a trio of Albatros' on takeoff run on a wintery field with the sun quartering them from behind, as it shows the ground shadows of the aircraft, trees, the ground undulation shadows and the reflection mapping from the snow on the ground high-points.

The third picture just captures a hint of what I was looking for.
User avatar
LesterBoffo
 
Posts: 2105
Joined: Sun Oct 02, 2011 4:02 pm
Location: Western USA
Callsign: LesBof
Version: 2016.1
OS: WinXP 32 bit

Re: No shadows in FSX or FG 3.0 what's with these modern sim

Postby wkitty42 » Mon Oct 19, 2015 12:03 am

FWIW: i keep thinking about previous posts talking about being able to see shadows of craft from altitude... yes, this is possible if you are in the shadow sight (eg: in the craft looking down at the ground) but if you are on the ground or in another craft that is not ""close"" to the one you are looking for (i don't have any ""firm"" number for distance) then you may very well not even notice the shadow of the craft going over you (if you are on the ground) or moving over the ground (if you are some distance from the craft)... out here in my location, we have craft flying over into KRDU all the time and we have never seen the effects of their shadows when they fly overhead... we might, here and even on the highway, see the effects of shadows from clouds but not very often...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5695
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: No shadows in FSX or FG 3.0 what's with these modern sim

Postby erik » Mon Oct 19, 2015 8:25 am

The sun is so big and at such a large distance that light rays are parallel on earth, which means an object at high altitude should be able to cast a crisp shadow. But only in perfect conditions, which are rarely available due to clouds, haze, pollution, etc.

Erik
erik
 
Posts: 1520
Joined: Thu Nov 01, 2007 1:41 pm

Re: No shadows in FSX or FG 3.0 what's with these modern sim

Postby Thorsten » Mon Oct 19, 2015 9:29 am

The sun is so big and at such a large distance that light rays are parallel on earth


Not true - the sun is also huge and has an angular size of half a degree in the sky, which means that rays from the left border and the right border can be non-parallel to that degree.

An object can only cast a shadow if its own solid angle on the sky is larger than that - if the aircraft is smaller than half a degree, it appears tinier than the sun disc in the sky and can't block the sun at all.
Thorsten
 
Posts: 11059
Joined: Mon Nov 02, 2009 8:33 am


Re: No shadows in FSX or FG 3.0 what's with these modern sim

Postby Thorsten » Mon Oct 19, 2015 11:21 am

No, I'm afraid they really aren't. It's one of the cases where you shouldn't trust all statements on the internet - they have half a degree of variation in direction.

If they were parallel, Lunar eclipses would be pitch black. But reality has this geometry:

Image

And reality isn't geometric optics but wave optics, and there is always diffraction of the wave fronts at edges into the shadowed region.

Which is why Lunar eclipses are not pitch black.

If you can see something as disc with your eye, it can never send parallel rays. The ray from eye to left part of object and the ray from eye to right part of object define the angular variation of incoming rays you can see.
Thorsten
 
Posts: 11059
Joined: Mon Nov 02, 2009 8:33 am

Re: No shadows in FSX or FG 3.0 what's with these modern sim

Postby erik » Mon Oct 19, 2015 2:16 pm

The non pitch blackness of the lunar eclips can be easily explained by the fact that some of the rays get bent by the atmosphere.

But non the less, there is hardly ever a circumstance where there is no light fraction between the sun and someone standing at the earth’s surface anyhow.

Erik
erik
 
Posts: 1520
Joined: Thu Nov 01, 2007 1:41 pm

Re: No shadows in FSX or FG 3.0 what's with these modern sim

Postby Thorsten » Mon Oct 19, 2015 4:23 pm

You find me somewhat baffled. It's just ray optics, you can draw sun to scale on a diagram with the distance to Earth shown and convince yourself that rays arriving at a certain point don't have to be parallel.

Or you can note that an airplane gets visually a lot smaller when you move it a kilometer away, whereas the sun does not, so at some point the airplane is visually much smaller than the sun - i.e. it can't block the entire sun disc - i.e. it can't cast a shadow any more, because covering all of the sun disc is the pre-requisite for casting a shadow.

There's a in fact number of ways you can use to convince yourself that the rays aren't really parallel and converge behind each shadow-casting object so that beyond some distance there cannot be a shadow any more.
Thorsten
 
Posts: 11059
Joined: Mon Nov 02, 2009 8:33 am

PreviousNext

Return to The FlightGear project

Who is online

Users browsing this forum: No registered users and 1 guest