How To: Texture maps on 3dvia.com

Our advanced users know that using texture maps is the best way to capture the fine details of a model without sacrificing frame rate. This tutorial will show you what you need to do to upload your models with multiple texture maps to 3dvia.com. We will use the new Studio web player (aka Beta Player) currently in development to showcase our models with bump and specular maps.

Things that you will need:
-Basic understanding of texture maps and shaders. See this Article.
-A DCC (Digital Content Creation) application like Maya, 3D Studio Max or Blender
-3DVIA Studio beta, Downoad it here!
-Collada DAE exporter, found here for Maya and Max.

Export from DCC

There are some very important things to keep in mind when you are working on a model you are going to export.

Texture Paths

First is the texture paths. Have you ever imported a model and had to re-associate the textures to the shader? This is primarily due to the location of the texture files in use by the model on export. They could be located in many folders throughout the original creators computer, folders that don’t exist on your computer! I’ve found that it is a lot easier for me to store my originals in the texture folder and keep my final textures in my data or export ready folder. I assign these final textures to my shaders within my DCC application. I then export my model to the same data / export ready folder that the texture are in, avoiding any relative path issues.

Default Unit Scale

Ever import a model into another application to find that it is really really small, or really huge? This is due to the scale of the working environment being translated to the scale of the target environment. For example, Maya’s default unit is centimeter, and most game engines work in meters, so anything i would import I would have to scale up. Scaling can affect some of the mathematics in play by the engine, like lighting and physics so when ever possible you want to build to an accurate scale. A building 100 units tall in centimeter scale is only 100 centimeters! One of the first things I do now is right after I create a new project folder structure, I change my default unit to meters, I also change all my camera far and near clip planes and import a human sized reference model. This way I know I’m building to an accurate scale, I have a human sized model for comparison and I know my working cameras will avoid any z buffer fighting.

Tip: You can easily create a human sized box (h=1.8m, w=0.6m, d=0.4m) for reference.

Normals

Check your Normals! Each polygonal face has one way up and one way down, make sure your outer surfaces have their normals all pointing out. Game engines render the top surface of each face, the back faces are not rendered unless you specifically set them to!

Triangulate

Lastly, always remember that all final models should be triangulated. Remember that triangulation is a mathematical procedure, so if your model contains many ngons, that is polygons with more than 4 edges, or polygons bent at weird angles or uncapped cylindrical faces, it might be a good idea to triangulate in your DCC app and check for problem areas.

Tip: Always keep a non triangulated(aka Quad) version of your model for ease of editing!

Import into 3DVIA Studio

Import

Down to the fun stuff. You should have a model you have prepared in Maya/Max/Blender, with an assigned blinn shader, and your desired texture maps applied to the proper channels.  Export your model to a DAE file. Start 3DVIA Studio beta and create a new project. Now what we are going to do is drag and drop the DAE file we created from our DCC application onto the 3D View window of the Assemble Tab.

Notice you only need to drag in the DAE file, all textures associated with the file on export will import automatically. That’s it, it’s that simple to add art assets to 3DVIA Studio. After you drop the DAE, a window will pop up verifying all the imported file and their copied to location inside your 3DVIA Studio Project file structure. You can also solve any duplication or even change the location of the local copy of the file from this window.

Lighting

You’ll notice it’s a bit dark. Use the 3DVIA Explorer window, if you don’t see it on your bottom windows you can open it through the menu system, to download a 3 point light setup. Log in, search for light and under Show Only, check mark the Templates category, you should now see “Three Point Lighting“. Just drag this into an empty part of your 3D View to add it to your scene. Thank you Iain for the handy template!

Adding and Editing Texture maps

Now that you are lit, we can take a look at modifying the strength of the texture maps. Right click on your model and let go to see a list of properties including Materials. Select the Material you want to edit and modify the attributes till you reach the desired effect.

Tip: Make sure your materials are using pplblinn or pplblinnbump as their shader type!

Ambient Occlusion

Ambient Occlusion in simple terms adds information about the distance between surfaces and adds shading to represent this effect.  It is simply amazing how simple object look so much more real with Ambient Occlusion.  Many of the models on 3DVIA.com are shown with flat lighting, incorporating ambient occlusion can make the simple look simply amazing!

