Change an image (texture) using viz script in fusion pipeline.

peter.ar

Member
Hi Viz Scripters!

I have a question for the people that knows Viz Script and Fusion Pipeline.

Does anyone know how to change an image (texture) and it´s position and scale using viz script and advanced materials in viz 5 ?

This are the properties using the classic pipeline. I'm searching for these properties but in fusion pipeline.

Code:
this.Texture.MapPosition.X
this.Texture.MapPosition.Y
this.Texture.MapScaling.X
this.Texture.MapScaling.Y

Thank you,
Pedro
 
To change the position, you can use the command:

dim id as String = this.VizId 'or the ID of the container where the Fusion material is applied
System.SendCommand("#" & id & "*MATERIAL_DEFINITION*OFFSET_UV SET XXX YYY")

replacing the XXX and YYY with values between 0.0 and 1.0

To adjust the scale, use the same type of command but replace the OFFSET_UV with SCALE_UV.
The XXX and YYY values vary between 0.0 and any value you want... and it can be negative, to mirror the image.
 
You should avoid using sendcommand unless it is necessary to call it.
The PBR and Phong classes in viz script doffer the folloing UV manipulations:
UVAngle As DoubleUV angle
UVAxisRotation As VertexUV axis rotation
UVOffset As VertexUV offset
UVPosition As VertexUV position
UVPostRotationScale As VertexUV post-rotation scale
UVPostRotationScalingPivot As VertexUV post-rotation scaling pivot
UVPreserveTextureAspect As BooleanUV texture aspect preserving status
UVRotationPivot As VertexUV rotation pivot
UVScale As VertexUV scale
UVScalingPivot As VertexUV scaling pivot
 
Back
Top