texture_wave
Synopsis
The texture_wave_field macro applies a texture with a moving wave function in the alpha channel to a field.
Input Ports
| Name |
Type |
Description |
|
| in_fld |
Field |
Data that is to be textured. |
| in_image |
Image_ARGB |
Image that is to be used for texturing. |
|
Parameters
The texture_wave_field macro does not have any parameters of its own. Please see the texture_wave documentation for a full description of the parameters of that macro.
Output Ports
| Name |
Type |
Description |
|
| out_fld |
Field |
Field data with generated UV coordinates. |
| out_image |
Image_ARGB |
Image with generated pulse function. |
| out_obj |
GDobject |
Directly renderable output object with alpha blended texture mapping. |
|
Description
The texture_wave_field macro generates a pulse-wave function in the alpha channel of an existing ARGB image field and applies it to the input field data. It does this by combining two macros. The texture_wave macro is used to generate a pulse-wave function and insert it into the alpha channel of an existing image. The Scalar2Texture macro is used to generate UV coordinate data from scalar node data and apply the generated texture to the input field data. This results in three outputs; the image with generated pulse-wave function, the field data with generated UV coordinate data and a renderable GDobject that contains the field data and texture image. The renderable GDobject is the output that should normally be used.
By using this module to apply an alpha blended texture to existing field data a number of very interesting visualizations can be seen that cannot be easily achieved by other means. Animating the textures can lead to further visualizations. However it should be noted that animating textures on complex fields is a graphically intensive task and for decent results good hardware texture-mapping support is essential.
A conference paper fully describing this technique can be obtained by contacting Ian Curington; the original author of this project.
Inputs
in_fld
Input field data that is be to be textured. The field data should contain a mesh and one component of scalar node data. The node data is to generate UV texture coordinates so that the field can be correctly textured. If other node data components are present they will be ignored.
in_image : Image_ARGB
Original image data that is to be used as the basis of the pulse-wave image. The field data should contain a 2D structured mesh with a 4 byte vector of node data containing the Alpha, Red, Green and Blue components of the image. This is the field format output by modules such as read_image. Any data present in the alpha channel is completely replaced by the generated wave function.
Parameters
The texture_wave_field macro does not make use of any parameters. A full description of all the texture_wave parameters can be found in the documentation for that module.
Outputs
out_fld
Output field containing the input mesh data and the generated node data containing UV texture coordinates. This output does not contain the generated texture data.
out_image : Image_ARGB
Output image containing the texture image with the generated pulse-wave stored in the alpha channel. The image is output as a field with a 2D structured mesh and a 4 byte vector of node data containing the ARGB components of the image.
out_obj
GDobject that contains the field data and the generated texture image. This output is suitable for direct connection to the viewer. As alpha blending is enabled for this GDobject the effect of the pulse wave function should be visible.
Utility Macros
The texture_wave_field user macro uses the texture_wave and Scalar2Texture user macros.
Example
The project includes two example applications that demonstrates the use of the texture_wave_field macro. The TextureWaveEg3 application uses the texture_wave_field macro to apply a texture to a dataset representing Mt. Helens. The texture pulses should be visible as strips of colour. The animation facility can be used to move these strips of colour. The TextureWaveEg4 application loads a dataset representing the air movement in a room, generates streamlines and uses the texture_wave_field macro to apply texturing to the streamlines.
It should be noted that both of these examples use complex datasets and hence the rendering performance is likely to be low unless good hardware texturing support is available
Files
iac_proj/twave/tw_mods.v contains the V definitions of the TextureWaveCore module and the TextureWaveParams parameter block.
iac_proj/twave/tw_macs.v contains the V definitions of the TextureWaveUI UI macro, the TextureWaveFunc functional macro and the texture_wave and texture_wave_field user macros.
iac_proj/twave/tw_apps.v contains the V definitions of the TextureWaveEg1, TextureWaveEg2, TextureWaveEg3 and TextureWaveEg4 example applications.
Prerequisites
The texture_wave_field user macro and example applications rely on the successful installation of the following component. Without them it will not function correctly. All other macros in this project will function correctly.
Other Notes
The low-level TextureWaveMods library containing the low-level TextureWaveCore module does not specify a process. By default the express process will be used.
Author
Ian Curington,
Advanced Visual Systems, Inc.
Modifications
Andrew Dodd,
International AVS Centre
Contact
International AVS Centre
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL
See Also
|