Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
93 changed files
with
6,283 additions
and
4,127 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> </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> </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> </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><Background></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><Texture></b> <em>FileName</em> <b></Texture></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><Repetitions></b> <em>NumberOfRepetitions</em> <b></Repetitions></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><Mode></b> <em>TransitionMode</em> <b></Mode></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><TransitionTime></b> <em>Time</em> <b></TransitionTime></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><Time></b> <em>GameTime</em> <b></Time></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> |
Oops, something went wrong.