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 02-27-2016, 01:38 PM   #3526
martins
Orbiter Founder
Default

Thinking about this, the main problem of the additive blending is that a single texture can't force a real bright or dark pixel, because it gets only a third of the vote. Since after high-pass filtering the most likely pixel value is 0.5, the probability of all three textures agreeing on a very dark or very bright pixel is low.

One way to address this could be to stretch and clip the blending result, e.g.

cFnl = max(0, min(2, 4/3*(cFar+cMed+cLow)-1))

which gives a single channel more power to overrule the other two.

Another approach could be to emphasize the outliers, which might work well with the high-pass filtered textures:

hi = max(cFar, cMed, cLow);
lo = min(cFar, cMed, cLow);
cFnl = (hi-0.5 > 0.5-lo ? hi : lo)*2;
martins is offline   Reply With Quote
Thanked by:
Old 02-27-2016, 06:01 PM   #3527
jarmonik
Beta Tester

Default

Here's a new build for testing. MicroTex.cfg has been added in Config folder and the configuration dialog has an option to enable/disable micro textures and normal maps. Texture filter options are also added. High anisotropy seems to cause heavy impact in performance.

Current implementation supports micro textures with and with-out normals. If normals are not used then all color channels will effect in resulting color. NORMALS parameter specifies which one of the supported types is used. All textures in a set must use equal format.

Currently all three textures must be specified. Although, it's possible to define 4x4 null texture with all channels set to 128 but it might be worth looking a better ways disable non-needed textures.

PHP Code:
// BODY [<string> BodyName]
// NORMALS [<bool> 0-1]
// LEVEL [<int> 0-2] [<string> texture name] [<float> resolution pixels/meter]

BODY Moon
NORMALS 1
LEVEL 0 D3D9Moon_A
.dds 20.0
LEVEL 1 D3D9Moon_B
.dds 8.0
LEVEL 2 D3D9Moon_C
.dds 2.0

BODY Mars
NORMALS 1
LEVEL 0 D3D9Moon_A
.dds 20.0
LEVEL 1 D3D9Moon_B
.dds 5.0
LEVEL 2 D3D9Moon_C
.dds 1.0 
Attached Files
File Type: zip D3D9ClientBeta19c-forRev50.zip (1.19 MB, 30 views)
jarmonik is offline   Reply With Quote
Thanked by:
Old 02-27-2016, 06:24 PM   #3528
jarmonik
Beta Tester

Default

Quote:
Originally Posted by martins View Post
 Thinking about this, the main problem of the additive blending is that a single texture can't force a real bright or dark pixel, because it gets only a third of the vote.
That's mostly the reason why I ended up multiplying the textures. I didn't really realize darkening the results in a process.

Quote:
Originally Posted by martins View Post
 Another approach could be to emphasize the outliers, which might work well with the high-pass filtered textures:

hi = max(cFar, cMed, cLow);
lo = min(cFar, cMed, cLow);
cFnl = (hi-0.5 > 0.5-lo ? hi : lo)*2;
That's an interesting idea. That should produce something different than anything we have tried before.
jarmonik is offline   Reply With Quote
Old 02-27-2016, 06:27 PM   #3529
SolarLiner
It's necessary, TARS.
 
SolarLiner's Avatar
Default

Quote:
Originally Posted by jarmonik View Post
 That's an interesting idea. That should produce something different than anything we have tried before.
Tried it by changing the code in Surface.fx, but got weird results, like clearly defined changes in brightness, which I think comes the ternary condition.

Last edited by SolarLiner; 02-27-2016 at 07:25 PM.
SolarLiner is offline   Reply With Quote
Old 02-27-2016, 07:13 PM   #3530
jarmonik
Beta Tester

Default

Quote:
Originally Posted by SolarLiner View Post
 Tried it by changing the code in Surface.fx, but got weird results, like clearly defined changes in brightness, which I think from from the ternary condition.
Yes, the results are somewhat unstable. Likely due to very different texture scales. Pixels from the high altitude textures will overthrow surface textures.
Attached Thumbnails
test.jpg  
jarmonik is offline   Reply With Quote
Old 02-27-2016, 07:26 PM   #3531
SolarLiner
It's necessary, TARS.
 
