Board index FlightGear Development Scenery

Airport Textures...

Questions and discussion about enhancing and populating the FlightGear world.

Re: Airport Textures...

Postby Thorsten » Sat Jul 28, 2012 8:58 am

but I keep wondering how we managed not to speak about the same thing during the last couple days, obviously


Because there's either something I don't understand about shader architecture, or there's something you don't understand about shader architecture. To me it seems you have the solution to someone else's problem, and I keep wondering why you try to get me to look into it. The shaders consume performance by running in massive parallel mode on the GPU. That's what the hardware is designed to do, so moving any non-uniform computations out of the rendering pipeline won't help making anything faster, and for moving uniform computations out we have Nasal, property rules,..., but here it doesn't matter how it's done because it isn't the bottleneck.

Btw. the NeoTexture editor you dug up turned out to be useful after all - it isn't flexible enough for my original purpose, but it's very useful to design noise patterns on the fly and have a quick visual.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Airport Textures...

Postby Hooray » Sat Jul 28, 2012 9:37 am

Many things that I raised were quite obviously related to not having sufficient information, i.e. not knowing if you actually used an OpenGL/GLSL profiler, so yes - there was lots of guess work involved unfortunately. Looking at all your shader work, I have no doubt that your understanding of shader architectures is much better than mine (kinda moot to suggest the opposite actually...)

As you may have noticed, I wasn't really trying to make you look into anything in particular (neither OpenCL nor Nasal worker threads), even though I am currently playing with OpenCL, the point was more about ensuring that there actually is something that can be reasonably moved out of shader space to reduce GPU pressure/load. Nasal and property rules are obviously fine, and you know that I usually don't need to be convinced to suggest and use Nasal, right? :)

The thing is, FlightGear works such that certain parallelism cannot be easily exploited currently. And you mentioned a number of times that you were doing computations in fragment/vertex shader space that wouldn't really belong there.

However, suffice to say, even your last response makes me believe that we are still not talking the same language... never mind, no point in arguing about semantics - it's pretty much a first actually between the two of us, so I don't care - I am just glad that we didn't waste any more time ...

It all boils down to using th right tool for the right job ;-)
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Airport Textures...

Postby gluon » Sun Jul 29, 2012 10:33 am

Thorsten did it again! You evil genius ;)

Hmm... maybe this looks a little bit more like it:
Image

Just a little bit of Gimp magic applied to the grass: Hue: -12, Brightness: +10 Saturation: +15
Plus a grayscale high-pass copy of the grass with some added contrast.

Here the 'original' for comparison:
Image

Maybe the darker patches could be a bit lighter and with a bit more variation in size. There also appears to be some periodicity. Hehe, but that's just my perfectionism speaking. The results are amazing already.

Before (left) and after (right):
Image

I was wondering if you use colored bitmaps for the high-res overlays. In the technique I've seen, they used low resolution color images for the terrain. Above that high-resolution, transparent greyscale textures were applied for additional details.

For everyone interested into making quality textures, I recommend the book "3d Game Textures" by Luke Ahearn. It's brilliant.
gluon
 
Posts: 68
Joined: Tue Aug 18, 2009 8:43 am

Re: Airport Textures...

Postby Thorsten » Sun Jul 29, 2012 4:58 pm

Just a little bit of Gimp magic applied to the grass: Hue: -12, Brightness: +10 Saturation: +15
Plus a grayscale high-pass copy of the grass with some added contrast.


Nice... I think that should go into the base texture (unfortunately I'm not certain the one I've been grabbing for experiments is GPL compatible, so we still need a good grass texture - also somewhat less tiling of the texture would be good - anyone?).

The next question is of course - do we want the grass to be that dry? Or do we want to code HSV transformations in the shader, so we can change runtime from dry grass to fresh grass?

Maybe the darker patches could be a bit lighter and with a bit more variation in size. There also appears to be some periodicity.


Size variation is still the most expensive beast in the code. I'm trying to use as little noise scales as possible to keep framerates up. If framerate would not be an issue, I would get way better results, it's just a question of throwing enough variation at the problem.

