Difference between revisions of "Building structures"
(Working on the gallery.) |
(Added to gallery.) |
||
Line 100: | Line 100: | ||
<gallery mode=nolines class="center"> | <gallery mode=nolines class="center"> | ||
− | Image:Block_0_01.png|<center>Block with no textures</center> | + | Image:Block_0_01.png|<center>Block with no textures<br>Daytime</center> |
− | Image:Block_Ball_01.png|<center> | + | Image:Block_Ball_01.png|<center>Ball<br>Daytime</center> |
− | Image:Block_Ball2_01.png|<center> | + | Image:Block_Ball2_01.png|<center>Ball2<br>Daytime</center> |
− | Image:Block_Ball3_01.png|<center> | + | Image:Block_Ball3_01.png|<center>Ball3<br>Daytime</center> |
− | Image:Block_Cape17_Day.png|<center> | + | Image:Block_Cape17_Day.png|<center>Cape17<br>Daytime</center> |
− | Image: | + | Image:Block_Cape18_Day.png|<center>Cape18<br>Daytime</center> |
+ | Image:Block_Cape19_Day.png|<center>Cape19<br>Daytime</center> | ||
+ | Image:Block_Cape20_Day.png|<center>Cape20<br>Daytime</center> | ||
+ | Image:Block_Cape21_Day.png|<center>Cape21<br>Daytime</center> | ||
+ | Image:Block_Cape22_Day.png|<center>Cape22<br>Daytime</center> | ||
+ | Image:Block_Cape23_Day.png|<center>Cape23<br>Daytime</center> | ||
+ | Image:Block_Concrete_Day.png|<center>Concrete<br>Daytime</center> | ||
+ | Image:Block_Concrete1_Day.png|<center>Concrete1<br>Daytime</center> | ||
+ | Image:Block_Door01_Day.png|<center>Door01<br>Daytime</center> | ||
+ | Image:Block_Fcd01_Day.png|<center>Fcd01<br>Daytime</center> | ||
+ | Image:Block_Fcd01_Night.png|<center>Fcd01<br>Nighttme</center> | ||
+ | Image:Block_Fcd02_Day.png|<center>Fcd02<br>Daytime</center> | ||
+ | Image:Block_Fcd02_Night.png|<center>Fcd02<br>Nighttime</center> | ||
+ | Image:Block_Fcd03_Day.png|<center>Fcd03<br>Daytime</center> | ||
+ | Image:Block_Fcd03_Night.png|<center>Fcd03<br>Nighttime</center> | ||
+ | Image:Block_Fcd04_Day.png|<center>Fcd04<br>Daytime</center> | ||
+ | Image:Block_Fcd04_Night.png|<center>Fcd04<br>Nighttime</center> | ||
+ | Image:Block_Fcd05_Day.png|<center>Fcd05<br>Daytime</center> | ||
+ | Image:Block_Fcd05_Night.png|<center>Fcd05<br>Nighttime</center> | ||
</gallery> | </gallery> |
Revision as of 14:15, 24 November 2023
A Block is an object that can be used to create structures on bases. It is a cube or rectangular prism consisting of three dimensions, length, width, and height, and it can use any of the textures that are listed in the base.cfg file (Orbiter\Config\base.cfg), although some may not be appropriate for a block.
The description of a block is written into the config file of a base (Orbiter\Config\<Planet>\Base\<BaseConfig.cfg>).
Textures
Textures used for building a block are found in the directory Orbiter\Textures and are listed in the file Orbiter\Config\Base.cfg. Note that there are a number of textures in the \Textures directory that are not listed in the Base.cfg file that could be used, so, if you like type in the filename without the extension into the Base.cfg file so you can use them in building structures, such as door01, but, not, let's say, Exhaust.
So, let's build a block building. If you created
Open the Bonneville.cfg file (Orbiter\Config\Earth\Base\) in your favorite text editor such as Notepad or Notepad+. Place your cursor at the end of the line BEGIN_OBJECTLIST and press Enter. That provides a line to type in an object.
BLOCK POS 0 0 -50 SCALE 1 1 1 ROT 330 TEX1 0 0 0 TEX2 0 0 0 TEX3 0 0 0 END
Save the file, you can keep the file open as we will be editing this block. Exit the scenario, then re-launch it. Now, you will see a small cube sitting on the ground about 100 meters in front of you. In the scenario editor, change the time to about 18:00 hours, that puts the Sun behind you so you can see what effect shadows have.
Now note the block is white on the side facing you. If you moved your ship so you could see one of the sides, you will note that it is gray. Orbiter applies shading for shadows.
The block should look something like this:
This block is a cube 1 meter cubed. Now, let's edit the block in Bonneville.cfg as follows:
BLOCK POS 0 0 -50 SCALE 1 1 1 ROT 330 TEX1 Fcd01 1 1 TEX2 Fcd03 1 1 TEX3 Roof01 1 1 END
Again, save the scenario, exit to the Launchpad and re-launch. Now, your block should look like something like this.
Fcd01 produces a wall with four windows wide and four windows tall all into that one meter square side, and Fcd03 produces a wall with three sets of windows wide and three tall. The number of items produced on a face vary from one to another Fcd.
Components of a block
When building a block, the first line must be BLOCK.
The next line describes the position of the block in relation to the center of the base. If you type POS 0 0 0, the center of the block will sit right on the center of the base.
For the position parameter, POS must be the first part of the line.
The first number X is the distance north or south of center of the base (north is -, south us +) in meters.
The second number Y is the elevation above the terrain or base plane the bottom of the block sits, above is +, below is -.
The third number Z is the position in meters east +, or west - of the center of the base.
The next line starts with SCALE. This indicates the size of the block in the X, Y, and Z axis. So, if you type in SCALE 1 2 3, that makes the block 1 meter wide, 2 meters tall, and 3 meters front to back. Orbiter will stretch the texture to fill the dimensions called out.
The next line is TEX1followed by three parameters, the first 0 or which texture is called out from Base.cfg, the first number is how many iterations of the texture is squeezed into the width, and the third number is how many iterations is squeezed into the height. This applies to the front face and the back face of the block.
The next line is TEX2 followed by three parameters, the same as TEX1, but applies to the left and right faces of the block.
The next line is TEX3 followed by three parameters, the same as TEX1 and TEX2, but applies to the top, or roof of the block.
The first term of each TEX callout is the name of a texture from Base.cfg. Any one can be used in each, but, using Runway1 or Lpad02 would probably not be appropriate.
Now, let's build two blocks each with different parameters and compare.
Replace the existing block with the following:
BLOCK POS 0 0 -50 SCALE 1 2 3 ROT 330 TEX1 Fcd01 1 1 TEX2 Fcd01 1 1 TEX3 Roof01 1 1 END BLOCK POS -4 0 -50 SCALE 1 2 3 ROT 330 TEX1 Fcd01 1 2 TEX2 Fcd01 2 1 TEX3 Roof01 2 2 END
After launching Orbiter, you will see two blocks, the same size, both use Fcd01 for all sides, but the windows are different.
For the left block, SCALE 1 2 3 creates a block 1 meter wide, 2 meters tall, 3 meters deep. TEX1 Fcd01 1 1 creates one Fcd01 wide, 1 Fcd01 tall stretching the Fcd to fit the height. The same with TEX2 and TEX3, TEX3 calling out a Roof design.
For the right block, SCALE 1 2 3 does the same, but TEX1 Fcd01 1 2 creates one Fcd01 wide and two Fcd01 tall making twice as many windows. TEX2 2 1 creates four windows high and eight windows wide on the side faces. TEX3 2 2 creates a roof with twice as many seams.
A TEX parameter can use decimal numbers in the second and third parameter. For example, TEX1 1 1.5 will get you 1.5 times as many Fcd01 tall, which creates 6 windows tall. Remember each Fcd entity may have different number of windows or doors, etc., so you need to vary the math.
Also, note that many of the textures, particularly Fcd ones will have a texture for daytime and another for nighttime, showing some lights through the windows. You can see this by changing your time of day in the scenario to nightime.
Gallery
In my Block.cfg I have added all textures from the Orbiter\Textures\ folder that can be used for blocks and shown below including night views where appropriate. So, you don't need to keep making different ones in your base to see what they look like. These blocks will be 1 meter each dimension. You can scale as needed in your base.