Tom

> -----Original Message-----
> From: Vivian Meazza [mailto:vivian.mea...@lineone.net]
> Sent: 01 May 2013 08:47
> To: 'FlightGear developers discussions'
> Subject: Re: [Flightgear-devel] Lightmap question
> 
> Tom,
> 
> > -----Original Message-----
> > From: Thomas Albrecht [mailto:ra...@web.de]
> > Sent: 30 April 2013 23:48
> > To: flightgear-devel@lists.sourceforge.net
> > Subject: [Flightgear-devel] Lightmap question
> >
> > Dear shader experts,
> >
> > Can I have a single-channel lightmap, and still use a vec3d in my
> model.xml to
> > end up with green or red (or whatever) light rendered? As in (roughly)
> >
> > on_screen_color[0] = lightmap-grey-value * vec3d[0] * texture[0]
> > on_screen_color[1] = lightmap-grey-value * vec3d[1] * texture[1]
> > on_screen_color[2] = lightmap-grey-value * vec3d[2] * texture[2]
> >
> > where texture is the base model texture?
> >
> > Docs/README.model-combined.eff says
> >
> > > <lightmap-color type="vec3d" n="0"> 1.0 1.0 1.0 </lightmap-color>
> > > - the color of the light for the red channel in the light-map.
> >
> > etc for green and blue channels, but when I use this line, FG
> > complains
> >
> > Failed to load xml: Unrecognized data type 'vec3d'
> > Failed to load model: Unrecognized data type 'vec3d'
> >
> > I guess this works only for multi-channel lightmaps? I.e. with
> >
> > <lightmap-multi type="int">1</lightmap-multi>
> >
> > My .xml looks like this:
> >
> > <effect>
> >   <inherits-from>Effects/model-combined-deferred</inherits-from>
> >   <parameters>
> >     <lightmap-enabled type="int">1</lightmap-enabled>
> >     <texture n="3">
> >       <image>tex/DSCF9503_noroofsec_pow2_LM.png</image>
> >       <wrap-s>repeat</wrap-s>
> >       <wrap-t>repeat</wrap-t>
> >     </texture>
> > <!--    <lightmap-color type="vec3d" n="0"> 1.0 5.0 0.2
</lightmap-color>
> -->
> >     <lightmap-factor type="float" n="0">1.0</lightmap-factor>
> >   </parameters>
> >   <object-name>b606</object-name>
> >   <object-name>b610</object-name>
> > </effect>
> >
> 
> The lightmap is working correctly - take a look in the b1900d  or the
b777.
> 
> The error:
> 
> Failed to load model: Unrecognized data type 'vec3d'
> 
> Indicates that you might be using type="vec3d" somewhere inside an
> <animation> tag - it's only valid in an <effect> tag.
> 
> Hth
 
 My previous answer wasn't all that helpful now that I read it again.
 
You can do what you want, but not inline in the model.xml file - the
type="vec3d" is not recognized anywhere outside an effect and is causing the
error.
 
Do your effect config in a local .eff file, then inherit from that in your
model.
 
 Hope this is a better explanation
 
Vivian




------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to