I was wondering if you use colored bitmaps for the high-res overlays.


This is not a hires overlay - the base texture actually is hires, and the variation you see from higher altitude is just the dynamically generated color and shade variation and the heightmap shadows.

For the terrain, I'm using colored detail overlay textures. Pro - it gives you three different texture channels mixed from large distance, which helps getting rid of landclass boundaries and tiling. Con - it means the terrain doesn't ever become hires everywhere.

Again, if I had the performance, I'd simply use all 8 texture units available to use three different LOD ranges. But at my best estimate, that would get me to ~4 fps....

For everyone interested into making quality textures, I recommend the book "3d Game Textures" by Luke Ahearn. It's brilliant.


For anyone interested in making quality textures, I could do with some help in this area. I know how they have to look like, but I have neither time nor skill to get good GPL compatible textures on short notice.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Airport Textures...

Postby Hooray » Sun Jul 29, 2012 5:17 pm

Thorsten wrote in Sun Jul 29, 2012 4:58 pm:The next question is of course - do we want the grass to be that dry? Or do we want to code HSV transformations in the shader, so we can change runtime from dry grass to fresh grass?
Size variation is still the most expensive beast in the code. I'm trying to use as little noise scales as possible to keep framerates up. If framerate would not be an issue, I would get way better results, it's just a question of throwing enough variation at the problem.
Again, if I had the performance, I'd simply use all 8 texture units available to use three different LOD ranges. But at my best estimate, that would get me to ~4 fps....


Personally, I'd think, if you can make these settings runtime-configurable via some properties without too much effort, that would be great in my opinion. Keep in mind that you are obviously basing all your work on your own hardware and GPU (nvidia 8xxx?).

While that is great, because it means that your work doesn't require the latest GPUs, many other users here, including myself, have much more powerful GPUs, and having an option to adjust these settings via properties would be great for those of us. Also, it is my understanding that the LinuxTag setup contains plenty of GPU power, too. So having the option to scale up, would be neat.

And I am sure that you would also appreciate having that option eventually, certainly once you upgrade your system or get another computer - even if that should not be a concern right now.

Being able to scale up eye candy via properties is a powerful concept and it means that features can be prepared now, even for hardware that may still take 6-18 months to become affordable for us.
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Airport Textures...

Postby Ernest1984 » Tue Jul 31, 2012 12:43 pm

Gluon - looks good but add a little bit of CONTRAST to it.
EPWA-hub: ERJ-195 clsgn: ERNIE
-----------------------------------
Around The World with B1900D!
callsign: AROUNDw - currently suspended till the FG will have a proper look on different locations
User avatar
Ernest1984
 
Posts: 438
Joined: Wed Dec 01, 2010 4:47 pm
Location: Poland / Canada
Callsign: ERNIE
Version: 2.10
OS: Mac OS X 10.8.2

Re: Airport Textures...

Postby fredb » Tue Jul 31, 2012 12:49 pm

And then do it 25 times per second to get the animation :wink:
User avatar
fredb
 
Posts: 753
Joined: Fri Dec 01, 2006 11:41 am
Location: Paris, France

Re: Airport Textures...

Postby Ernest1984 » Wed Aug 01, 2012 3:39 pm

What? Why? I meant put the texture file into Photoshop / Gimp / whateva, and add a bit of contrast to the image.
EPWA-hub: ERJ-195 clsgn: ERNIE
-----------------------------------
Around The World with B1900D!
callsign: AROUNDw - currently suspended till the FG will have a proper look on different locations
User avatar
Ernest1984
 
Posts: 438
Joined: Wed Dec 01, 2010 4:47 pm
Location: Poland / Canada
Callsign: ERNIE
Version: 2.10
OS: Mac OS X 10.8.2

Re: Airport Textures...

Postby f-ojac » Wed Aug 01, 2012 3:47 pm

I agree with Fred: I would like to see the grass moving, and with a special blowing effect when my Cessna is taking off ;-)
f-ojac
 
