Skip to content

Commit

Permalink
Merged branch master into release
Browse files Browse the repository at this point in the history
  • Loading branch information
leezer3 committed Nov 21, 2016
2 parents bf829f0 + 993b09c commit 4bc9770
Show file tree
Hide file tree
Showing 93 changed files with 6,283 additions and 4,127 deletions.
Binary file added Dependencies/NUniversalCharDet.dll
Binary file not shown.
53 changes: 52 additions & 1 deletion Documentation/HTML/menu.html
Expand Up @@ -11,7 +11,58 @@
</head>
<body style="font-family:sans-serif;font-size:small" bgcolor="#A0A0A0">
<font color="#FFFFFF"><a href="../index-2.html" target="_top"><img src="../Images/icon_128.png" alt="" border="0" /></a>
<br /><br /><b>Objects</b><br /><a href="object_b3d.html" target="main">The B3D object</a><br /><a href="object_csv.html" target="main">The CSV object</a><br /><a href="object_x.html" target="main">The X object</a><br /><a href="object_animated.html" target="main">The ANIMATED object</a><br /><a href="object_information.html" target="main">Information and tips</a><br /><br /><b>Routes</b><br /><a href="route_csv.html" target="main">The CSV route</a><br /><a href="route_rw.html" target="main">The RW route</a><br /><a href="tutorial_ats.html" target="main">Tutorial: Using ATS</a><br /><a href="tutorial_atc.html" target="main">Tutorial: Using ATC</a><br /><br /><b>Trains</b><br /><a href="train_overview.html" target="main">Overview</a><br /><a href="train_train_dat.html" target="main">The train.dat file</a><br /><a href="train_extensions_cfg.html" target="main">The extensions.cfg file</a><br /><a href="train_panel_cfg.html" target="main">The panel.cfg file</a><br /><a href="train_panel2_cfg.html" target="main">The panel2.cfg file</a><br /><a href="train_panel_animated.html" target="main">The panel.animated file</a><br /><a href="train_default_sounds.html" target="main">Default sounds</a><br /><a href="train_sound_cfg.html" target="main">The sound.cfg file</a><br /><a href="train_ats_cfg.html" target="main">The ats.cfg file</a><br /><a href="train_plugin.html" target="main">Train plugins</a><br /><a href="train_information.html" target="main">Information and tips</a><br /><br /><b>Plugins</b><br /><a href="plugin_overview.html" target="main">Overview</a><br /><br /><b>Information</b><br /><a href="information_encodings.html" target="main">Character encodings</a><br /><a href="information_numberformats.html" target="main">Number formats</a><br /><a href="information_whitespaces.html" target="main">White spaces</a><br /><a href="information_textureformats.html" target="main">Texture formats</a><br /><a href="information_soundformats.html" target="main">Sound formats</a><br /><a href="information_standards.html" target="main">Standards</a><br /><a href="information_distribution.html" target="main">Distributing add-ons</a><br /><a href="information_forking.html" target="main">Forking guidelines</a><br /><a href="information_bve.html" target="main">Vs. BVE Trainsim</a><br /><br /><b>Tools</b><br /><a href="tool_objectviewer.html" target="main">Object Viewer</a><br /><a href="tool_objectbender.html" target="main">Object Bender</a><br /><a href="tool_routeviewer.html" target="main">Route Viewer</a><br /><a href="tool_traineditor.html" target="main">Train Editor</a><br /><br /></font>
<br />
<br />
<b>Objects</b><br />
<a href="object_b3d.html" target="main">The B3D object</a><br />
<a href="object_csv.html" target="main">The CSV object</a><br />
<a href="object_x.html" target="main">The X object</a><br />
<a href="object_animated.html" target="main">The ANIMATED object</a><br />
<a href="object_information.html" target="main">Information and tips</a><br />
<br />
<b>Routes</b><br />
<a href="route_csv.html" target="main">The CSV route</a><br />
<p style="margin-left: 10px"><a href="route_dynamiclight.html" target="main">Adding Dynamic Lighting</a><br>
<a href="route_dynamicbackground.html" target="main">Dynamic & Object Based Backgrounds</a></p>

<a href="route_rw.html" target="main">The RW route</a><br />
<a href="tutorial_ats.html" target="main">Tutorial: Using ATS</a><br />
<a href="tutorial_atc.html" target="main">Tutorial: Using ATC</a><br />
<br />
<b>Trains</b><br />
<a href="train_overview.html" target="main">Overview</a><br />
<a href="train_train_dat.html" target="main">The train.dat file</a><br />
<a href="train_extensions_cfg.html" target="main">The extensions.cfg file</a><br />
<a href="train_panel_cfg.html" target="main">The panel.cfg file</a><br />
<a href="train_panel2_cfg.html" target="main">The panel2.cfg file</a><br />
<a href="train_panel_animated.html" target="main">The panel.animated file</a><br />
<a href="train_default_sounds.html" target="main">Default sounds</a><br />
<a href="train_sound_cfg.html" target="main">The sound.cfg file</a><br />
<a href="train_ats_cfg.html" target="main">The ats.cfg file</a><br />
<a href="train_plugin.html" target="main">Train plugins</a><br />
<a href="train_information.html" target="main">Information and tips</a><br />
<br />
<b>Plugins</b><br />
<a href="plugin_overview.html" target="main">Overview</a><br />
<br />
<b>Information</b><br />
<a href="information_encodings.html" target="main">Character encodings</a><br />
<a href="information_numberformats.html" target="main">Number formats</a><br />
<a href="information_whitespaces.html" target="main">White spaces</a><br />
<a href="information_textureformats.html" target="main">Texture formats</a><br />
<a href="information_soundformats.html" target="main">Sound formats</a><br />
<a href="information_standards.html" target="main">Standards</a><br />
<a href="information_distribution.html" target="main">Distributing add-ons</a><br />
<a href="information_forking.html" target="main">Forking guidelines</a><br />
<a href="information_bve.html" target="main">Vs. BVE Trainsim</a><br />
<br />
<b>Tools</b><br />
<a href="tool_objectviewer.html" target="main">Object Viewer</a><br />
<a href="tool_objectbender.html" target="main">Object Bender</a><br />
<a href="tool_routeviewer.html" target="main">Route Viewer</a><br />
<a href="tool_traineditor.html" target="main">Train Editor</a><br />
<br />
</font>
</body>

