Skybox - LuisAntonRebollo/Torque-3D-Wiki-Test GitHub Wiki

<SCRIPT SRC="../../../include/tutorial.js" LANGUAGE="JavaScript"></SCRIPT> <SCRIPT SRC="../../../include/prototype.js" LANGUAGE="JavaScript"></SCRIPT> <SCRIPT SRC="../../../include/scriptaculous.js" LANGUAGE="JavaScript"></SCRIPT> <SCRIPT SRC="../../../include/glossaryLookUp.js" LANGUAGE="JavaScript"></SCRIPT> <SCRIPT SRC="../../../include/referenceLookUp.js" LANGUAGE="JavaScript"></SCRIPT> <SCRIPT SRC="../../../include/component.js" LANGUAGE="JavaScript"></SCRIPT> <SCRIPT SRC="../../../include/componentContainer.js" LANGUAGE="JavaScript"></SCRIPT> <SCRIPT>DocImagePath = "../../../";</SCRIPT> <script> // this script chunk is to update the ToC to the current doc and expand it pageID = 89; parent.leftFrame.expandToItem('tree2', 'doc89'); var element = parent.leftFrame.document.getElementById('doc89'); if((element) && (element.className==parent.leftFrame.nodeClosedClass)) { element.className = parent.leftFrame.nodeOpenClass } ; </script> <title>Torque 3D World Editor - Skybox</title> <script type="text/javascript" src="../../../include/wz_tooltip.js"></script>
    <table id="toc" summary="Contents">
      <tbody>
        <tr>
          <td><div id="toctitle">
              <h2>Contents</h2>
              
            <ul>
              <li class="toclevel-1"><a href="#Introduction"><span class="tocnumber">1</span> <span class="toctext">Introduction</span></a></li>
              <li class="toclevel-1"><a href="#Adding_A_Skybox"><span class="tocnumber">2</span> <span class="toctext">Adding A Skybox</span></a>
              </li><li class="toclevel-1"><a href="#Skybox_Properties"><span class="tocnumber">3</span> <span class="toctext">Skybox Properties</span></a></li>
              <li class="toclevel-1"><a href="#Conclusion"><span class="tocnumber">6</span> <span class="toctext">Conclusion</span></a></li>
            </ul></td>
        </tr>
      </tbody>
    </table>
    <table border="0" cellpadding="0" cellspacing="0" width="700">
      <tbody>
        <tr>
          <td width="700"><a name="Introduction" id="Introduction"></a>
            <h2> <span class="mw-headline">Introduction</span></h2>
            <p>Torque 3D uses a cubemap to produce the appearance of a sky in a level. </p>
            <p><br />The cubemap method will allow you to create realistic looking skies that provide a sense of depth to your mission. </p>
            
            <a name="Adding_A_Skybox" id="Adding_A_Skybox"></a>
            <h2> <span class="mw-headline">Adding a Skybox</span></h2>
            <p>To add a new Skybox to a level: , change to the Library tab in the Scene Tree panel; cick on the Level tab; double-click the Environment folder; locate the Sky Box entry then double-click it.</p><br />
            <p><img alt="Image:AddSkyBox.jpg" src="images/AddSkyBox.jpg" border="0" height="321" width="207" /> </p>
            <p><br />The Object Name is what you want your Skybox to be called and will be displayed in the Scene Tree after it is created. The Material box allows you to select the starting material to use when creating the object. </p>
            <br />
            <p><img alt="Image:NameSkybox.jpg" src="images/NameSkybox.jpg" border="0" height="115" width="256" /> </p>
            <p><br />
            </p>
            <a name="Skybox_Properties" id="Skybox_Properties"></a>
            <h2> <span class="mw-headline">Skybox Properties</span></h2>
            <p><br />
            Additional properties can be changed with the Inspector pane. To change the Skybox properties using the Inspector Pane, click the Scene tab, then click the name of your new Skybox object. The Inspector pane will update to display the current properties of your new Skybox. Hover over each section in the image below to see a description of the fields within it:</p>
            <br />
            <img src="images/SBInspector.jpg" width="245" border="0" height="81" onmouseover="Tip('<strong>name</strong>: <i>TypeName</i>. Optional global name of this object.<br><br><strong>id</strong> : <i>TypeCaseString</i>. SimObjectId of this object. Read Only.<br><br><strong>Source Class</strong> : <i>TypeCaseString</i>. Source code class of this object. Read Only.', WIDTH, 450)" onmouseout="UnTip()" > <br />
              <img src="images/SBTransform.jpg" width="245" border="0" height="75" onmouseover="Tip('<strong>position</strong>: <i>MatrixPosition</i>. Object world position.<br><br><strong>rotation</strong> : <i>MatrixOrientation</i>. Object world orientation.<br><br><strong>scale</strong> : <i>Point3F</i>. Object world scale.', WIDTH, 450)" onmouseout="UnTip()" > <br />
              <img src="images/SBSkyBox.jpg" width="245" border="0" height="75" onmouseover="Tip('<strong>material</strong>: <i>TypeMaterialName</i>. The name of a cubemap material for the sky box.<br><br><strong>drawBottom</strong> : <i>TypeBool</i>. If false the bottom of the skybox is not rendered.<br><br><strong>fogBandHeight</strong> : <i>TypeF32</i>. The height (0-1) of the fog band from the horizon to the top of the SkyBox.', WIDTH, 450)" onmouseout="UnTip()" > <br />
               <img src="images/SBMisc.jpg" width="245" border="0" height="39" onmouseover="Tip('<strong>isRenderEnabled</strong>: <i>TypeBool</i>. Only render if true (and if class is render-enabled, too).', WIDTH, 450)" onmouseout="UnTip()" > <br />
                <img src="images/SBSimbase.jpg" width="245" border="0" height="74" onmouseover="Tip('<strong>canSaveDynamicFields</strong>: <i>typeBool</i>. True if dynamic fields (added at runtime) should be saved, defaults to true.<br><br><strong>internalName</strong> : <i>TypeString</i>. Non-unique name used by child objects of a group.<br><br><strong>parentGroup</strong> : <i>TypeString</i>. Group object belongs to.', WIDTH, 450)" onmouseout="UnTip()" /><br />
              <img src="images/SBNamespace.jpg" width="245" border="0" height="76" onmouseover="Tip('<strong>superClass</strong>: <i>TypeString</i>. Links object to script super class (parent) namespace.<br><br><strong>class</strong>: <i>TypeString</i>. Links object to script class namespace.<br><br><strong>className</strong>: <i>TypeString</i>. Legacy version of class field.<br><br>', WIDTH, 450)" onmouseout="UnTip()" ><br />
              <img src="images/SBDynamic.jpg" width="245" border="0" height="101" onmouseover="Tip('<strong>(n/a)</strong>: <i>*</i>. No stock dynamic values.', WIDTH, 450)" onmouseout="UnTip()" > <br />
              <br /><br />
            
            
            <a name="Conclusion" id="Conclusion"></a>
            <h2> <span class="mw-headline">Conclusion</span></h2>
            <p>The Skybox is one of the first objects you should create and add to your level. Not only does it set the mood of your level, but it also gives you a frame of reference while editing. Trying to move around a three dimensional world without a sky or terrain can be disorienting. </p>
            <p>&nbsp;</p>
            <p>If you wish to learn more about the Skybox, you can read through the <a href="../Tutorials/CreatingSky.html">Creating A Sky Tutorial</a> which contains a walkthrough of creating a sun, sky, and clouds for your level.</p>
            <p><br />
            </p>
              
              </td>
        </tr>
      </tbody>
    </table>
Home Back to Top
<script type="text/javascript">

var links = document.getElementsByTagName('a');

for (var i = 0; i < links.length; i++) if (links[i].className == 'livethumbnail') { var img = links[i].getElementsByTagName('img')[0]; img.state = 'small'; img.smallSrc = img.getAttribute('src'); img.smallWidth = parseInt(img.getAttribute('width')); img.smallHeight = parseInt(img.getAttribute('height')); img.largeSrc = links[i].getAttribute('href'); img.largeWidth = parseInt(img.getAttribute('largewidth')); img.largeHeight = parseInt(img.getAttribute('largeheight')); img.ratio = img.smallHeight / img.smallWidth; links[i].onclick = scale; }

function scale() { var img = this.getElementsByTagName('img')[0]; img.src = img.smallSrc;

if (! img.preloaded)
{
	img.preloaded = new Image();
	img.preloaded.src = img.largeSrc;
}

var interval = window.setInterval(scaleStep, 10);
return false;

function scaleStep()
{
	var step = 45;
	var width = parseInt(img.getAttribute('width'));
	var height = parseInt(img.getAttribute('height'));
	
	if (img.state == 'small')
	{
		width += step;
		height += Math.floor(step * img.ratio);
		
		img.setAttribute('width', width);
		img.setAttribute('height', height);
		
		if (width > img.largeWidth - step)
		{
			img.setAttribute('width', img.largeWidth);
			img.setAttribute('height', img.largeHeight);
			img.setAttribute('src', img.largeSrc);
			window.clearInterval(interval);
			img.state = 'large';
		}
	}
	else
	{
		width -= step;
		height -= Math.floor(step * img.ratio);

		img.setAttribute('width', width);
		img.setAttribute('height', height);
		
		if (width < img.smallWidth + step)
		{
			img.setAttribute('width', img.smallWidth);
			img.setAttribute('height', img.smallHeight);
			img.src = img.smallSrc;
			window.clearInterval(interval);
			img.state = 'small';
		}
	}
}			

}

</script>
⚠️ **GitHub.com Fallback** ⚠️