Posts: 1304
Joined: Fri Mar 07, 2008 10:50 am
Version: GIT
OS: GNU/Linux

Re: Airport Textures...

Postby fredb » Wed Aug 01, 2012 3:55 pm

Ernest1984 wrote in Wed Aug 01, 2012 3:39 pm:What? Why? I meant put the texture file into Photoshop / Gimp / whateva, and add a bit of contrast to the image.

What I wanted to point out in such a cryptic way is that I see no point to heavily gimp a screenshot if you are not able to do it in shaders
User avatar
fredb
 
Posts: 753
Joined: Fri Dec 01, 2006 11:41 am
Location: Paris, France

Re: Airport Textures...

Postby Ernest1984 » Wed Aug 01, 2012 4:09 pm

fredb wrote in Wed Aug 01, 2012 3:55 pm:
Ernest1984 wrote in Wed Aug 01, 2012 3:39 pm:What? Why? I meant put the texture file into Photoshop / Gimp / whateva, and add a bit of contrast to the image.

What I wanted to point out in such a cryptic way is that I see no point to heavily gimp a screenshot if you are not able to do it in shaders

I DO NOT WANT to gimp a SCREENSHOT - the TEXTURE itself should be more contrasty... :roll:
EPWA-hub: ERJ-195 clsgn: ERNIE
-----------------------------------
Around The World with B1900D!
callsign: AROUNDw - currently suspended till the FG will have a proper look on different locations
User avatar
Ernest1984
 
Posts: 438
Joined: Wed Dec 01, 2010 4:47 pm
Location: Poland / Canada
Callsign: ERNIE
Version: 2.10
OS: Mac OS X 10.8.2

Re: Airport Textures...

Postby fredb » Wed Aug 01, 2012 4:23 pm

This is just what gluon did, and Thorsten is not just laying textures
User avatar
fredb
 
Posts: 753
Joined: Fri Dec 01, 2006 11:41 am
Location: Paris, France

Re: Airport Textures...

Postby Hooray » Thu Aug 02, 2012 9:57 am

fredb wrote in Tue Jul 31, 2012 12:49 pm:And then do it 25 times per second to get the animation :wink:


I don't think this is too important for a flight simulator, on the other hand this is something that is really important for helicopter simulation, i.e. to get a visual clue on the proximity to the ground when hovering etc: http://www.vgtc.org/PDF/slides/2010/vr/vr_s11p01.pdf

I think we have a paper linked somewhere in the wiki that discusses how this is accomplished using shaders: http://wiki.flightgear.org/index.php/GL ... Vegetation

http://www.cg.tuwien.ac.at/research/pub ... _2007_IAG/
This paper introduces a technique for rendering animated grass in real time. The technique uses front-to-back compositing of implicitly defined grass slices in a fragment shader and therefore significantly reduces the overhead associated with common vegetation rendering systems. We also introduce a texture-based animation scheme that combines global wind movements with local turbulences. Since the technique is confined to a fragment shader, it can be easily integrated into any rendering system and used as a material in existing scenes.


Image
"Shows how to do animated grass using a GLSL vertex shader. Shows how to use mesh vbquad (an optimized quads array) to improve speed. Shows also the impact of trilinear filtering and mipmapping to incrase speed."

Image
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Airport Textures...

Postby Avionyx » Sun Nov 25, 2012 8:39 am

Were these grass improvements ever released?

As a GA flyer I'd love some improved grass. More than happy to help out in any way needed to get it available.
All the best,

Alex
Avionyx
 
Posts: 531
Joined: Mon Jan 11, 2010 4:07 pm
Location: EGMD
Callsign: G-AVYX
Version: 2020.4
OS: Manjaro

Re: Airport Textures...

Postby Thorsten » Sun Nov 25, 2012 3:30 pm

Currently waiting in a merge request on FGData git... along with lots of other shader work. Since this touches a gazillion effect file and has some real potential of unexpected side effects, I much prefer if someone does careful testing before this is committed - but I don't actually know what the status is.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Previous

Return to Scenery

Who is online

Users browsing this forum: No registered users and 9 guests