SolarLiner's Avatar
Default

Your implementation seems smoother than what I got, though. But I still prefer the 4/3 method.
SolarLiner is offline   Reply With Quote
Old 02-27-2016, 09:57 PM   #3532
jarmonik
Beta Tester

Default

A few shots from the latest experiments...

1st shot is without normals, 2nd shot is with normals, 3rd shot is taken at sunset. The sun lit sides of the rocks are a way too dim
EDIT: The normals are created with filtering and they are not exactly a good ones.
Attached Thumbnails
Cap0.jpg   Cap1.jpg   Cap2.jpg   Cap3.jpg  
Attached Files
File Type: zip Luna_A2.zip (3.35 MB, 24 views)

Last edited by jarmonik; 02-27-2016 at 10:58 PM.
jarmonik is offline   Reply With Quote
Thanked by:
Old 02-27-2016, 11:12 PM   #3533
jarmonik
Beta Tester

Default

After making the normal blending a little more robust, the results likely improved.

float2 cMix = cFar.rg * cMed.rg * cLow.rg * 8.0f;
Attached Thumbnails
Cap4.jpg  
Attached Files
File Type: txt Surface.fx.txt (34.4 KB, 15 views)
jarmonik is offline   Reply With Quote
Old 02-28-2016, 07:32 AM   #3534
Ripley
Tutorial translator
 
Ripley's Avatar
Default

Luna_A2.dds must go in textures folder right?

Quote:
Originally Posted by Ripley View Post
 I get this view at Brigton Beach with D3D9 19b, and it does not look like jarmonik's screenshot at post #3499...
I keep on having strange results, but maybe (clearly) it's my fault. I have D3D9 19c and Orbiter beta rev. 50.
In order, here's what I did:
- Made sure I had both official LoRes and HiRes textures
- Installed latest rstr microtexture pack V1.3
- Updated surface.fx as per jarmo's post #3533
- Installed Luna_A2.dds


Moon looks gorgeous from the distance


Zooming in on Brighton Beach


Last screenshot before magic kicks in


Just few mousewheel clicks in, things get much darker


Down low. Distant features look lighter


Things look weird

Last edited by Ripley; 02-28-2016 at 07:45 AM.
Ripley is offline   Reply With Quote
Thanked by:
Old 02-28-2016, 08:20 AM   #3535
jarmonik
Beta Tester

Default

Quote:
Originally Posted by Ripley View Post
 Luna_A2.dds must go in textures folder right?
Yes, and then you need to edit MicroTex.cfg to assing Luna_A2 to the Moon

BODY Moon
NORMALS 1
LEVEL 0 Luna_A2.dds 20.0
LEVEL 1 D3D9Moon_B.dds 8.0
LEVEL 2 D3D9Moon_C.dds 2.0

Then you can either disable normals from the launchpad options. Or you can fill the red and green channels of D3D9Moon_B and D3D9Moon_C with 128.
jarmonik is offline   Reply With Quote
Thanked by:
Old 02-28-2016, 09:57 AM   #3536
Ripley
Tutorial translator
 
Ripley's Avatar
Default

Thanks, now it looks better




But...did the random tile rotation got "lost in translation" somewhere?

Ripley is offline   Reply With Quote
Old 02-28-2016, 02:19 PM   #3537
rstr
Donator
 
rstr's Avatar
Default

Quote:
Originally Posted by jarmonik View Post
 edit MicroTex.cfg
BODY Moon
NORMALS 1
LEVEL 0 Luna_A2.dds 20.0
LEVEL 1 D3D9Moon_B.dds 8.0
LEVEL 2 D3D9Moon_C.dds 2.0
I'm getting by far unsatisfying results with the #3527 Beta19c plus #3533 surface.fx plus Microtex.cfg current settings compared to the previous Beta19 release.

Plz zoom in on the textured mountain slopes (Mt. Hadley).

This was Beta19 ... quite okay IMHO:
https://drive.google.com/open?id=0B_...jdQWkV4M29XeFE

And this is Beta19c - a horrible sight - repetitive / striping / ... :
https://drive.google.com/open?id=0B_...091azJTTF9yNGM