While ambient occlusion is an advance rendering function, you can create a texture map by hand, faking the shadowy areas between surfaces for a quick effect.

For the next 3 Texture maps refer to the following Scene. Just move your mouse around to navigate, scroll wheel to zoom in and out.

Specularity:

Specularity in a shader is described by three main attributes: size of hotspot, strength of hotspot and color. The hotspot being a point on the model that is fully reflecting light.

In 3DVIA Studio the size of the hotspot is controlled by the Shininess property. This controls the focus of the hotspot, a lower value creates a wide unfocused hotspot while a higher value gives a tighter and sharper hotspot. In my testing a found a decent operational range of 1-1000 but experiment to get the desired material effect.

The strength of the hotspot is controlled by the Specular Level value. A straight forward value, I found a good operational range of .1 to 3, should serve for most effects.

The color value can be used in creative ways. By applying a texture map to this channel you can dictate in fine detail which parts of the texture are shiny and to what degree. You could also choose a drastically different color than your texture or main material color to create an iridescent effect. You could also over saturate the specular color to create a simple gold shader like in this example.

Tip: Make sure the shader type is “pplblinnbump” and RenderSlot should be “eDefaultSlot”!

Bump/Normal

The Bump or Normal map describe how light reacts to a surface.  It creates artificial height and depth information for the lighting engine enhancing a flat mesh with ridges, cracks, raised surfaces and sunken depths.

In 3DVIA Studio the Bump is controlled by a strength value as well as by a Bump Map Mode setting that describes how the bump information is stored in the texture.

Mode 0 = Normal Map xyz = rgb = Nvidia Direct X (DXT5) Normal Map
Mode 1 = Normal Map xy = rg = Grayscale Normal “bump” Map (DXT5_NM)
Mode 2 = Normal Map xy = rA

Displacement

While a bump/normal map sends information to the lighting engine on how to display a surface, a Displacement map sends information of the same type to the rendering engine, creating a much more complex and rich effect.  The render engine is literally creating height geometry over your original mesh, as detailed by your Displacement map during the render process.

In 3DVIA Studio you can turn on Parallax Displacement with a check box inside the Bump Properties section. The Scale and Bias properties will help you refine the effect.

Parallax Displacement requires Normal Map Mode 0 or 1 with additional alpha channel containing depth information.

*Notice* In my testing, Parallax Displacement could be turned on, but not turned off or controlled.  It creates a wonderful effect however, so I included it for completeness.  The Dev Team is aware of this bug, and it should be fixed soon.

Tip: Save your project before turning Parallax Displacement on, in case you don’t like the effect.  This only applies until the Parallax Displacement bug is fixed.

Reflection Map

Reflection is something you can add that instantly increases the believability of metallic or glass surfaces.  It can be simply an image of globular white areas or an approximate image of the surroundings of the object.  The Fresnel effect is like a super shiny area on the surfaces of the model. A complicated effect used to recreate the effect of glossy car paint and similar effects.

Export to 3DVIA.com

After you have created your masterpiece comes the easiest part! All you have to do is find your object in the Project Editor Window. Usually under the Default Stage, right click on your object, select Export To.. then select 3DVIA.com and finally Smart Object.  A window will pop up with the standard model information fields.

Tip: Your first upload of your model should have a blank content ID. If you make changes and attempt to Export again, you’ll see that the content ID is filled in, this is OK as it will update your existing model as opposed to creating a new one. Keep that in mind if you are uploading multiple models, be sure to clear the content ID.

And Presto! You’ve just uploaded your first model on 3DVIA.com with multiple texture maps.

Next up we’ll start looking at how to add behaviors to make these objects interact with the viewer :)


Tagged as: , , , ,

2 Responses »

  1. hi,
    Thank you for your tutorial! Very helpful. My question is, is there a way to import textures with model to 3D Via from SolidWorks? Without using any other software like 3D studio Max etc.?
    Thank you!
    alena

Trackbacks

  1. Tweets that mention How To: Texture maps on 3dvia.com | 3DVIA Blog -- Topsy.com