Jack Mermod a écrit :

>  Screenshot: http://img585.imageshack.us/img585/5017/cobra5.png

Hi Jack,
At first glance I see a problem (very common) with the colors of the 3D 
model. Dark parts (that is not on the sun side) a really too dark.

The reason is that ambient values are  not equals to rgb values.  That's 
due to the default colors setting in most 3D moleling software. FG need 
to be feed with rgb and amb colors to be the same to render correct 
darkness.

You will find bellow a wide used script that replace automaticaly every 
values found in the files given as arguments:



Code of color-change.sh :

#! /bin/sh

for f in "$@" ; do
  sed -i.before-color-change 
's,\(MATERIAL.*\)rgb\(.*\)amb\(.*\)emis\(.*\)spec\(.*\)shi\(.*\)trans\(.*\)$,\1rgb\2amb\2emis\4spec\5shi\6trans\7,1'
 
"$f"
  if ! cmp "${f}" "${f}.before-color-change" > /dev/null 2>&1 ; then
      echo "$f has changed colors!"
  fi
done



Usage :

ale...@duck:~/flight/fg-data/git-head/fgdata/Aircraft/A-10/Models$ 
color-change.sh `find . -name "*.ac"`

Hope it helps,
Alexis

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to