Re: [Flightgear-devel] Shader question

2010-03-14 Thread Erik Hofman
Heiko Schulz wrote:
 Now I have to learn to make normalmaps! :-)

I've updated the normalmap utility in FlightGear/utils/Modeller to 
reflect the output of the following tutorial:
http://www.katsbits.com/htm/tutorials/creating_bumpmaps_from_images.htm

It's not a one size fits all solution but might be a decent start for 
aircraft relief maps.

Unfortunately at this point the utility only accepts rgb files for input 
and output.

Erik

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Shader question

2010-03-14 Thread Frederic Bouvier
Hi Erik,

Le 14/03/2010 15:13, Erik Hofman a écrit :
 Heiko Schulz wrote:
   
 Now I have to learn to make normalmaps! :-)
 
 I've updated the normalmap utility in FlightGear/utils/Modeller to 
 reflect the output of the following tutorial:
 http://www.katsbits.com/htm/tutorials/creating_bumpmaps_from_images.htm

 It's not a one size fits all solution but might be a decent start for 
 aircraft relief maps.

 Unfortunately at this point the utility only accepts rgb files for input 
 and output.
   

There is a very good Gimp plugin that has a 3D preview, support relief
maps and works under Windows : http://registry.gimp.org/node/69
Of course, source code is also available for Linux and Mac.

I also found a tutorial here :
http://developer.valvesoftware.com/wiki/Normal_Map_Creation_in_The_GIMP

-Fred



--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Shader question

2010-03-14 Thread Patrice Poly
There is also another approach to creating normal maps, using a
detailed,  high polygon count model of the object, from which you
extract the normals and map them to the low polygon object which is used
in the game.

A nice tutorial for blender can be found here :

http://blenderartists.org/forum/showthread.php?t=138194


These are very generic instructions for normal map baking, I didn't try
the FG shader yet, so I presume this may need some tweaking, specially
regarding the normal space to be used.

See
http://wiki.blender.org/index.php/Doc:Manual/Render/Bake  for
more details about normal space.


This normal map shader work will be a huge step ahead for image quality
in FG, congratulations !


On 14/03/2010 15:38, Frederic Bouvier wrote:
 Hi Erik,

 Le 14/03/2010 15:13, Erik Hofman a écrit :
   
 Heiko Schulz wrote:
   
 
 Now I have to learn to make normalmaps! :-)
 
   
 I've updated the normalmap utility in FlightGear/utils/Modeller to 
 reflect the output of the following tutorial:
 http://www.katsbits.com/htm/tutorials/creating_bumpmaps_from_images.htm

 It's not a one size fits all solution but might be a decent start for 
 aircraft relief maps.

 Unfortunately at this point the utility only accepts rgb files for input 
 and output.
   
 
 There is a very good Gimp plugin that has a 3D preview, support relief
 maps and works under Windows : http://registry.gimp.org/node/69
 Of course, source code is also available for Linux and Mac.

 I also found a tutorial here :
 http://developer.valvesoftware.com/wiki/Normal_Map_Creation_in_The_GIMP

 -Fred

   


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Shader question

2010-03-14 Thread Erik Hofman
Frederic Bouvier wrote:
 There is a very good Gimp plugin that has a 3D preview, support relief
 maps and works under Windows : http://registry.gimp.org/node/69
 Of course, source code is also available for Linux and Mac.
 
 I also found a tutorial here :
 http://developer.valvesoftware.com/wiki/Normal_Map_Creation_in_The_GIMP

Ah, that might be even better then

Erik

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Shader question

2010-03-14 Thread Frederic Bouvier
Le 13/03/2010 16:09, Heiko Schulz a écrit :
 Would be great it would support nightlighting as well. (Switching between 
 emissive nightlighted and daylighted textures) So we can get rid of those 
 ugly lightpoints
   

What about this (unfinished) one :
http://frbouvi.free.fr/flightsim/fgfs-urban-night.jpg

-Fred


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Shader question

2010-03-14 Thread Heiko Schulz

    
 
 What about this (unfinished) one :
 http://frbouvi.free.fr/flightsim/fgfs-urban-night.jpg
 
 -Fred

Yep, exactly that was in my mind!


__
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen 
Massenmails. 
http://mail.yahoo.com 

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Shader question

2010-03-13 Thread Frederic Bouvier
Hi Tim,

Le 07/03/2010 18:53, Tim Moore a écrit :
 On Sun, Mar 7, 2010 at 6:37 PM, Frederic Bouvier wrote:

 Hi Tim,

 is there a way to have the value of an uniform updated every frame by
 the value of a live property ?

 I've been promising this to AndersG for some time now. I have code
 that basically makes this (the animation) work in my development tree,
 but haven't checked it in yet. I'll check it in for uniforms tonight,
 then start changing the code to support animations in the other
 effects parameters too.

