Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
# material dialog
|
|
|
|
# ===============
|
|
|
|
#
|
|
|
|
# Usage: material.showDialog(<path>, [<title>], [<x>], [<y>]);
|
|
|
|
#
|
|
|
|
# the path should point to a property "directory" (usually set in
|
2005-03-28 09:15:07 +00:00
|
|
|
# the aircraft's *-set.xml file) that contains any of
|
|
|
|
# (shininess|transparency|texture) and (diffuse|ambient|specular|emission),
|
|
|
|
# whereby the latter four are directories containing any of
|
|
|
|
# (red|green|blue|factor|offset).
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
#
|
2005-03-28 09:15:07 +00:00
|
|
|
# If <title> is omitted or nil, then the last path component is used as title.
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
# If <x> and <y> are undefined, then the dialog is centered.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
# <foo>
|
2005-03-28 09:15:07 +00:00
|
|
|
# <diffuse>
|
|
|
|
# <red>1.0</red>
|
|
|
|
# <green>0.5</green>
|
|
|
|
# <blue>0.5</blue>
|
|
|
|
# </diffuse>
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
# <transparency>0.5</transparency>
|
|
|
|
# <texture>bar.rgb</texture>
|
|
|
|
# </foo>
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# material.showDialog("/sim/model/foo/", "FOO");
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Of course, these properties are only used if a "material" animation
|
|
|
|
# references them via <*-prop> definition.
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
|
|
|
# <animation>
|
|
|
|
# <type>material</type>
|
|
|
|
# <object-name>foo</object-name>
|
2005-03-28 09:15:07 +00:00
|
|
|
# <property-base>/sim/model/foo</property-base>
|
|
|
|
# <diffuse>
|
|
|
|
# <red-prop>diffuse/red</red-prop>
|
|
|
|
# <green-prop>diffuse/green</green-prop>
|
|
|
|
# <blue-prop>diffuse/blue</blue-prop>
|
|
|
|
# </diffuse>
|
|
|
|
# <transparency-prop>transparency</transparency-prop>
|
|
|
|
# <texture-prop>texture</texture-prop>
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
# </animation>
|
|
|
|
#
|
|
|
|
|
|
|
|
dialog = nil;
|
|
|
|
|
|
|
|
colorgroup = func {
|
2005-03-28 09:15:07 +00:00
|
|
|
parent = arg[0]; # pui parent
|
|
|
|
name = arg[1]; # "diffuse"
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
base = arg[2];
|
2005-03-28 09:15:07 +00:00
|
|
|
undef = func { props.globals.getNode(base ~ name ~ "/" ~ arg[0]) == nil };
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
|
|
|
|
if (undef("red") and undef("green") and undef("blue")) {
|
2005-11-05 14:19:53 +00:00
|
|
|
return 0;
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
}
|
2005-11-05 14:19:53 +00:00
|
|
|
|
|
|
|
if (arg[3] != nil) {
|
|
|
|
parent.addChild("hrule").setColor(1, 1, 1, 0.5);
|
|
|
|
}
|
|
|
|
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
grp = parent.addChild("group");
|
2005-11-05 14:19:53 +00:00
|
|
|
grp.set("layout", "vbox");
|
|
|
|
grp.addChild("text").set("label", name);
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
|
|
|
|
foreach (color; ["red", "green", "blue", "factor"]) {
|
2005-03-28 09:15:07 +00:00
|
|
|
mat(parent, color, base ~ name ~ "/" ~ color, "%.3f");
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
}
|
2005-03-28 09:15:07 +00:00
|
|
|
mat(parent, "offset", base ~ name ~ "/" ~ "offset", "%.3f", -1.0, 1.0);
|
2005-11-05 14:19:53 +00:00
|
|
|
return 1;
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
mat = func {
|
|
|
|
parent = arg[0];
|
|
|
|
name = arg[1];
|
|
|
|
path = arg[2];
|
2005-03-28 09:15:07 +00:00
|
|
|
format = arg[3];
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
if (props.globals.getNode(path) != nil) {
|
|
|
|
grp = parent.addChild("group");
|
|
|
|
grp.set("layout", "hbox");
|
|
|
|
|
|
|
|
grp.addChild("empty").set("stretch", 1);
|
|
|
|
grp.addChild("text").set("label", name);
|
|
|
|
|
|
|
|
slider = grp.addChild("slider");
|
|
|
|
slider.set("property", path);
|
|
|
|
slider.set("live", 1);
|
2005-03-28 09:15:07 +00:00
|
|
|
if (size(arg) == 6) {
|
|
|
|
slider.set("min", arg[4]);
|
|
|
|
slider.set("max", arg[5]);
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
}
|
|
|
|
slider.prop().getNode("binding[0]/command", 1).setValue("dialog-apply");
|
|
|
|
|
|
|
|
number = grp.addChild("text");
|
2005-03-28 09:15:07 +00:00
|
|
|
number.set("label", "-0.123");
|
|
|
|
number.set("format", format);
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
number.set("property", path);
|
|
|
|
number.set("live", 1);
|
2005-05-02 16:00:13 +00:00
|
|
|
number.setColor(1, 0, 0);
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
showDialog = func {
|
|
|
|
base = arg[0];
|
|
|
|
while (size(base) and substr(base, size(base) - 1, 1) == "/") {
|
|
|
|
base = substr(base, 0, size(base) - 1);
|
|
|
|
}
|
|
|
|
parentdir = "";
|
|
|
|
b = base;
|
|
|
|
while (size(b)) {
|
|
|
|
c = substr(b, size(b) - 1, 1);
|
|
|
|
if (c == "/") { break }
|
|
|
|
b = substr(b, 0, size(b) - 1);
|
|
|
|
parentdir = c ~ parentdir;
|
|
|
|
}
|
|
|
|
|
|
|
|
title = if (size(arg) > 1 and arg[1] != nil) { arg[1] } else { parentdir };
|
|
|
|
name = "material-" ~ parentdir;
|
|
|
|
base = base ~ "/";
|
|
|
|
|
|
|
|
dialog = gui.Widget.new();
|
|
|
|
dialog.set("name", name);
|
|
|
|
if (size(arg) > 2 and arg[2] != nil) { dialog.set("x", arg[2]) }
|
|
|
|
if (size(arg) > 3 and arg[3] != nil) { dialog.set("y", arg[3]) }
|
|
|
|
dialog.set("layout", "vbox");
|
|
|
|
|
|
|
|
titlebar = dialog.addChild("group");
|
|
|
|
titlebar.set("layout", "hbox");
|
2005-05-03 13:45:33 +00:00
|
|
|
w = titlebar.addChild("text");
|
2005-11-05 14:19:53 +00:00
|
|
|
w.set("label", "object \"" ~ title ~ "\"");
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
titlebar.addChild("empty").set("stretch", 1);
|
|
|
|
|
|
|
|
w = titlebar.addChild("button");
|
|
|
|
w.set("pref-width", 16);
|
|
|
|
w.set("pref-height", 16);
|
|
|
|
w.set("legend", "");
|
|
|
|
w.set("default", 1);
|
2005-11-05 14:19:53 +00:00
|
|
|
w.set("keynum", 27);
|
2005-05-24 12:11:31 +00:00
|
|
|
w.set("border", 1);
|
2005-04-19 13:43:44 +00:00
|
|
|
w.prop().getNode("binding[0]/command", 1).setValue("dialog-close");
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
|
2005-11-05 14:19:53 +00:00
|
|
|
h = 0;
|
|
|
|
h += colorgroup(dialog, "diffuse", base, h);
|
|
|
|
h += colorgroup(dialog, "ambient", base, h);
|
|
|
|
h += colorgroup(dialog, "emission", base, h);
|
|
|
|
h += colorgroup(dialog, "specular", base, h);
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
|
|
|
|
undef = func { props.globals.getNode(base ~ arg[0]) == nil };
|
2005-05-24 12:11:31 +00:00
|
|
|
if (!(undef("shininess") and undef("transparency/alpha") and undef("threshold"))) {
|
2005-11-05 14:19:53 +00:00
|
|
|
if (h) {
|
|
|
|
dialog.addChild("hrule").setColor(1, 1, 1, 0.5);
|
|
|
|
}
|
|
|
|
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
w = dialog.addChild("group");
|
|
|
|
w.set("layout", "hbox");
|
2005-11-05 14:19:53 +00:00
|
|
|
w.addChild("text").set("label", "misc");
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
|
2005-03-28 09:15:07 +00:00
|
|
|
mat(dialog, "shi", base ~ "shininess", "%.0f", 0.0, 128.0);
|
2005-05-24 12:11:31 +00:00
|
|
|
mat(dialog, "alpha", base ~ "transparency/alpha", "%.3f");
|
2005-03-28 09:15:07 +00:00
|
|
|
mat(dialog, "thresh", base ~ "threshold", "%.3f");
|
2005-11-05 14:19:53 +00:00
|
|
|
h += 1;
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
}
|
|
|
|
|
2005-03-28 09:15:07 +00:00
|
|
|
if (!undef("texture")) {
|
2005-11-05 14:19:53 +00:00
|
|
|
if (h) {
|
|
|
|
dialog.addChild("hrule").setColor(1, 1, 1, 0.5);
|
|
|
|
}
|
|
|
|
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
w = dialog.addChild("group");
|
|
|
|
w.set("layout", "hbox");
|
2005-11-05 14:19:53 +00:00
|
|
|
w.addChild("text").set("label", "texture");
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
|
|
|
|
w = dialog.addChild("input");
|
2005-03-28 09:15:07 +00:00
|
|
|
w.set("live", 1);
|
|
|
|
w.set("pref-width", 200);
|
|
|
|
w.set("property", base ~ "texture");
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
w.prop().getNode("binding[0]/command", 1).setValue("dialog-apply");
|
|
|
|
}
|
|
|
|
dialog.addChild("empty").set("pref-height", "3");
|
|
|
|
|
2005-11-05 14:19:53 +00:00
|
|
|
dialog.setColor(0.6, 0.6, 0.6, 0.6);
|
|
|
|
|
Melchior FRANZ:
Changes:
o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
"d" ... toggle selected door (default: pilot door)
"D" ... select next door (indicated with popup)
"Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
society on startup
o 5 variants, that can be switched at runtime, with different emblems,
colors(!), and extra equipment:
"c" ... switch to next variant
"C" ... pop-up material dialog, as a demonstration of the new
"material" animation, well ... and for entertainment
purposes :-)
The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:
http://localhost:5501/sim/model/bo105/material/emblem/texture
(choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb
(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)
I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.
http://members.aon.at/mfranz/material.jpg [45 kB]
The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:
material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");
This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
|
|
|
fgcommand("dialog-new", dialog.prop());
|
|
|
|
gui.showDialog(name);
|
|
|
|
}
|
|
|
|
|
|
|
|
|