Projecting Textures onto Objects

You can use the UVProject and the Project3D nodes to project texture images onto your 3D objects. This way, you can add detail, surface texture, or color to your geometry, making the geometry more realistic and interesting.

The UVProject node changes the uv values of the vertices whereas the Project3D node is a material shader.

Projecting Textures with the UVProject Node

The UVProject node sets the uv coordinates for the object, allowing you to project a texture image onto the object. If the object already has uv coordinates, this node replaces them.

1.   Select 3D > Modify > UVProject to insert a UVProject node anywhere after the 3D object you want to modify.
2.   Attach a Viewer to the node to see your changes.
3.   In the node’s controls, use the display dropdown menu to select how you want to view your object in the Viewer while making changes to it.
4.   Connect an Axis or a Camera node to the UVProject node’s axis/cam input. If you connect an Axis node, project the texture UV coordinates onto the object using the axis transform values (that is, translation, rotation, scale, etc.). If you connect a Camera node, do a similar projection as with the axis but also use the camera lens information, such as the aperture.
5.   Adjust the following parameters:

From the projection dropdown menu, select the projection type. Usually, it’s best to select a type that’s close to the object’s surface shape. For example, if your object is a sphere, like a football or a planet, select spherical.

From the plane dropdown menu, select the projection direction: XY, YZ, or ZX to project the texture image along the z, x, or y axis. This dropdown menu is only available if you selected planar as the projection type.

From the projecton dropdown menu, select both, front or back depending on whether you want to project the texture on the front face of the object, its back face or both. The front face of an object is the one facing the camera and similarly the back face is the one furthest away from the camera.

Check view frustum culling if you want the UVProject node to affect only the vertices inside the camera view frustum. Any vertices outside the view frustum are not affected and they still keep their original UV coordinates. Uncheck if you want the node to affect all vertices.

To mirror the texture UV coordinates in the horizontal direction, check invert u. To mirror them in the vertical direction, check invert v.

To scale (stretch or squash) the texture UV coordinates in the horizontal direction, adjust the u scale slider. To scale them in the vertical direction, adjust the v scale slider. The higher the value, the more the texture is stretched.

To change the name of the attribute that’s used as the vertex’s UV coordinates to find the image pixel, enter a name in the attrib name field. If your geometry has more than one set of UV coordinates, you can choose the attribute that suits the projection type.

Projecting Textures with the Project3D Node

The Project3D node projects an input image through a camera onto the 3D object.

1.   Select 3D > Shader > Project3D to insert a Project3D node after the image you want to project. Connect a Camera node to the Project3D node’s cam input.
2.   Insert a 3D geometry node (a Sphere for example) after the Project3D node.
3.   Attach a Viewer to the 3D geometry node to see your changes.
4.   In the node’s controls, use the display dropdown menu to select how you want to view your object in the Viewer while making changes to it.
5.   From the project on dropdown menu, select to project the image on either the front facing, back facing, or both polygons.
6.   To extend the input image at its edges with black, check crop. To extend the image with the edge colors, uncheck crop.
7.   If you want to use ray casting to test the projection and find out which parts of it are occluded, you can use the occlusion mode dropdown. Select:

none - to disable occlusion testing.

self - to tell Project3D that only the geometry connected to it can cause occlusion.

world - to tell Project3D that other objects in the scene can cause occlusion.