Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter Visualization Project
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Orbiter Visualization Project Orbiter external graphics development.

Reply
 
Thread Tools
Old 05-18-2018, 09:34 AM   #4531
Wolf
Donator
 
Wolf's Avatar
Default

Great job with the shadows Jarmonik, thanks!

I just downloaded the latest version for O2016 and noticed the boundary between light and shadow looks kind of fading instead of a clear cut line

You can see here how the Orbiter mid body projects its shadow over the wing
Click image for larger version

Name:	Shadow.jpg
Views:	34
Size:	112.9 KB
ID:	15792

is this a normal feature or maybe I have some wrong settings?
Wolf is offline   Reply With Quote
Old 05-18-2018, 01:25 PM   #4532
jarmonik
Beta Tester

Default

Quote:
Originally Posted by Wolf View Post
 is this a normal feature or maybe I have some wrong settings?
It's intended to work like that. In reality, shadows are pretty sharp close to a caster but becomes more blurred edged farther a way. In our case the amount of blurriness in fixed.

You can reduce the kernel size to make the edges less blurry.
#define KERNEL_RADIUS 3.0f

from /Modules/D3D9Client/PBR.fx

Also if performance is not a problem then higher resolution shadow maps will also sharpen the edges:

ShadowMapSize = 2048

in D3D9Client.cfg. Max size in 4096

---------- Post added at 16:25 ---------- Previous post was at 16:19 ----------

Also, should be noted that sharper shadows will more likely produce shadowing artifacts (problems) when the light is coming from a shallow angle to a surface.
jarmonik is offline   Reply With Quote
Thanked by:
Old 05-18-2018, 01:58 PM   #4533
jedidia
shoemaker without legs
 
jedidia's Avatar
Default

Quote:
In reality, shadows are pretty sharp close to a caster but becomes more blurred edged farther a way.
Does that actually hold true in a vacuum? I thought that was mostly due to scattering...
jedidia is offline   Reply With Quote
Old 05-18-2018, 02:10 PM   #4534
DaveS
Addon Developer
 
DaveS's Avatar


Default

Quote:
Originally Posted by jedidia View Post
 Does that actually hold true in a vacuum? I thought that was mostly due to scattering...
That was my understanding of the physics involved as well that shadows in any sort of tangible atmosphere would scatter (IE appear diffuse) due to light scattering. In space this wouldn't be true as there wouldn't be anything to scatter the light.
DaveS is online now   Reply With Quote
Old 05-18-2018, 06:15 PM   #4535
kuddel
Donator
Default

A shadow cast onto a surface in space will not be diffused by atmosphere, but still will not have an absolute clear boundary as the light source (sun) is not a point source!
I expect that some wave-function will describe the actual boundary in some way, but that's something that's over my head
kuddel is offline   Reply With Quote
Thanked by:
Old 05-21-2018, 05:59 AM   #4536
ljetibo
Orbinaut
Default

I doubt there would exist a clear analytical solution that would be nice to look at, or would let you draw conclusions about what's happening from it - but modeling a non-point sources is just a convolution of a bunch of point-sources.

In not so little words:
So lets say we're looking at a flat plane with a shadow on it cast by the Sun which you have modeled as a point source. Let's say you've gotten some kind of flux-vs-position relationship from that point-source model to your surface.
To upgrade that model to a non-point source like model:
1) you would model a lot of point sources in the shape of a disk where each point would approximate the SED of that part of Sun's disk,
2) you would convolve all of those point sources together,
3) and then plug that into the same flux-vs-position relationship you had originally.
You can imagine this as saying that every part of Sun's disk is contributing differently to total flux at some point xy depending on the SED that modeled part of the Sun has.

So the math per say isn't that difficult to establish I'd imagine, but would definitely not be something that would be solvable "by hand".
ljetibo is offline   Reply With Quote
Old 05-21-2018, 09:08 AM   #4537
Wolf
Donator
 
Wolf's Avatar
Default

Looking at some hi res pics of the Shuttle in LEO it seems there is no blur at all, at least when the shadows are casted on a flat surface.


Here is an example:
Click image for larger version

Name:	Wing shadow.jpg
Views:	21
Size:	245.5 KB
ID:	15805


It looks pretty different from the effect that D3D9 gives
Wolf is offline   Reply With Quote
Old 05-21-2018, 01:12 PM   #4538
4throck
Enthusiast !
 
4throck's Avatar
Default

As Jarmonik explained:

In reality, shadows are pretty sharp close to a caster but becomes more blurred edged farther a way. In our case the amount of blurriness in fixed.

So the payload doors are close to the wings and cast a very sharp shadow.
A more distant object would cast a softer shadow.

But I don't see much problem with the current default value.
It looks good and even better than some commercial games.
4throck is offline   Reply With Quote
Thanked by:
Old 05-21-2018, 04:43 PM   #4539
Felix24
Orbinaut
Default

Here are a couple of ISS/shuttle images showing blurry shadows while on orbit. In both cases there is a big distance between the object casting the shadow and the object receiving it.



Felix24 is offline   Reply With Quote
Thanked by:
Old 05-22-2018, 08:59 AM   #4540
Abloheet
Addon Developer
 
Abloheet's Avatar
Default

How to get the reflective ISS Solar Panels?
Abloheet is offline   Reply With Quote
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter Visualization Project

Tags
d3d9client, graphicsclient


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 03:40 PM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.