I see your code rely on property listener. Does it work on tied property
like /sim/time/sun-angle-rad ? It seems it doesn't.

Regards,
-Fred

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Shader question

2010-03-13 Thread Tim Moore
On Sat, Mar 13, 2010 at 10:35 AM, Frederic Bouvier fredfgf...@free.frwrote:

 Hi Tim,

 Le 07/03/2010 18:53, Tim Moore a écrit :
  On Sun, Mar 7, 2010 at 6:37 PM, Frederic Bouvier wrote:
 
  Hi Tim,
 
  is there a way to have the value of an uniform updated every frame by
  the value of a live property ?
 
  I've been promising this to AndersG for some time now. I have code
  that basically makes this (the animation) work in my development tree,
  but haven't checked it in yet. I'll check it in for uniforms tonight,
  then start changing the code to support animations in the other
  effects parameters too.

 I see your code rely on property listener. Does it work on tied property
 like /sim/time/sun-angle-rad ? It seems it doesn't.

 Regards,
 -Fred

No, it doesn't. I has hoping to avoid iterating over all the effects that
use property values every frame, but maybe there's no alternative. Urk.

Tim
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Shader question

2010-03-13 Thread Frederic Bouvier
Le 13/03/2010 13:06, Tim Moore a écrit :


 On Sat, Mar 13, 2010 at 10:35 AM, Frederic Bouvier fredfgf...@free.fr
 mailto:fredfgf...@free.fr wrote:

 Hi Tim,

 Le 07/03/2010 18:53, Tim Moore a écrit :
  On Sun, Mar 7, 2010 at 6:37 PM, Frederic Bouvier wrote:
 
  Hi Tim,
 
  is there a way to have the value of an uniform updated every
 frame by
  the value of a live property ?
 
  I've been promising this to AndersG for some time now. I have code
  that basically makes this (the animation) work in my development
 tree,
  but haven't checked it in yet. I'll check it in for uniforms
 tonight,
  then start changing the code to support animations in the other
  effects parameters too.

 I see your code rely on property listener. Does it work on tied
 property
 like /sim/time/sun-angle-rad ? It seems it doesn't.

 Regards,
 -Fred

 No, it doesn't. I has hoping to avoid iterating over all the effects
 that use property values every frame, but maybe there's no
 alternative. Urk.

Maybe a flag in the uniform element that tells the property needs to be
polled

-Fred


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Shader question

2010-03-13 Thread Heiko Schulz
Hi,

The shader is great! Though I have to admit it really works great on a middle 
to far distance, as the buildings don't show any windows, walls etc. 

Would be great it would support nightlighting as well. (Switching between 
emissive nightlighted and daylighted textures) So we can get rid of those ugly 
lightpoints


But as an aircraft developer I'm really happy to see that it works on any 
3d-object easily as well:
http://www.hoerbird.net/fredswonderfullnewbumpmapshader.jpg

Now I have to learn to make normalmaps! :-)

Thanks to Fred!

Cheers
Heiko


__
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen 
Massenmails. 
http://mail.yahoo.com 

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Shader question

2010-03-07 Thread Frederic Bouvier
Hi Tim,

is there a way to have the value of an uniform updated every frame by
the value of a live property ?

I used :

  parameters
sun-angleuse/sim/time/sun-angle-rad/use/sun-angle
  /parameters

and then, in pass

  uniform
namesun_angle/name
typefloat/type
valueusesun-angle/use/value
  /uniform

According to README.effect, the value should dynamically change but my
shader variable stay at 0.0.
The readme also says [NOT IMPLEMENTED YET], but it is unclear to me what
in not implemented : the copy of a value from the global property tree
to a uniform, or the copy from a local property, or both ?

Regards,
-Fred


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Shader question

2010-03-07 Thread Tim Moore
On Sun, Mar 7, 2010 at 6:37 PM, Frederic Bouvier fredfgf...@free.fr wrote:

 Hi Tim,

 is there a way to have the value of an uniform updated every frame by
 the value of a live property ?

 I've been promising this to AndersG for some time now. I have code that
basically makes this (the animation) work in my development tree, but
haven't checked it in yet. I'll check it in for uniforms tonight, then start
changing the code to support animations in the other effects parameters too.

Tim

 I used :

  parameters
sun-angleuse/sim/time/sun-angle-rad/use/sun-angle
  /parameters

 and then, in pass

  uniform
namesun_angle/name
typefloat/type
valueusesun-angle/use/value
  /uniform

 According to README.effect, the value should dynamically change but my
 shader variable stay at 0.0.
 The readme also says [NOT IMPLEMENTED YET], but it is unclear to me what
 in not implemented : the copy of a value from the global property tree
 to a uniform, or the copy from a local property, or both ?

Initializing a value from a property works, animating it doesn't.



 Regards,
 -Fred



 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Flightgear-devel mailing list
 Flightgear-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/flightgear-devel

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel