[Flightgear-devel] Material animation problems with osg

2007-10-20 Thread Jon Stockill
I'm having problems with material animations under the osg version of 
flightgear. Melchior has confirmed that it's working for him with the 
plib version, and that the config is correct. It's an extremely somple 
model that consists of 2 buttons that turn a light on and off, so the 
xml looks like this:

PropertyList

  pathELT.ac/path

  animation
   typepick/type
   visibletrue/visible
   object-nameEnable/object-name
   action
button0/button
repeatablefalse/repeatable
binding
 commandproperty-assign/command
 property/instrumentation/elt/enabled/property
 value type=booltrue/value
/binding
   /action
  /animation

  animation
   typepick/type
   visibletrue/visible
   object-nameReset/object-name
   action
button0/button
repeatablefalse/repeatable
binding
 commandproperty-assign/command
 property/instrumentation/elt/enabled/property
 value type=boolfalse/value
/binding
   /action
  /animation

  animation
   typematerial/type
   object-nameLED/object-name
   emission
red1/red
green0/green
blue0/blue
factor-prop/instrumentation/elt/enabled/factor-prop
   /emission
  /animation

/PropertyList

Clicking the Enable and Reset objects results in the relevant node being 
toggled in the property tree, but the LED object is never illuminated.

Anyone got a fix, or a workaround?

Jon

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Material animation problems with osg

2007-10-20 Thread SydSandy
On Sat, 20 Oct 2007 15:53:14 +0100
Jon Stockill [EMAIL PROTECTED] wrote:

 I'm having problems with material animations under the osg version of 
 flightgear. Melchior has confirmed that it's working for him with the 
 plib version, and that the config is correct. It's an extremely somple 
 model that consists of 2 buttons that turn a light on and off, so the 
 xml looks like this:
 
 PropertyList
 
   pathELT.ac/path
 
   animation
typepick/type
visibletrue/visible
object-nameEnable/object-name
action
 button0/button
 repeatablefalse/repeatable
 binding
  commandproperty-assign/command
  property/instrumentation/elt/enabled/property
  value type=booltrue/value
 /binding
/action
   /animation
 
   animation
typepick/type
visibletrue/visible
object-nameReset/object-name
action
 button0/button
 repeatablefalse/repeatable
 binding
  commandproperty-assign/command
  property/instrumentation/elt/enabled/property
  value type=boolfalse/value
 /binding
/action
   /animation
 
   animation
typematerial/type
object-nameLED/object-name
emission
 red1/red
 green0/green
 blue0/blue
 factor-prop/instrumentation/elt/enabled/factor-prop
/emission
   /animation
 
 /PropertyList
 
 Clicking the Enable and Reset objects results in the relevant node being 
 toggled in the property tree, but the LED object is never illuminated.
 
 Anyone got a fix, or a workaround?
 
 Jon
 

I havent tested this one but Ive found that I have to put the material 
animation first before any
others for it to work  

-- 
SydSandy [EMAIL PROTECTED]

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Material animation problems with osg

2007-10-20 Thread Jon Stockill
SydSandy wrote:

 I havent tested this one but Ive found that I have to put the material 
 animation first before any
 others for it to work  

It appears to be a bug in the osg version - changing bool to int and 
true/false to 1/0 makes everything work. Is plib doing a type conversion 
that osg isnt?

Jon

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Material animation problems with osg

2007-10-20 Thread Ron Jensen
On Sat, 2007-10-20 at 18:24 +0100, Jon Stockill wrote:
 SydSandy wrote:
 
  I havent tested this one but Ive found that I have to put the material 
  animation first before any
  others for it to work  
 
 It appears to be a bug in the osg version - changing bool to int and 
 true/false to 1/0 makes everything work. Is plib doing a type conversion 
 that osg isnt?
 
 Jon

It sounds like that is the case, and its not unreasonable, IMHO, that
you can't multiply a number by false and get a valid answer.

Have you tried something like this:

  animation
   typematerial/type
   object-nameLED/object-name
condition/instrumentation/elt/enabled/condition
   emission
red1/red
green0/green
blue0/blue
   /emission
  /animation


Ron

 


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Material animation problems with osg

2007-10-20 Thread Ron Jensen
On Sat, 2007-10-20 at 17:28 -0600, Ron Jensen wrote:
 On Sat, 2007-10-20 at 18:24 +0100, Jon Stockill wrote:
  SydSandy wrote:
  
   I havent tested this one but Ive found that I have to put the material 
   animation first before any
   others for it to work  
  
  It appears to be a bug in the osg version - changing bool to int and 
  true/false to 1/0 makes everything work. Is plib doing a type conversion 
  that osg isnt?
  
  Jon
 
 It sounds like that is the case, and its not unreasonable, IMHO, that
 you can't multiply a number by false and get a valid answer.
 
 Have you tried something like this:
 
   animation
typematerial/type
object-nameLED/object-name
 condition/instrumentation/elt/enabled/condition
emission
 red1/red
 green0/green
 blue0/blue
/emission
   /animation
 
 
 Ron

Nevermind, that didn't work at all for me.  However, I put your code
(more or less) into an instrument I have here and it did work under OSG.
The AvionicsToggle is a toggle switch model taken from
Aircraft/Instruments-3d/controls/switch-large-flat.ac.  It rotates with
the boolean property value as well.  I last built Simgear/Flightgear on
31 Aug and am using OSG 2.0:


?xml version=1.0?

PropertyList

pathswitch-panel.ac/path

animation
typematerial/type
object-nameLED/object-name
emission
red0.9/red
green0.0/green
blue0.0/blue
factor-propcontrols/FIXME/factor-prop
/emission
/animation

animation
typerotate/type
object-nameAvionicsToggle/object-name
propertycontrols/FIXME/property
factor40/factor
axis
x0.0/x
y-1.0/y
z0.0/z
/axis
center
x-m 0.0/x-m
y-m 0.0/y-m
z-m-0.009/z-m
/center
/animation

animation
typepick/type
action
nameAvionics Power Toggle/name
button0/button
binding
commandproperty-toggle/command
propertycontrols/FIXME/property
/binding
/action
object-nameAvionicsToggle/object-name
/animation
/PropertyList




-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel