I admitted that you'd have a penumbra with a real big light source, but you won't have soft shadow edges in space. Apart from that you cannot prove your point by using the moon as an example, because the target environment is spaceships in space, and probably in quite a distance from a sun. Finally, your sketch is grossly disproportionate. We're talking about 150 million km distance between sun and moon, compared to the sun's diameter of around 1.4 million km and a moon diameter of about 3474 km. What fraction of the moon's size is even the biggest ship from FS or FS2. Your argument imo is completely pointless given the scale of the shadow casters in FS.
No, it isn't pointless. The proportions of the shadow would be pretty much same for a much smaller than Earth object. The lower image was in scale.
With a very simple application of geometry you can calculate the length of the umbra for objects of any diameter. If D is diameter of light source, d is diameter of object, L is distance to the light source and l the length of umbra cone, you get
l = d*L / (D - d)
For objects with d<<D, it can be said that D-d = ~D and therefore approximated that
l =~ d*L / D
Using values
L = 1 AU = 149 598 000 000 metres
D = 1 391 000 000 metres
d = 100 metres
we get umbra length of approximately 10.8 kilometres. That's the distance to the tip of the umbra.
Similarly, the width of penumbra at any given length = l can be calculated by
P = d + ( l [D+d] / L )
Calculating for example with diameter of Sun, distance 1 AU, and penumbra width at 1000 metres behind the object... the penumbra width shows 109.298253 metres.
For example, an object with hundred metres diameter would have an umbra with length of roughly eleven kilometres. Mind you, that's the distance to the umbra's tip itself; softness to shadows would appear much sooner. For example, at one kilometre from the object, the umbra is roughly 91 metres wide and penumbra is the aforementioned 109 metres. That's an 18 metres wide gradient area at the edge of the shadow.
Considering that for example Colossus is about six kilometres long with that fancy structure in the middle, it could conceivably cast a three kilometres long shadow on itself. That means almost sixty metres of blur on the edge of the shadow already. Very much noticeable compared to sharp edge of a stencil shadow if you're flying next to the ship.
Also, capital ships casting shadows on each other could very well have even longer distances... so no, I don't think it would be waste of effort putting accurate soft shadows in. It would be noticeable in certain situations.
Of course this is all being calculated with a sun with apparent diameter of half a degree... if teh sun is larger, the difference would be even larger. And considering how unfathomably unrealistically big FreeSpace suns tend to be... why not apply the same to the shadows? It's not like realism is the highest authority regarding FreeSpace stuff anyway.
After all, if the shadow code is done right you should be able to specify the apparent diameter of the light source in the mission background editor, or something equivalent. A very small diameter would result in a very stenciley effect, while larger diameter would result in softer edges on the shadows. That way it would be up to mission designer to specify the lighting conditions in this sense; if someone wants sharp shadows and realistically small sun they can do it, while the engine still can do soft shadows in situations where the suns are really big - like in retail FreeSpace campaign, for one good example.
But I feel we're skinning the mammoth before it's taken down here. There are no shadows in the engine yet... and stencil shadow would undoubtedly be simpler to utilize, so I would be more than content with that, at least to begin with. Any shadows would be better than none at all - and I do admit that in vast majority of situations, there would not be perceptible difference between stencil and soft shadows.

...holy scheiber, nine new replies.
