Although SketchUp is an extremely user friendly 3D Model Creating Program using it to Create Textured Models for Import into IMVU can be problematic as SketchUp uses Texture Tiling when applying Materials/Textures to Faces.
This guide sets out to attempt to make the task of correctly applying textures to faces and objects easier, by demonstrating three different methods that can be used to avoid/reduce the Incidences of Tiled Textures.
When you create textures for your IMVU products it is important to remember this rule...
Make sure your textures have dimensions that are Powers of Two! This means the width and the height of your textures have to be a combination of 32, 64, 128, 256, 512.
So, you can have a texture that is 128 x 128 pixels, or 128 x 256, or 256 x 512, and so on. The reason for this is that IMVU optimizes textures before they ever make it to the 3D window of your customers. This means that if you submit a non-standard texture size, the submissions process will squash and stretch your texture to make it conform to these dimensions, and undoubted reduce the quality of your design.
Any texture that is 512x512 or larger will be automatically re-sized by the IMVU code after submission to be 256x256 (or a dimension that more closely resembles your original texture dimensions.) This is done to protect the end IMVU user from waiting forever for your giant texture to download and render. Obviously, this process can make your product look different than you intended so it is better to work with textures that are the final size to begin with. DON'T WORK WITH TEXTURES LARGER THAN 256x256 UNLESS YOU'RE MAKING A 256x512 AVATAR SKIN.
Although it is conceivably possible to submit non-standard texture sizes, the process used to make them conform will potentially ruin the very effect you are trying to achieve. When in doubt, pre-size all your textures to these dimensions and feel confident that your work will look as good in the IMVU Client as it did in the 3D application you created it in.
Making a texture appear translucent or transparent in IMVU is done with the use of an Opacity Map (also called an Alpha Map). Opacity Maps are additional grayscale textures that are imported with your texture file to tell IMVU which areas are transparent, or what degree of transparency.
For every texture that includes a transparent detail, that texture needs to have an additional black and white texture that is the exact same dimension as the original. This additional texture depicts black areas as completely transparent, white areas as completely opaque, and variations of gray as levels of transparency.
Although IMVU are now claiming that a 512 x 512 texture will be resized to 256 x 256 all the evidence that has been assembled by concerned users showed that 512 x 512 textures were being resized to 256 x 512 or 512 x 256 in a random fashion. Also some of the evidence showed that the IMVU Texture Resizing Routines would sometimes turn textures that were submitted as Square into Horizontal or Vertical.
Now for the worst news, the IMVU texture resize routines were found to be using what is often referred to as 'Pixel Resizing using Pixel Approximation'. When moving the pixels around if it found a gap in the texture it was generating it would look at 4 of the Pixels surrounding that gap and use the Average of their Color Values to arrive at the Color for the Missing Pixel.
Now let's look at IMVU's Record on Rule Enforcement.
The Original Rule of Two for Textures allowed Larger Texture Sizes but like the Rule that Opacity Textures had to be the same size as the Diffuse Texture it was associated with it was not really Enforced. Unfortunately because the System would allow Mismatched Diffuse and Opacity Map Sizes there are Numerous Products with Mismatched Diffuse and Opacity Textures in the Catalogue. Then it was decided that the Current Rule of 2, that reduced the Maximum Sizes for Textures, needed to be implemented in the Previewer because of lag problems users were encountering. Now instead of going for the simplest solution; have the previewer check the size of the texture being loaded and rejecting it if it didn't conform, IMVU added in the Texture Resizing Routines. But, at least they did warn you that the texture had been resized unless the original texture was 512 x 512.
Let's come forward a bit more in time - because the rule about Opacity and Diffuse Texture Sizes was being contravened too many times IMVU decided to address the problem and their solution was to add a routine into the Client that resized the opacity texture so that it became the same size as the diffuse texture.
Now let's fast forward to the arrival of Create Mode - the perfect moment in time to Enforce Both Rules and have Create Mode reject non-conforming textures. What did IMVU do, remove the warning that appeared on the Materials Panel whenever it forcibly resized a Diffuse Texture. The only probable change they may have made could have been to add the routines that make the Opacity Texture's size match that of the Diffuse Texture into Create Mode to take some of the Load of the Client.
So now you know some of the reasons why every attempt by the IMVU Engineers to fix or improve the way Opacity Textures are handled causes Products to be Broken. Thanks to the lack of Rule Implementation IMVU allowed Products into the System that it shouldn't have. The Engineers aren't necessarily breaking them - the things were already broken - their Creators just didn't realise it.
IMVU has a Submission File Size Limit of 2Mb and for Mesh Creators about 75% of the submitted file is its Textures, all the Cal3D files (.XMF, .XSF, .XAF, .XPF, .XRF) are in a highly compressible Text Format and so pack down into a relatively small file space. So let's look at Texture File Sizes using a Real World Example - the Carpet_Bereber_Multi Texture that comes with SketchUp. At 256 x 256 it gives a .JPG of 13 Kb. At 512 x 512 it gives a .JPG of 82.7
What we will be Texturing in this Guide is a 24' Cube, a 24' High x 24' Diameter Cylinder and a 24'High x 24' Diameter 8 Sided Polygon. Also we will texture all of them the same Square Ancient Map Texture that was deliberately chosen to make it more obvious what affect each of the stages outlined has on the texture/material.
Before looking at the Three Different Methods that can be used to Texture the Cube, Cylinder and Polygon let's look at some important information.
Not all of them are Square, not all of them are Symmetrical and not all of them are Seamless (Textures that appear to be a Single Texture when tiled). So you really should act as if they don't exist but, as you will discover later you can get round the problem.
The ones in the Colors, Colors-Named and Markers Folders, that come with SketchUp as there is no easy way to size them or export them for use in IMVU.
If it looks bad in SketchUp then it's going to look even worse in IMVU. On very large surfaces/faces, the Floors, Walls and Ceilings of a House for example, Tiling is inevitable. The methods contained in this guide allow you to control the sizes of those Tiles not to Totally Replace Them.
If you are going to Use Photo-Images as Textures then Import them so that they get converted into Textures. The way SketchUp works Photo-Images are not Textures but are a Thin Layer that sits slightly above a Surface. Since there is no Actual Texture on the Model's Geometry both SketchUp and Meshout will treat that Geometry as if it is made up of Un-Textured Faces.
First we have to Import the Texture by Clicking on the 'Create Material…' Icon in the Materials Window. To get the Create Material Window to open, click on the box with a + symbol on it inside the Materials dialog. Then after putting a tick in the box alongside where it says 'Use texture image' SketchUp opens up a search box allowing us to select the Required Texture. After having selected the right one and clicking on the form's Open button SketchUp loads the Texture into the Create Material Window as 'Materail1'. Next we click on the OK Button at the bottom of the 'Create Material' Window to return to the Materials Window.
Before we start applying our Texture there are Two Concepts you should be Aware of when it Comes to Applying Textures in SketchUp:- 'Texturing Faces' and 'Texturing a Container', where a Container is either a Group or Component. When you Texture Faces; either by selecting them individually or collectively, by using the Edit - Select All Command, when you click on a Selected Face with the Pre-Loaded Paint Pot the Texture is only applied to One Face, Usually the White One. However, if you Click on a Closed Group or Component with the Pre-Loaded Paint Pot then the Texture gets Applied to Both the White and Grey Faces using SketchUp's Equivalent of Two Sided Texturing. Now whilst Two Sided Textures are pretty cool they can be a Nuisance since the IMVU Camera can't see through them when it accidently gets behind one or inside a Box that uses them. The other bad news is that the only way to remove the Texture from the Grey Faces in SketchUp is to Remove the Texture from All the Faces and then Re-Texture only the White Faces using the 'Texturing Faces' Method.
Because we used MeshMatic to Generate our Cube, Cylinder and Polygon they are each in a Group but we want to make sure we Texture Only the Geometries Faces and not the Container's (The Group's) Faces. Thankfully there are Two Ways we can do this:- The First One I'm not going to use as it Involves Exploding the Group, Applying the Texture to the Faces and then Forming those Faces back into a Group or Component. The other Method, which I am going to Use, involves something called Drill Down, which is a way of accessing something within a Container, like its Faces, without breaking the Container Apart.
So let's use the Cube to demonstrate how to Drill Down into a Group or Component. First you right click anywhere on the Cube, the Container, and Select the Edit Group Option.
Thanks to the level of Intelligence built into SketchUp you don't really need to know which Type of Container you are Working With as the Right Click Context Menu will only show the Options that apply to the Selected Container.
This will redraw our Selected Item within a Box with a Dotted Outline to show that we are working inside a container. Now, since we want to Texture all of the Cubes Faces we Right Click on one of them and then choose the Select - All on Same Layer Option.
Now we can head on over to the Materials Window and Click anywhere on the Material Swatch/Icon for our Texture, this will change the Cursor to a Paint Pot, and we simply move the mouse till the Paint Pot is over one of the selected faces and Left Click
Oops, We have a Problem: instead of getting just one Copy of the Map on Each Face we have 4. So we need to Resize/Scale the Texture to fit the Faces.
The Texture Position Command we need is on the Right Click Context Menu but if we do it at the Container Level it is not available. So we have to Drill Down into the Container and Right Click on one of its Faces.
Since you need to be precise with the positioning of the Pins you should set the SketchUp Camera so it is Head on to the Face you want to Work With.
What you should be seeing now is a Translucent Version of the Material on top of one of the Cube's Faces along with the Four Positioning Pins. The highlighted, brighter, area is where the face the texture to be sized to is.
The official name of the tool is the Position Texture Tool though during its development, according to Aidan Chopra, the SketchUp Team often referred to it as the Texture Tweaker.
First some things you need to know about the Texture Tweaker - it has 2 Modes:
In Fixed Pin Mode the Pins will be Red, Green, Blue and Yellow whilst in Free Pin Mode all 4 Pins will be Yellow.
To switch between the 2 Modes then either add or remove the Tick from alongside the Fixed Pins Option on its Right-Click Menu. - If the Tick is Present it is in Fixed Pin Mode if it's Absent it is in Free Pin Mode
The other one is that it ONLY works on Flat Faces.
Now let's look at what each Pin Does in Fixed Pin Mode:
Looks complicated doesn't it - thankfully the tool does have its own Undo Command just in case you get it wrong. To gain access to it you simply right click on the texture you are working with. The Undo Command will undo the last action whilst the Reset Command will undo every action carried out on the texture.
Now that we have met the Texture Tweaker let's go through the steps used to position and resize our Texture so that we get only One Copy of it on the Selected Face.
The first step is to use the Red Pin to move the Texture tile containing the pins down into the Bottom Left Corner of the Face, this you do by dragging it till it a small green Icon appears in its bottom left corner to indicate that it is lined up with the Bottom Left Corner of the Face
Next we need to drag the Green Pin into the bottom right corner; because the Green, Yellow and Blue Pins each have Two Uses this Picture shows you what you see as you drag the green pin. As you drag the pin you should always keep one eye on the Compass to make sure it hasn't started to rotate.
Now let's see what it looks like when the Green Pin is in the Bottom Right Corner of the Face.
Just like with the Red Pin you should see a small Green Icon in the bottom right corner of the Texture to indicate that it is lined up with the Bottom Right Corner of the Face.
Thankfully, because the face we are pinning the texture to, just like the texture itself, is square we don't have to play around with the other Two Pins.
If the Face you are Pining a Square Texture to is Rectangular then you would have to use the Blue or Yellow Pins to adjust its height. Of the two the Yellow Pin is the easier/safer to use.
Now we can close the Texture Tweaker, either by using the Done Command on its Right Click Menu or simply clicking somewhere in the workspace other than where the Texture is Displayed.
Finally before closing the Container we need to do Two More Things to the Texture - The 1st is to Make it a Projected Texture and the 2nd is to make it a Unique Texture
Because Textures are Flat 2d Objects they tend to want to remain flat in use, so to get them to follow the Contours of 3D Faces, especially Terrain, you have to use 'Projectable Textures'
Since you can only Pin a Texture to a Flat Rectangular Face, The way to size/scale a texture on a Curved, or for Models used in IMVU any Non-Rectangular, Face, is not to do it on the curved or non-rectangular face but to size/scale the Texture on rectangular face and then use the Texture - Projected Option.
Now to see what happens in the Materials Window after we use the Make Unique Texture option, as you can see it gets a new name '_1', left diag., which I've changed to 'Pinned_Map', right diag., to make it more obvious by typing in a New Name in the Box alongside the Texture Swatch.
So, that's one side done anyone fancy the job of doing the other 5. If you thought the risk of distorting the texture doing just one face was high enough what are the chances of doing all 6 without a mishap.
Now let's see what happens when we load Pinned_Map into the Paint Pot and not only apply it to the Cube's Faces but also those of the Cylinder and Polygon.
Oops - We still appear to have a problem, the Cube is perfect but neither the Cylinder nor Polygon has only one copy of the Map on their Upright Faces.
Since the Texture Tweaker can only be used to size and pin textures to flat surfaces in this section we will discover how to avoid those pesky pins by having SketchUp Scale the Texture for us while we are applying the Texture to a Rectangular Face. Like Method One we are going to apply the Texture to the Front Face of the Cube so you have to Drill Down into it and Select the Front Face.
Then instead of heading over to the Materials Window we head up to the Menu Bar and use SketchUp's File - Import Command.
When the Open File Window pops up we need to make 2 Changes, the first one is to change the drop down menu at the bottom of the form so that it is showing one of the Supported Image Types - I've used the 'All Supported Image Types' one in the example. This will then Make Available the 3 Radio Buttons over on the right of the form, we need to click on the words 'Use as texture' so that the form looks like the one below and then we Navigate to the Folder containing our Texture Images and select the one we want.
After having selected the texture and clicking on the Open Button to get the window to close we see the Texture in the Workspace attached to the Paint Pot.
The first thing we have to do is drag it until its bottom left corner is in the Bottom Left Corner of the Face it is being applied to and Click. SketchUp actually helps you to do this as a Green Dot will pop up with an Endpoint label attached to it.
Then we click on the top right hand corner of the Texture
And drag it towards the Top Right Corner of the Face till we see the Green Dot and the Endpoint Label and Click.
Although I said this was a No Pin Method what you have just done is emulate a Two Pin Variant of the 1st Method.
Before closing the Face we applied it to once again we set it to Projected for use on Non-Rectangular Faces. Now if we go take a look at the Materials Window we will notice something slightly different as it will have the Name of the File we imported.
Now when we pick up our Imported Texture up with the Materials Window Paint Pot it will be applied to every Face we use it on as a 24' Square Texture.
Remember back in Method One where our 24' Texture didn't look right on the Cylinder and Polygon well now that we know a quicker way of Positioning and Sizing a Texture let's solve the problem of the Cylinder. As mentioned in Method One this involves creating a flat face of the required dimensions - one of which just happens to be the Cylinders Circumference. Anyone who studied Geometry in the Pre-Calculator era should recognize the following:- C = pi * D which translates as - The Circumference of a Circle is calculated by Multiplying its Diameter by pi (which everyone who paid attention in class knows is 3.14159 and not something you eat).
Yes I know - it suddenly looks like what is supposed to be an easier method is beginning to look like you have to remember a mathematical constant. Stop Panicking, you don't have to remember it, when you went to the Shops looking for something that you could use all that Fancy Software on you thought you were buying a Computer. It's amazing just how good advertising and marketing can be - because what you actually bought is a Calculator that can run Software. If you open the Calculator that came with the Operating System and switch it into Scientific Mode you will see a button with the pi symbol on it.
Now we already know the Diameter, for our example its 24', for those who are unsure what the diameter is it's a Line drawn from one point on a circle through its centre point to the other side and is Twice the Radius.
To save you having to get your calculator out for our 24' diameter Circle its 75.39822' so all we need to do is get Meshmatic to create us a new Rectangle that is 75.39822' x 24'.
Then we Drill Down into our Rectangle and Select it's Upper Face then we are going something that may astound you, we are going to Import exactly the same Texture as we did when texturing the 24' Square.
First we position it in the Left Hand Corner of the Face as before.
Now if you click on the top right hand corner of the texture and try to drag it to the Top Right Hand Corner of the Face you may think you have got a Problem since you can't do it. SketchUp is in Aspect Ratio Scaling Mode and therefore will not allow us to change the Shape of the Texture from a Square to a Rectangle. If you search through every Menu and Toolbar in SketchUp you will not find a Command or Tool that will Unlock Aspect Ratio Scaling for this Method of Texturing - But Don't Panic, you are looking in the wrong places, the Tool You Need is not accessed using the Mouse its accessed using your Fingers and the Keyboard.
After positioning the Texture into the Bottom Left Hand Corner of the Face you simply enter the Faces Width and Depth separated by a Comma, for us it's 75.39822,24 followed by the Enter/Return Key and SketchUp Sizes the Texture for us.
Then, like with the first Import we make our Texture Projectable and Unique.
Now when we look in the Materials Window we see Two Texture Swatches - One for the 24x24 Texture and one for the Texture we have just created:
Notice how the Material Swatch is now a rectangle and the New Texture we created by Making it Unique has had a #1 added to the Texture's Name.
Next what we have to do is Apply the Texture to the Cylinder and the Polygon. Before doing that I want to bring something to your attention - if you go back to the picture showing the 24' x 24' Texture on all 3 Items you will notice that the top of both the Cylinder and Polygon look fine, it's the texture on their Vertical Faces that are wrong. Now, if we Drill Down into the Container and use the Select - All on Same Layer Option we will be Painting Every Face in the Container, I did this for the Polygon to show what happens. However, because it's easier to do for the Cylinder all I did was Click on its Upright Face so that only it got painted with the New Texture.
As you can see both the Cube and the Cylinder are now Perfectly Textured but the Polygon isn't. I'll leave you to work out why it didn't work on the Polygon and how to fix it. I'll give you one clue - it's easier if you use a Seamless Texture that has a pattern repeat in it.
Take a closer look at the area below where the Texture File Name is.