Board index FlightGear Development Aircraft

Release: IAR80 v1.1 [2011-12-12 update]

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Re: IAR80 Development

Postby i4dnf » Tue Mar 16, 2010 12:50 pm

HHS wrote:
i4dnf wrote:
HHS wrote:You can have many vertices as you want- it won't affect fps. Only too many and big textures can affect the perfomance. That's why I love FlightGear!

and now you tell me about the vertices ???? :P


Onle in Single-player- on mp it will enlarge loading times and give bad lags!

i know, i know.. that's why i'm going to make a low detail AI version of this.
i4dnf
Retired
 
Posts: 743
Joined: Wed Sep 09, 2009 7:17 am
Location: LRBS
Callsign: YR-I4D
Version: GIT
OS: Gentoo Linux ~amd64

Re: IAR80 Development

Postby i4dnf » Tue Mar 16, 2010 1:10 pm

fredb wrote:
i4dnf wrote:yup. just one question fred, noticed it now.. when alpha is 0 in the texture, the "resulting" specularity displayed should be 0.. but as it is now it appears to still be related to material shininess ( i've looked at the code and it looks right... to me. so i'm gona blame it on lack of support for the tangents )

Your code was relying on the red channel of the specular map. The code I committed use the Alpha. Beware not erasing the color when you set alpha to 0.

i know, but shouldn't the final result be roughly the same.. ? since i was using a gray specmap so the red channel in my specmap should have about the same value as the alfa channel in the combined normal/specmap..
i4dnf
Retired
 
Posts: 743
Joined: Wed Sep 09, 2009 7:17 am
Location: LRBS
Callsign: YR-I4D
Version: GIT
OS: Gentoo Linux ~amd64

Re: IAR80 Development

Postby Tuxklok » Tue Mar 16, 2010 1:42 pm

fredb wrote:The shader/effect has been commited to CVS. Look at the top of Effects/bumpspec.eff to have an example of usage.

Thanks, I'll look at it now.

fredb wrote:
Tuxklok wrote:So fred...are the tangents and what not available automagically in some form like 'attribute vec3 tangent;' ala ogre..or does one need to do something in the effect file? Looking at the source made it seem like the latter but I'm not quite certain. Or perhaps it's just not quite yet ready for public tinkering?

After discussion with Tim, it has been decided to create tangents on demand to save GPU memory. attribute vec3 normal, binormal; are available if specified in the effect file. See the newly committed files.

Hmm, but if you don't declare the attribute in your actual shader, it wouldn't be compiled in and thus not use the memory regardless...no?
The Austria Scenery Project - more info
fg-scenery-tools - gitorious | videos
fgcomgui - Open source, cross platform, gui front end for fgcom. more info

More random musings and doings can be found on my personal site. (work in progress)
User avatar
Tuxklok
 
Posts: 1321
Joined: Tue Apr 21, 2009 6:04 pm
Location: Orlando, FL
Callsign: Tuxklok / N1292P
OS: GNU/Linux

Re: IAR80 Development

Postby fredb » Tue Mar 16, 2010 3:00 pm

Tuxklok wrote:Hmm, but if you don't declare the attribute in your actual shader, it wouldn't be compiled in and thus not use the memory regardless...no?

No, you need to compute 2 arrays of vectors, and upload them to the GPU, even if the shader doesn't use it
User avatar
fredb
 
Posts: 753
Joined: Fri Dec 01, 2006 10:41 am
Location: Paris, France

Re: IAR80 Development

Postby Tuxklok » Tue Mar 16, 2010 3:05 pm

Hmm, I must be remembering incorrectly then I guess...been away from the field for too long. I'll have to play with this soon.

cheers!
The Austria Scenery Project - more info
fg-scenery-tools - gitorious | videos
fgcomgui - Open source, cross platform, gui front end for fgcom. more info

More random musings and doings can be found on my personal site. (work in progress)
User avatar
Tuxklok
 
Posts: 1321
Joined: Tue Apr 21, 2009 6:04 pm
Location: Orlando, FL
Callsign: Tuxklok / N1292P
OS: GNU/Linux

Re: IAR80 Development

Postby fredb » Wed Mar 17, 2010 11:05 am

Zan just told me that the bumpspec effect I committed to CVS has many mistakes and that should be why the specular is plain wrong. I'll fix that tonight.
User avatar
fredb
 
Posts: 753
Joined: Fri Dec 01, 2006 10:41 am
Location: Paris, France

Re: IAR80 Development

Postby i4dnf » Wed Mar 17, 2010 1:04 pm