Plz advise. I'll try out some tuning on the microtex.cfg, but I'm not sure if its default settings explain the worsening.
Hope I don't sound blunt .. really no offense meant ... ... but we need to fix this, or change some defaults in the download set, so that we can get back the fine quality of the images your much appreciated great work had already achieved in Beta19 .. so apologies for asking for additional time ... it is worth it.

Last edited by rstr; 02-28-2016 at 03:12 PM.
rstr is offline   Reply With Quote
Old 02-28-2016, 05:05 PM   #3538
Marg
Orbinaut
Default

If in
LEVEL 2 D3D9Moon_C.dds 2.0
the last number 2.0 is changed to 1.0 repetitive striping decreases.
Marg is offline   Reply With Quote
Old 02-28-2016, 06:27 PM   #3539
rstr
Donator
 
rstr's Avatar
Default

Quote:
Originally Posted by Marg View Post
 If in
LEVEL 2 D3D9Moon_C.dds 2.0
the last number 2.0 is changed to 1.0 repetitive striping decreases.
I come to radically different microtex.cfg settings in comparison to the defaults, to have at least a basically acceptable view while landed:
LEVEL 0 D3D9Moon_A.dds 250.0 or LEVEL 0 Luna_A2.dds 200.0
LEVEL 1 D3D9Moon_B.dds 0.25
LEVEL 2 D3D9Moon_C.dds 0.1

Looking down during a lift-off with Beta19c is a badly disappointing experience, compared to the wonderful view we had with the old Beta19.
See this MP4 video here: >>> lift-off sequence <<< with Beta19 - this is what we need to regain.

And just compare the two pictures downloadable from my above post #3537 ...

Don't get me wrong ... obviously I am fully in favor of the pixels/meter feature for the uTs, but something seems to have caused a significant worsening - IMHO, 19c is a no-no ... so just let's hope good ol' jarmonik finds some time to work on this .. the community will deeply appreciate what he's doing for us Orbinauts.
Rob

Last edited by rstr; 02-28-2016 at 07:25 PM.
rstr is offline   Reply With Quote
Old 02-28-2016, 07:28 PM   #3540
jarmonik
Beta Tester

Default

Quote:
Originally Posted by Ripley View Post
 But...did the random tile rotation got "lost in translation" somewhere?
Yes, rotation is currently disabled. There was a problem with pixel normals. If the normals in a tile are biased 2deg toward south, for an example, and the tile below it is rotated 180 then it produces a pretty ugly edge. However, after passing the normals through high-pass filter and applying a small null range for the normals, they are working fine. So, we can use the rotations as Martin suggested.

---------- Post added at 21:28 ---------- Previous post was at 20:37 ----------

Quote:
Originally Posted by rstr View Post
 Looking down during a lift-off with Beta19c is a badly disappointing experience, compared to the wonderful view we had with the old Beta19 plug Marg's Surface.fx modification from #3459.
See this MP4 video here: >>> lift-off sequence <<< with Beta19+#3559mod - this is what we need to regain.
So, what's been changed between Beta19 and 19c:

1) The X-axis in a pixel normals was pointing in opposite direction that it should have. With some luck, that might have produced a nice view.

2) The texture blend equation has been changed from float3 cFnl = (cFar+0.5f) * (cMed+0.5f) * (cLow+0.5f) to float3 cFnl = max(0, min(2, 1.33333f*(cFar+cMed+cLow)-1)) this can be toggled from near the line 560 from Surface.fx

3) Texture levels (i.e. A, B, C) were toggled on/off based on camera distance. Now the on/off control is the mipmap level.

4) Texture level resolutions were hard-coded in Surface.fx now the resolution comes from MicroTex.cfg

So, is the problem:

1) Normal direction issue ? (Use time acceleration and observe surface behavior based on sun-light direction) (Beta 19c also has on/off toggle for normals in config dialog)
2) Texture blend problem ?
3) Texture level visibility problem ?
4) Texture scaling problem ?

Last edited by jarmonik; 02-28-2016 at 07:33 PM.
jarmonik 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 10:52 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.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.