Textures & Texture Maps in SketchUp: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Screen-shot instruction clarified.)
No edit summary
Line 1: Line 1:
Once you get into modelling for [[FlightGear]], you want to use textures. They give the certain touch of reality to every model. This tutorial shows you how to embed your own textures into a [[SketchUp]] (SU) model on Mac and Windows.
Once you get into modelling for [[FlightGear]], you want to use textures. They give the certain touch of reality to every model. This tutorial shows you how to embed your own textures into a [[SketchUp]] model on Mac OS X and Windows.


=== Copyright issues ===
== Copyright issues ==
Any textures found in the SU paint-box are subject to Google copyright. As Flightgear operates under the terms of the [[GNU General Public License]], model makers must not use any item, be it texture, photograph, or code etc., unless it has been released under the terms of GPL.  
Any textures found in the SketchUp paint-box are subject to Google copyright. As FlightGear operates under the terms of the [[GNU General Public License]], model makers must not use any item, be it texture, photograph, or code etc., unless it has been released under the terms of GPL.  


You can see all the details for GPL at: http://www.gnu.org/copyleft/gpl.html  
You can see all the details for GNU GPL at http://www.gnu.org/copyleft/gpl.html .


The only things you can safely use in the SU paint-box are the named colours. I recommend you open the ‘Colours’ or the ‘Colours-Named’ menu, and do everything from there, ignoring the rest of the main paint-box menus. That way you cannot accidentally use something you shouldn’t.
The only things you can safely use in the SketchUp paint-box are the named colors. I recommend you open the "Colors" or the "Colors-Named" menu, and do everything from there, ignoring the rest of the main paint-box menus. That way you cannot accidentally use something you shouldn't.


=== Making your own textures ===
== Making your own textures ==
You can apply either a color or an overlay image (texture) to your model. Colors are easy, simply pick one of the predefined SketchUp colors. But it gets really nice and realistic once you use images. Let's assume you want to overlay ribbed concrete:  
You can apply either a color or an overlay image (texture) to your model. Colors are easy; simply pick one of the SketchUp's predefined colors. But it gets really nice and realistic once you use images. Let's assume you want to overlay ribbed concrete:  


# Take a photo of some ribbed concrete with a digital camera, preferably with some marks to show 1 square metre.  
# Take a photo of some ribbed concrete with a digital camera, preferably with some marks to show 1 square metre.  
# Upload that photo to your computer, then, in your photo processor (iPhoto on Mac; [[GIMP]], [http://www.irfanview.com/ IrfanView] or any other on windows), ‘Crop’ it to show just the square metre, and export it with a good ‘highest detail’/’lowest file size’ compromise (‘export to web’ in iPhoto).
# Upload that photo to your computer, then, in your photo processor (iPhoto on Mac; [[GIMP]], [http://www.irfanview.com/ IrfanView] or any other on windows), ‘Crop’ it to show just the square meter, and export it with a good highest detail/lowest file size compromise ("export to web" in iPhoto).
# During that export procedure, select a pixels size which is compatible with FlightGear - that means its resolution must exist of squares of two (eg. 2<sup>0</sup>=1, 2<sup>1</sup>=2, 2<sup>2</sup>=4, 2<sup>3</sup>=8, 2<sup>4</sup>=16 and so on). That gives you possible resolutions like 2x2, 2x4, 8x32, 256x16 and all the like. If you don't do this, FlightGear can show the image, but only after a resizing procedure, which eats up processor capacity. So you want to do that for FlightGear before applying the image to your model. You can rescale distorted images in SketchUp later again.<br />If this is to be the only texture for this model, try to keep the pixels as small as you can without losing too much detail. If it is to be part of a texture map (see below), you can keep the high pixel count at this stage to preserve detail, though it still needs to be set to the 2, 4, 8 etc.sizes.<br />[[File:EXPORT.png|x356px]]<br />If your photo processor does not allow you to set the pixels, use another like Preview (Mac) or Gimp to pixel size the exported photo.  
# During that export procedure, select a pixels size which is compatible with FlightGear - that means its resolution must exist of squares of two (e.g., 2<sup>1</sup> = 2, 2<sup>2</sup> = 4, 2<sup>3</sup>=8, 2<sup>4</sup> = 16, etc.). That gives you possible resolutions like 2x2, 2x4, 8x32, 256x16 and all the like. If you don't do this, FlightGear can show the image, but only after a resizing procedure, which eats up processor capacity. So you want to do that for FlightGear before applying the image to your model. You can re-scale distorted images in SketchUp later again.
# Save that photo to your desktop.
# Save that photo to your desktop.


==== Semi-transparent textures ====
If this is to be the only texture for this model, try to keep the pixels as small as you can without losing too much detail. If it is to be part of a texture map (see below), you can keep the high pixel count at this stage to preserve detail, though it still needs to be set to the powers-of-two sizes.
[[File:Textures_transparent.png|thumb|Semi-transparent textures]] Semi-transparent textures are a powerful tool. Especially when you want to model mesh, banisters, scaffolding etc., you can use semi-transparent textures to minimize the complexity of the model. Like in the model to the right.


It's the [http://scenemodels.flightgear.org/modeledit.php?id=220 gasometer] by Jon Stockill. To simulate the framework, he uses a minimal image that is transparent except for the metal parts:
[[File:EXPORT.png]]
 
If your photo processor does not allow you to set the pixels, use another like Preview (Mac) or GIMP to pixel size the exported photo.
 
=== Semi-transparent textures ===
[[File:Textures_transparent.png|thumb|Semi-transparent textures]]
Semi-transparent textures are a powerful tool.  When you want to model mesh, banisters, scaffolding, etc., you can use semi-transparent textures to minimize the complexity of the model. Like in the model to the right.
 
A good example is the [http://scenemodels.flightgear.org/modelview.php?id=220 gasometer] by Jon Stockill. To simulate the framework, he used this minimal image that is transparent except for the metal parts:


[[File:Textures_tranparent2.png]].
[[File:Textures_tranparent2.png]].


Another good example is the roof structure of the [http://scenemodels.flightgear.org/modeledit.php?id=795 A380 hangar] in Frankfurt (EDDF) by Christian Schmitt.
Another good example is the roof structure of the [http://scenemodels.flightgear.org/modelview.php?id=795 A380 hangar] at [[EDDF]] by Christian Schmitt.


=== Loading your texture into SketchUp ===
== Loading your texture into SketchUp ==
Now you need to read that texture into SketchUp.  
Now you need to read that texture into SketchUp.  


First you open the new texture dialog:
First you open the new texture dialog:
* '''Mac:''' Select ‘New Texture’ from the ‘Colour’ menu inside the ‘Colours- Named’ section of the SU paint-box.<br />
* '''Mac:''' Select ‘New Texture’ from the ‘Colour’ menu inside the ‘Colours- Named’ section of the SketchUp paint-box.<br />
* '''Windows:''' Click the paint bucket (or select <tt>Window > Materials</tt>), then click the 'Create Material...' button.
* '''Windows:''' Click the paint bucket (or select <tt>Window > Materials</tt>), then click the 'Create Material...' button.


Line 36: Line 43:
Select that, and you should be presented with the means to select the path to your photo (in this example we have put it on our desktop).  
Select that, and you should be presented with the means to select the path to your photo (in this example we have put it on our desktop).  


Select your photo, and click ‘Open’. This will take it into the paint-box with whatever name you saved it with.
Select your photo, and click "Open". This will take it into the paint-box with whatever name you saved it with.


<div style="float:left; clear:left; margin:1em 5px 0px 0px; background-color:white; padding:3px; border:1px solid silver;">[[File:SelectPicture.png |x356px]]</div><div style="float:left; margin:1em 5px 0px 0px; background-color:white; padding:3px; border:1px solid silver;">[[File:Textures2_win.png|x356px]]</div><br clear="left" />
<div style="float:left; clear:left; margin:1em 5px 0px 0px; background-color:white; padding:3px; border:1px solid silver;">[[File:SelectPicture.png |x356px]]</div><div style="float:left; margin:1em 5px 0px 0px; background-color:white; padding:3px; border:1px solid silver;">[[File:Textures2_win.png|x356px]]</div><br clear="left" />


In the SU paint-box you can give your new texture a unique name. Try to make this name relevant to the model you are making. This could be useful in reuniting them if ever the model and its texture get separated. For use in FlightGear there should not be any gaps in the texture name.  
In the SketchUp paint-box you can give your new texture a unique name. Try to make this name relevant to the model you are making. This could be useful in reuniting them if ever the model and its texture get separated. For use in FlightGear there should not be any gaps in the texture name.  


[[File:Name&Size.png]]  
[[File:Name&Size.png]]  


You need to set the size of your new concrete texture to 1x1 m. This means: If the area you are using the texture in is bigger than 1 metre square, the texture will be repeated every metre in every direction, until the whole target area is textured.
You need to set the size of your new concrete texture to 1x1 m. This means: If the area you are using the texture in is bigger than 1 meter square, the texture will be repeated every meter in every direction, until the whole target area is textured.


Applying the texture is the same as painting an area.  
Applying the texture is the same as painting an area.  
Line 52: Line 59:
If your texture is a specific item, e.g. a window, the picture of the window will be presented again and again. It will be necessary to position the texture to place the required section in the target area. I describe how to do this later.  
If your texture is a specific item, e.g. a window, the picture of the window will be presented again and again. It will be necessary to position the texture to place the required section in the target area. I describe how to do this later.  


'''TIP:''' ''When making a texture of an item like a door, or window, it is a good idea to include it’s measurements in the individual texture name. The name of each item in the paint- box appears when you hold your mouse pointer over it. This helps when marking up your model with its target areas.''
{{itip|When making a texture of an item like a door, or window, it is a good idea to include it’s measurements in the individual texture name. The name of each item in the paint- box appears when you hold your mouse pointer over it. This helps when marking up your model with its target areas.}}


<div style="float:left; clear:left; margin:1em 5px 0px 0px; background-color:white; padding:3px; border:1px solid silver;">[[File:SizeinName.png|x356px]]</div><div style="float:left; margin:1em 5px 0px 0px; background-color:white; padding:3px; border:1px solid silver;">[[File:Textures3_win.png|x356px]]</div><br clear="left" />
<div style="float:left; clear:left; margin:1em 5px 0px 0px; background-color:white; padding:3px; border:1px solid silver;">[[File:SizeinName.png|x356px]]</div><div style="float:left; margin:1em 5px 0px 0px; background-color:white; padding:3px; border:1px solid silver;">[[File:Textures3_win.png|x356px]]</div><br clear="left" />


'''TIP:''' ''When you first start modelling, there is a lot of satisfaction to be had from making very detailed models. The downside of that is the large file size produced. This affects loading times in FlightGear.''
{{itip|When you first start modelling, there is a lot of satisfaction to be had from making very detailed models. The downside of that is the large file size produced. This affects loading times in FlightGear.}}


''By all means make your detailed model - take a snap for your own collection - then try to minimise the face count (MaverickAlex has produced a tutorial on this, see: [[Howto: Decrease the number of faces]]''
By "all" means make your detailed model - take a snap for your own collection - then try to minimize the face count (MaverickAlex has produced a tutorial on this, see: [[Howto: Decrease the number of faces]].
   
   
''Alternatively, you could keep your detailed model, and make a copy of the file to reduce the file size on. This copy would be the one you send to the [[FlightGear Scenery Database|scenery database]].''
Alternatively, you could keep your detailed model, and make a copy of the file to reduce the file size on. This copy would be the one you send to the [[FlightGear Scenery Database|scenery database]].
   
   
'''TIP:''' ''You could save a lot of file space by snapping the whole side of your model and making a texture of it to keep in all your hard earned detail, but with only one face on the texture to be counted.''
{{itip|You could save a lot of file space by snapping the whole side of your model and making a texture of it to keep in all your hard earned detail, but with only one face on the texture to be counted.}}


=== Correct display of texture colors in the AC file ===
== Correct display of texture colors in the AC file ==
Later, when your model is done and you [[SketchUp to AC3D exporter|export it to AC format]], the textures will be defined in that AC file. There, the RGB settings should be <tt>rgb 1 1 1</tt> for a correct display of the texture colors ([[AC files: Basic changes to textures and colors]]). To insure that this will be done automatically, you should set the color of the texture to <tt>rgb 1 1 1</tt> already in SketchUp. The texture will appear whiteish in SketchUp, but correctly after export. You do that during the definition of the texture. In SketchUp, <tt>rgb 255 255 255</tt> is the same as <tt>rgb 1 1 1</tt> in the AC file:
Later, when your model is done and you [[SketchUp to AC3D exporter|export it to AC format]], the textures will be defined in that AC file. There, the RGB settings should be <tt>rgb 1 1 1</tt> for a correct display of the texture colors ([[AC files: Basic changes to textures and colors]]). To insure that this will be done automatically, you should set the color of the texture to <tt>rgb 1 1 1</tt> already in SketchUp. The texture will appear whitish in SketchUp, but correctly after export. You do that during the definition of the texture. In SketchUp, <tt>rgb 255 255 255</tt> is the same as <tt>rgb 1 1 1</tt> in the AC file:


[[File:AC_white.jpg]]
[[File:AC_white.jpg]]


=== Making a texture map ===
== Making a texture map ==
If you only have one texture in a model there is no need to make a texture map, but if there are to be several textures used in the model, or, as in the Caribbean scenery project, the same textures used in many models - rather than have to forward/use multiple texture files, it is better to make a texture map.  
If you only have one texture in a model there is no need to make a texture map, but if there are to be several textures used in the model, or, as in the Caribbean scenery project, the same textures used in many models - rather than have to forward/use multiple texture files, it is better to make a texture map.  


[[File:Picture_2.png ]]
[[File:Picture_2.png ]]


This can all be accomplished in Sketchup - though some modellers prefer to do it in a separate application.  
This can all be accomplished in SketchUp - though some modelers prefer to do it in a separate application.  


'''NOTE:''' A texture map only works for textures which are used only once in each place. Textures that are used as tiles, i.e. appear many times next to each other to form a pattern (as in the gasometer example above), must stand alone. Otherwise the whole texture map would have to be the tile - which you probably do not want.
'''NOTE:''' A texture map only works for textures which are used only once in each place. Textures that are used as tiles, i.e. appear many times next to each other to form a pattern (as in the gasometer example above), must stand alone. Otherwise the whole texture map would have to be the tile - which you probably do not want.


'''TIP:''' ''I do it all in SU to ensure the measurements are correct and match my SketchUp model.''
'''TIP:''' ''I do it all in SketchUp to ensure the measurements are correct and match my SketchUp model.''


First you need to make each of the textures you are going to use in your model. You can produce textures (as described above) from photos, or from drawings you may have done in SU, or another application (eg. iWorks or Appleworks for Mac). You can use quite high resolution pics or drawings for these, thus keeping more detail, as you will be minimising the pixels on the final map stage.
First you need to make each of the textures you are going to use in your model. You can produce textures (as described above) from photos, or from drawings you may have done in SketchUp, or another application (eg. iWorks or Appleworks for Mac). You can use quite high resolution pics or drawings for these, thus keeping more detail, as you will be minimizing the pixels on the final map stage.


You will not be able to use the repeats, as described in the previous section, so the size of each texture ‘Target’ area needs to be noted.  
You will not be able to use the repeats, as described in the previous section, so the size of each texture ‘Target’ area needs to be noted.  
Line 134: Line 141:
You could play safe and just make the texture more than large enough to cover the roof size, but that way you would be making the file size bigger, which is to be avoided because of loading speed.''  
You could play safe and just make the texture more than large enough to cover the roof size, but that way you would be making the file size bigger, which is to be avoided because of loading speed.''  


Now use the SU 'Square' tool to cover your square of targets as tightly to the edges as possible. Make this a perfect square, even if you have to include some of the background between the targets.  
Now use the SketchUp 'Square' tool to cover your square of targets as tightly to the edges as possible. Make this a perfect square, even if you have to include some of the background between the targets.  


[[File:PerfectSquare.png]]
[[File:PerfectSquare.png]]
Line 140: Line 147:
'''TIP:''' ''You can see an unwanted guide line in the above picture (Bottom right, above the word ‘Square’). If you make the individual targets into a group after you have textured them, you can easily move your square beyond the guide lines or make the guide lines and axes invisible during this exercise.''  
'''TIP:''' ''You can see an unwanted guide line in the above picture (Bottom right, above the word ‘Square’). If you make the individual targets into a group after you have textured them, you can easily move your square beyond the guide lines or make the guide lines and axes invisible during this exercise.''  


Use the SU measuring tool to measure your square. Note the measurements down for future use.  
Use the SketchUp measuring tool to measure your square. Note the measurements down for future use.  


{| class="prettytable"
{| class="prettytable"
Line 168: Line 175:
[[File:TargetSquares.png]]
[[File:TargetSquares.png]]


Use the inside corner of each of those corner squares as the limits of your screen-shot (Photo). In this example the photo will be equal to 4.7m x 4.7m when you take it back into the SU paint-box as a new texture. Use a photo processing application (like Gimp, Photoshop, (for Macs Preview or iPhoto will do as well)) to make the pixels a square of two. Keep the squared pixel size to the smallest one that keeps the necessary detail in the textures. Bear in mind most models are viewed as a 'flypast', which means at a distance. Try a couple of sizes to decide which will do the job effectively.
Use the inside corner of each of those corner squares as the limits of your screen-shot (Photo). In this example the photo will be equal to 4.7m x 4.7m when you take it back into the SketchUp paint-box as a new texture. Use a photo processing application (like Gimp, Photoshop, (for Macs Preview or iPhoto will do as well)) to make the pixels a square of two. Keep the squared pixel size to the smallest one that keeps the necessary detail in the textures. Bear in mind most models are viewed as a 'flypast', which means at a distance. Try a couple of sizes to decide which will do the job effectively.
   
   
Go back to the SU paint-box and make a new texture from your photo. Make sure this new texture has a unique name, and the width and height of this texture is equal to the square you covered the targets with (hopefully you noted the measurement earlier).  
Go back to the SketchUp paint-box and make a new texture from your photo. Make sure this new texture has a unique name, and the width and height of this texture is equal to the square you covered the targets with (hopefully you noted the measurement earlier).  


Then use that new texture to texture your model with the following method:  
Then use that new texture to texture your model with the following method:  
# In the SU paint-box, select your new texture.  
# In the SketchUp paint-box, select your new texture.  
# Take the paint pot to your target area and click.  
# Take the paint pot to your target area and click.  
# When you have clicked the paint pot onto your target area, right-click: this should give you the option to position the texture.  
# When you have clicked the paint pot onto your target area, right-click: this should give you the option to position the texture.  
# Another right-click at this stage will give you the option to rotate the texture if necessary. Do not forget to click 'Done' (right-click menu, or ctrl+click menu for Macs) when you have got the correct part of the texture map in your target area.  
# Another right-click at this stage will give you the option to rotate the texture if necessary. Do not forget to click {{button|Done}} (right-click menu, or ctrl+click menu for Macs) when you have got the correct part of the texture map in your target area.  


Work your way round the model until you have placed all of the required textures.  
Work your way round the model until you have placed all of the required textures.  


Remember to erase the duplicate square of targets in your SU file before you export to .ac.  
Remember to erase the duplicate square of targets in your SketchUp file before you export to .ac.  
 
When you [[SketchUp to AC3D exporter|export your SU file to .ac format]], there will only be one texture file.
 
'''TIP:''' ''Leave deleting the square until you have placed all of it’s constituent parts on your model. This makes it easier to add in any textured parts of your model which you had missed out. If you erased the square before this stage, you would have to start completely again from scratch, or have an extra texture file with that model. (It is a pride thing I guess).''


That is it.  
When you [[SketchUp to AC3D exporter|export your SketchUp file to .ac format]], there will only be one texture file.  


I hope this tutorial is helpful to you.
{{itip|Leave deleting the square until you have placed all of it’s constituent parts on your model. This makes it easier to add in any textured parts of your model which you had missed out. If you erased the square before this stage, you would have to start completely again from scratch, or have an extra texture file with that model. (It is a pride thing I guess).}}


VicMar


(Special thanks to Alex Park, who showed me how to make texture maps.)
''This tutorial was written by VicMar, with special thanks to Alex Park, who showed how to make texture maps, and D-79 for the PC details to match the Mac instructions)
(And David (D-79) for the PC details to match my Mac instructions)


[[Category:Howto]]
[[Category:Howto]]
[[Category:Scenery enhancement]]
[[Category:Scenery enhancement]]

Navigation menu