Overview | All Modules | Tutorial | User's Guide | Programming Guide

COVISE Online Documentation


Module category: Tools



ImageToTexture

ImageToTexture generates a texture for a polygon input object given a TIFF file. The default mapping that relates the geometry point coordinates with the texture coordinates is a simple projection onto the XY plane. You may introduce your own mapping if the module gets a vector field as input object.

ImageToTexture.png

Parameters

Name Type Description
RST_file Browser The path of a TIFF file.
ImageSize Choice This parameter adjusts the size of the image relative to the size of the geometric object. The image is taken to be a rectangle on the XY plane. You may manually adjust the image size with other parameters, or tell the module to adjust the image size to the projection of the geometry bounding box onto the XY plane. The third option reads in the geometrical hints contained in the TIFF file in centimeters.
ImageOrientation Choice The Free option means that the resulting orientation is that which minimises shear strains of the image. Portrait and Landscape have the usual meaning assuming the Y axis is vertical and the X one horizontal.
PhysimageW Scalar X image dimension. This parameter is active if in ImageSize you have selected manual image size adjustment.
PhysimageH Scalar Y image dimension. This parameter is active if in ImageSize you have selected manual image size adjustment.
XPixelImageSize Scalar Texture pixel resolution in the X direction. Has to be a power of two if you use COVER later.
YPixelImageSize Scalar Texture pixel resolution in the Y direction. Has to be a power of two if you use COVER later.
GroupGeometry Boolean This parameter is only relevant if the input geometry is structured with a set of several polygon objects. If the value is true, then the module will not generate an image of each polygon object; put it another way, you will see a single image for the whole set of objects.
MirrorImage Boolean This parameter is relevant if the image is smaller than the geometry. In this case we have to continue somehow the image by some sort of tessellation. If the value is true, then additional images are alternatively flipped.

Input Ports

Name Type Description
requiredGeometryIn Polygons Input polygons for which you want to generate a texture.
optionalShiftIn Vec3 Optional vector field which determines the motion of the input geometry. If you are using this port, the components of this vector field are subtracted from the point coordintes of the input polygons and the resulting positions are mapped onto the XY plane by simply ignoring the Z coordinate.
optionalinFileName Text The path written in the browser parameter of the module may be overridden through a Text object. If this object has additionally the attribute IMAGE_TO_TEXTURE, the values of all other module parameters may be overridden, the same way as Transform .

Output Ports

Name Type Description
outputTextureOut Texture The output texture.

Examples

Figure: covise/net/examples/ImageToTexture.net
ImageToTextureMap1.png

In the first example we show a dynamic geometry. As the geometry moves the image moves with it. In order to achieve this effect, we use the displacement information at the second port.

Figure: The image is dragged by the material motion.
ImageToTextureRend1.png

Figure: covise/net/examples/ImageToTexture2.net
ImageToTextureMap2.png

In the second example we want to illustrate the effect of the parameter GroupGeometry and of size adjustment. The geometry is a set with 4 Polygon object. When the value of GroupGeometry is true (default), the image is mapped once onto the whole geometry. This effect is seen in the first renderer image. If the value of this parameter is false, then we get the second image. Note that here the geometry is used separately for each Polygon object. The third image has the default value for this parameter, i.e. true. If we are seeing here many eyes, it is because we are no longer fitting the image size to that of the geometry. In this case, we have manually set the image size to an inferior value, that is why we have to replicate the image in order to create a texture for the whole geometry.

Figure: GroupGeometry is true, the image size is that of the geometry.
ImageToTextureRend2_1.png

Figure: GroupGeometry is false.
ImageToTextureRend2_2.png

Figure: GroupGeometry is true, but the image size has been manually adjusted to an inferior value.
ImageToTextureRend2_3.png


Authors: Martin Aumüller, Ruth Lang, Daniela Rainer, Jürgen Schulze-Döbold, Andreas Werner, Peter Wolf, Uwe Wössner
Copyright © 1993-2022 HLRS, 2004-2014 RRZK, 2005-2014 Visenso
COVISE Version 2021.12