<!-- Mirrored from www.trainsimframework.org/develop/menu.html by HTTrack Website Copier/3.x [XR&CO'2010], Sat, 05 May 2012 22:30:27 GMT -->
Expand Down
25 changes: 23 additions & 2 deletions Documentation/HTML/route_csv.html
Expand Up @@ -623,6 +623,20 @@
<hr />
<br /><table border="0">
<tr style="height:16"><td></td></tr>
<tr><td bgcolor="#F0F0F0" style="font-family: monospace;border:1px dotted;color:#808080"><font color="#C00000"><b>Route.DynamicLight</b> <em>Dynamic.XML</em></font></td></tr>
</table>
<table style="border:0px none;margin-left:10pt;margin-right:10pt;">
<tr><td><font color="#808080">
<b><em>Dynamic.XML</em></b>: A path to a Dynamic Lighting definition XML file.<br />
</font></td></tr></table>
This command may be used as an alternative to the <i>Route.AmbientLight</i> , <i>Route.DirectionalLight</i> and <i>Route.LightDirection</i> commands.<br>
It allows the lighting to be varied using a time-based model, and is described fully on the following page:<br>
<p style="margin-left: 10px"><a href="route_dynamiclight.html" target="main">Dynamic Lighting</a>

<br /><br /><hr />
<table border="0">
<tr style="height:16"><td></td></tr>
<tr style="height:16"><td></td></tr>
<tr><td bgcolor="#F0F0F0" style="font-family: monospace;border:1px dotted;color:#808080"><font color="#C00000"><b>Route.AmbientLight</b> <em>RedValue</em>; <em>GreenValue</em>; <em>BlueValue</em></font></td></tr>
</table>
<table style="border:0px none;margin-left:10pt;margin-right:10pt;">
Expand Down Expand Up @@ -844,7 +858,10 @@

</font></td></tr></table>
Commands from this namespace define which background images to use and how they are aligned.<br /><br /><img src="../Images/illustration_background.png" alt="" />
<br />The background image is displayed as a cylindric wall around the camera whose start (viewed from above) is 60 degrees to the left of the initial forward direction (at the 10 o'clock position). From there, the background image wraps clock-wise around the cylinder with a repetition count specified via Texture.Background(<em>BackgroundTextureIndex</em>).X, which by default creats 6 repetitions in a full circle.<br /><br />The upper 3/4 of the image is displayed above the horizon, while the lower 1/4 is displayed below the horizon. Via Texture.Background(<em>BackgroundTextureIndex</em>).Aspect, you can choose whether to have a fixed cylinder height or to preserve the aspect ratio of the texture. If the image should have a fixed height, the cylinder has a height of 1/2 its radius, which corresponds to about 20 degree inclination to the top of the image, and about -7 degrees to the bottom of the image. If the aspect ratio of the image is preserved, this takes not only the width and height of the image into account, but also the repetition count.<br /><br />Regardless of the repetition count you chose, you should make sure that the left and right edges of the textures fit seamlessly together. Please also take into account that top and bottom caps are created which sample from the top and bottom 10% of the image. You should avoid mountain peaks and similar extremes in the top 10% of the image in order for such extremes to not leak into the top cap.<br /><br />The image loaded into Texture.Background(0) is displayed at the beginning of the route, unless a Track.Back command at the beginning of the route requests a different image.<br /><br /><hr />
<br />The background image is displayed as a cylindric wall around the camera whose start (viewed from above) is 60 degrees to the left of the initial forward direction (at the 10 o'clock position). From there, the background image wraps clock-wise around the cylinder with a repetition count specified via Texture.Background(<em>BackgroundTextureIndex</em>).X, which by default creats 6 repetitions in a full circle.<br /><br />The upper 3/4 of the image is displayed above the horizon, while the lower 1/4 is displayed below the horizon. Via Texture.Background(<em>BackgroundTextureIndex</em>).Aspect, you can choose whether to have a fixed cylinder height or to preserve the aspect ratio of the texture. If the image should have a fixed height, the cylinder has a height of 1/2 its radius, which corresponds to about 20 degree inclination to the top of the image, and about -7 degrees to the bottom of the image. If the aspect ratio of the image is preserved, this takes not only the width and height of the image into account, but also the repetition count.<br /><br />Regardless of the repetition count you chose, you should make sure that the left and right edges of the textures fit seamlessly together. Please also take into account that top and bottom caps are created which sample from the top and bottom 10% of the image. You should avoid mountain peaks and similar extremes in the top 10% of the image in order for such extremes to not leak into the top cap.<br /><br />The image loaded into Texture.Background(0) is displayed at the beginning of the route, unless a Track.Back command at the beginning of the route requests a different image.<br /><br />
As an alternative <b><em>Dynamic or Object</em></b> based backgrounds may be used. The implementation of these is described upon this page:<br>
<a href="route_dynamicbackground.html" target="main">Dynamic & Object Based Backgrounds</a></p><hr />

<table border="0">
<tr style="height:16"><td></td></tr>
<tr><td bgcolor="#F0F0F0" style="font-family: monospace;border:1px dotted;color:#808080"><font color="#C00000"><b>Texture.Background(<em>BackgroundTextureIndex</em>)</b><font color="gray">.Load</font> <em>FileName</em></font></td></tr>
Expand All @@ -853,7 +870,9 @@
<tr><td><font color="#808080">
<b><em>FileName</em></b>: The texture file to load, relative to the <b>Object</b> folder.
</font></td></tr></table>
This command loads a background image to be later used by Track.Back.<br /><br /><hr />
This command loads a background image to be later used by Track.Back.<br />
<br><b>NOTE:</b> If a dynamic or object based background is to be used, this must instead point to the appropriate XML file.<br><br />
<hr />
<table border="0">
<tr style="height:16"><td></td></tr>
<tr><td bgcolor="#F0F0F0" style="font-family: monospace;border:1px dotted;color:#808080"><font color="#C00000"><b>Texture.Background(<em>BackgroundTextureIndex</em>).X</b> <em>RepetitionCount</em></font></td></tr>
Expand All @@ -862,6 +881,7 @@
<tr><td><font color="#808080">
<b><em>RepetitionCount</em></b>: The number of times the background image is repeated in a full circle. The default value is 6.
</font></td></tr></table>
<br><b>NOTE:</b> Ignored if using a dynamic or object based background.<br>
<hr />
<br /><table border="0">
<tr style="height:16"><td></td></tr>
Expand All @@ -878,6 +898,7 @@
<b>0</b>: Use a fixed height for the cylinder.<br />
<b>1</b>: Preserve the aspect ratio of the image.
</font></td></tr></table>
<br><b>NOTE:</b> Ignored if using a dynamic or object based background.<br>
<br /><a name="cycle" />
<br /><table><tr style="height: 4px;"><td /></tr></table>
<font size="+1" color="#0080FF">■ 9. The Cycle namespace</font><hr />
Expand Down
135 changes: 135 additions & 0 deletions Documentation/HTML/route_dynamicbackground.html
@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="SHORTCUT ICON" href="../Images/favicon.png" />
<meta name="keywords" content="openBVE,homepage" />
<title>Dynamic and Object Based Backgrounds</title>
</head>
<body style="font-family:sans-serif;font-size:small">
<font size="+2" color="#0080FF">Dynamic and Object Based Backgrounds</font><br />
<table style="border:0px none;margin-left:10pt;margin-right:10pt;">
<tr><td><font size="-1" color="#808080">

</font></td></tr></table>
<br />This page describes the principles and implementation of the XML based background system.<br /><br /><table><tr style="height: 4px;"><td /></tr></table>
<font size="+1" color="#0080FF">■ Dynamic Backgrounds: Basic Principles</font><hr />
<table style="border:0px none;margin-left:10pt;margin-right:10pt;">
<tr><td><font size="-1" color="#808080">

</font></td></tr></table>

openBVE supports several distinct types of backgrounds:<br><br>
<table cellspacing="0"><tr>
<td valign="top">1.</td>
<td>&nbsp;</td>
<td>The original 'texture' based background. This wraps the specified texture around the viewing frustrum a specified number of times.
<br>
</td>
</tr></table>
<br /><table cellspacing="0"><tr>
<td valign="top">2.</td>
<td>&nbsp;</td>
<td>'Dynamic' backgrounds. These are made up of a series of texture based backgrounds, and which are changed at the appropriate time.</td>
</tr></table>

<br /><table cellspacing="0"><tr>
<td valign="top">3.</td>
<td>&nbsp;</td>
<td>'Object' backgrounds. A static object (<b>.b3d , .csv or .x</b>) may be used instead of the standard viewing frustrum.<p><b><i>NOTE:</b></i> No transition effects are supported for object based backgrounds.</td>
</tr></table>
Each individual background which you wish to use must be setup using a background XML file an example of which is shown below:
<br>
<textarea rows="16" cols="110" style="border:2;">
<?xml version="1.0" encoding="utf-8"?>
<openBVE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Background>
<Time>00.00</Time>
<Mode>FadeIn</Mode>
<Repetitions>6</Repetitions>
<Texture>Cloudy.png</Texture>
</Background>
<Background>
<Time>10.00</Time>
<Mode>FadeIn</Mode>
<Repetitions>6</Repetitions>
<Texture>Sunny.png</Texture>
<TransitionTime>10</TransitionTime>
</Background>
</openBVE>
</textarea>
<br>
As you can see, the file is made up of one or more <b>&lt;Background&gt;</b> sections, each of which defines the background to be displayed at the point in time specified by <i>Time</i>.


<table><tr style="height: 4px;"><td /></tr></table>
<font size="+1" color="#0080FF">■ Texture Backgrounds</font><hr />
<table style="border:0px none;margin-left:10pt;margin-right:10pt;">
<tr><td><font size="-1" color="#808080">

</font></td></tr></table>
A texture based background supports the following attributes:
<table border="0">
<tr style="height:16"><td></td></tr>
<tr><td bgcolor="#F0F0F0" style="font-family: monospace;border:1px dotted;color:#808080"><font color="#C00000"><b>&lt;Texture&gt;</b> <em>FileName</em> <b>&lt;&#47;Texture&gt;</b></font></td></tr>
</table><br>
<b>FileName</b> must point to the image which you wish to display as the background texture.<br>
<table border="0">
<tr style="height:16"><td></td></tr>
<tr><td bgcolor="#F0F0F0" style="font-family: monospace;border:1px dotted;color:#808080"><font color="#C00000"><b>&lt;Repetitions&gt;</b> <em>NumberOfRepetitions</em> <b>&lt;&#47;Repetitions&gt;</b></font></td></tr>
</table><br>
<b>NumberOfRepetitions</b> is the number of times the texture is to be wrapped horizontally around the viewing frustrum.<br>
<table border="0">
<tr style="height:16"><td></td></tr>
<tr><td bgcolor="#F0F0F0" style="font-family: monospace;border:1px dotted;color:#808080"><font color="#C00000"><b>&lt;Mode&gt;</b> <em>TransitionMode</em> <b>&lt;&#47;Mode&gt;</b></font></td></tr>
</table><br>
<b>TransitionMode</b> controls the transition effect to be used when this background is shown. Valid values are:<p>
<b>FadeIn</b> : The new background fades in.<br>
<b>FadeOut</b> : The old background fades out.<br>
<b>None</b> : No transition effect is performed. ( Negates <b><em>TransitionTime</em></b> )<br>
<table border="0">
<tr style="height:16"><td></td></tr>
<tr><td bgcolor="#F0F0F0" style="font-family: monospace;border:1px dotted;color:#808080"><font color="#C00000"><b>&lt;TransitionTime&gt;</b> <em>Time</em> <b>&lt;&#47;TransitionTime&gt;</b></font></td></tr>
</table><br>
<b>Time</b> is the time in seconds which the transition effect takes to complete.<br>

<table><tr style="height: 4px;"><td /></tr></table>
<font size="+1" color="#0080FF">■ Dynamic Backgrounds</font><hr />
<table style="border:0px none;margin-left:10pt;margin-right:10pt;">
<tr><td><font size="-1" color="#808080">

</font></td></tr></table>

A dynamic background should simply be made up of multiple <b>Background</b> elements, and takes one further attribute:
<table border="0">
<tr style="height:16"><td></td></tr>
<tr><td bgcolor="#F0F0F0" style="font-family: monospace;border:1px dotted;color:#808080"><font color="#C00000"><b>&lt;Time&gt;</b> <em>GameTime</em> <b>&lt;&#47;Time&gt;</b></font></td></tr>
</table><br>
<b>GameTime</b> is the 24-hour based time at which the transition to this background will begin.<br>
<br>

<table><tr style="height: 4px;"><td /></tr></table>
<font size="+1" color="#0080FF">■ Object Backgrounds</font><hr />
<table style="border:0px none;margin-left:10pt;margin-right:10pt;">
<tr><td><font size="-1" color="#808080">

</font></td></tr></table>

An object based background may also be used. With these, the specified object is rendered with it's <b><em>0,0,0</em></b> co-ordinate centered upon the camera center.<br>
Only <b>.b3d , .csv and .x</b> files with no animation are supported. No transition effects or other attributes are supported.<p>
A sample XML is shown below:<br>
<textarea rows="6" cols="110" style="border:2;">
<?xml version="1.0" encoding="utf-8"?>
<openBVE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Background>
<Object>Background.csv</Object>
</Background>
</openBVE>
</textarea>


</body>

</html>

0 comments on commit 4bc9770

Please sign in to comment.