I see. Many thanks again for taking care of it. And if it's not too much to ask, i was thinking it might me better to have the specular in a separate texture (i think it might be easier to tweak, modify.. also might benefit liveries that have scratches/chips on them where the underlying metal shows, that way one may use the same normal map, and just modify the specularity one). Hope i'm not pushing my luck too much :)
i4dnf
Retired
 
Posts: 743
Joined: Wed Sep 09, 2009 7:17 am
Location: LRBS
Callsign: YR-I4D
Version: GIT
OS: Gentoo Linux ~amd64

Re: IAR80 Development

Postby Hooray » Wed Mar 17, 2010 3:59 pm

4dnf wrote:well, i cant' take the credit for the bump shader. i just tried with a shader from the dangerdeep project, and it worked. it appears to be gpl, but i'll have to ask them.


That's really neat!
The dangerdeep project has been brought up here several times already, it's a really excellent idea to take their shaders and simply plug them into FlightGear, I am surprised no one else has tried this before ;-)

Maybe there are even other open source projects that provide reusable shaders (provided they are also GPL)? Might be worthwhile to do some more searching!
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: 12090
Joined: Tue Mar 25, 2008 8:40 am

Re: IAR80 Development

Postby fredb » Wed Mar 17, 2010 5:44 pm

i4dnf wrote:I see. Many thanks again for taking care of it. And if it's not too much to ask, i was thinking it might me better to have the specular in a separate texture (i think it might be easier to tweak, modify.. also might benefit liveries that have scratches/chips on them where the underlying metal shows, that way one may use the same normal map, and just modify the specularity one). Hope i'm not pushing my luck too much :)

People tries to save memory in order to allow more thing to show up on screen. If all the resources are grabbed by the Aircraft, the scenery would not have much and that kills fps (lower case :wink: ). The idea is not mine : see http://cs.elderscrolls.com/constwiki/in ... ormal_Maps
User avatar
fredb
 
Posts: 753
Joined: Fri Dec 01, 2006 10:41 am
Location: Paris, France

Re: IAR80 Development

Postby fredb » Wed Mar 17, 2010 6:18 pm

This is a not so gorgeous example of the bumpspec effect. Forget the white stripe. It is there because the model is not fully textured. My bad.

Image

You can see the shininess has variations. I put a noise image in the alpha channel. The AIR FRANCE logo and the door have a bump map.
User avatar
fredb
 
Posts: 753
Joined: Fri Dec 01, 2006 10:41 am
Location: Paris, France

Re: IAR80 Development

Postby i4dnf » Wed Mar 17, 2010 6:48 pm

wow.. looks great.. i can't wait to test it too :)
about combining the textures into one, personaly i don't have a problem with it, i was just thinking that way might be easier for the livery makers.
i4dnf
Retired
 
Posts: 743
Joined: Wed Sep 09, 2009 7:17 am
Location: LRBS
Callsign: YR-I4D
Version: GIT
OS: Gentoo Linux ~amd64

Re: IAR80 Development

Postby fredb » Wed Mar 17, 2010 7:24 pm

We can imagine that the dirt / shininess variation be a part of the airframe like the normal map. The livery makers will only change the colors in most case. I doubt the livery system is able to switch a secondary texture anyway ( for the moment ). If the need is so urgent, they can duplicate the normal map.
User avatar
fredb
 
Posts: 753
Joined: Fri Dec 01, 2006 10:41 am
Location: Paris, France

Re: IAR80 Development

Postby HHS » Wed Mar 17, 2010 8:21 pm

Looks indeed nice- but the ambient color should be fixed !

That's really neat!
The dangerdeep project has been brought up here several times already, it's a really excellent idea to take their shaders and simply plug them into FlightGear, I am surprised no one else has tried this before


VDrift has a nice metallic shader, which gives a nice metallic effect which we knows from cars. Should work as well!
Up, up and away
User avatar
HHS
Retired
 
Posts: 3615
Joined: Thu Jul 19, 2007 8:09 am
Version: GIT

Re: IAR80 Development

Postby fredb » Sat Mar 20, 2010 6:12 pm

but the ambient color should be fixed !

Agreed, so I rewrote the shaders :

Image

They are in CVS now.
User avatar
fredb
 
Posts: 753
Joined: Fri Dec 01, 2006 10:41 am
Location: Paris, France

Re: IAR80 Development

Postby simbabeat » Sat Mar 20, 2010 6:17 pm

Looks very nice if not a bit to dark.
User avatar
simbabeat
 
Posts: 3408
Joined: Sat Sep 12, 2009 12:19 am

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: YandexBot [Bot] and 3 guests