Planar Textures: 3D Objects & Walls

WCS & VNS

Many users don't have an application for building 3D models with UV-mapped textures. For simple models, textures can easily be applied in VNS. However, you can't just slop any texture on a model surface using defaults and expect it magically look right. You have to tell VNS where and how to apply the textures. Even if you use UV-mapped textures on your 3D models, it's important to understand how planar textures work because you'll use them on Wall Components.

This is not a follow-these-steps-all-the-time tutorial. The intent is to help you understand how planar image textures are applied to 3D Objects and Walls. It's up to the user to come up with a method and workflow that works for their objects and textures.

1. As always, create a simple and fast-rendering project when you're trying to figure out how a feature works. Use the Terrain Generator to create a flat 1-hectare DEM with a 10-meter grid. Name the project something like Flat and save it as-is for future exploratory flights in VNS.

2. Add the Terrace House 3D Object Component from the Component Gallery, placing it at the center of the DEM.

3. We'd like to see the side of the house, too, so change the 3D Object's Rotate Y (heading) value to -45º. Zoom and rotate the perspective camera to fill the view with the house and render a preview. [You can change the Ground Effect Diffuse Color to green if you're tired of default gray.]

4. The Terrace House 3D Object has a 4 Materials: Door, Roof, Walls, and Window. Increase the Walls Material Luminosity to 50% to make it easier to see in shadow.

5. Let's apply the following image texture to the Terrace House Walls Material.

6. Create Texture for the Diffuse Color in the Walls Material Editor.

7. Change the Selected Element to Planar Image, add New Image Object and select the image, and change View From to Cube.

8. Render a preview. The Walls render black where there is no texture but where's the texture? It's there, we just can't see it because it's too small and 'hidden' by the Door Material.

9. Rule 1: Know Your 3D Object. The texture's Center is relative to the 3D Object center in Object Cartesian Coordinate Space. The Texture Axis is perpendicular to the texture plane and coincides with the 3D Object axis. [Remember that 3D Object axes aren't all the same as terrain axes.] If you haven't done it already, check the 3D Object Editor. The Terrace House is about 7.6 m high (Y axis), 5 m wide (X axis), and 8 m deep (Z axis). The center of the object is just above the floor.

10. Meanwhile, back in the Texture Editor, The default size of the texture is 1 m x 1 m x 1 m and the center is at 0,0,0. Increase the Size values to 5 m and render a preview.

11. The texture previously rendered where and was covered by the Door Material. We only see the top half of the larger texture now because it is centered on the Z axis of the object at ground level.

12. Increase the Center Y value to 2.5 m and render a preview. The texture has been raised 2.5 m and its 'bottom' coincides with the base of the house.

13. The texture should render on the side of the house, perpendicular to the X axis. We could rotate the texture but the cleanest solution is to change the Texture Axis to X.

14. Now that we understand what texture Size and Center do, we can Size to Fit. We could have tried this initially but Size to Fit without understanding what Size and Center mean will only cause confusion down the road. Note that the Size and Center values have changed.

15. This render illustrates a couple of problems commonly encountered with 3D Object textures: the model and texture are not appropriate for our use. This house was originally modeled with a single Walls Material for simple color or procedural textures. It works great for that, but not for what we're doing.

16. This render shows a model and textures more appropriate to the task at hand. The model has separate Materials for the front and sides of the house. This allows the use of different front and side wall textures.

17. Let's look at the Window Material. This is the image we'll use to texture it:

18. Create Texture for the Window Material Diffuse Color.

19. Change the Selected Element to Planar Image, add New Image Object and select the image. Render a preview.

20. The windows are black, just as we expected. The default 1-m³ texture image is rendered with its center at X=0 and Y=0, which is behind the door.

21. Size to Fit the texture. The texture has been sized across the entire area of the two windows, including the wall between. As is often the case, the results are not what we want because the model was not created with this texture in mind.

22. Size to Fit is a good a starting point, though. Select Tile Width and reduce Size X to 0.7 m. The size reduction gives the rendered texture the correct height-to-width ratio and Tile Width repeats the texture sideways.

23. That's enough for 3D Objects. Now let's apply our new understanding of planar textures to a Wall Component. Create a Wall Component with 3 vertices south of the house and increase the Panel Top Height to 2 m.

24. Increase the Wall Panel Material Luminosity to 50% to make it easier to see the texture we apply.

25. Let's apply the following image texture to the wall. The image represents an area 1 m wide and 2 m tall.

26. Create a texture for the Wall Panel Material Diffuse Color.

27. Change the Selected Element to Planar Image, add New Image Object, and select the image. We want the texture to wrap around the entire Wall. That means we need to place it using the Vector Aligned Coordinate Space.

28. In Vector Aligned Coordinate Space, the Y axis parallels the vector and Wall, the Z axis is vertical, and X is perpendicular to the Wall formed by the vector. You can already see that the X axis will be the texture axis.

29. Change the Texture Axis to X, Size Y to 1 m, and Size Z to 2 m.

30. By default, the center of the texture is Y=0 and Z=0, which is the start of the vector at the first vertex. In my project the Wall vector points were clicked left to right.

31. To check your point order, open a planimetric camera view and select your Wall vector in the Database Editor to activate it. Click the Select/Show Points tool button from the toolbar to make the Wall vertices visible.

32. Open the Vector Editor to the Selected Points page and select Single Point under Points Selected. The first point will be selected in the real-time views.

33. With this texture we don't have to worry about its center because we're going to repeat the image horizontally and vertically. Tile Width and Height.

 

 

 

Home
Copyright 2007 R Scott Cherba All Rights Reserved