Create2DMap

Categories

texture render

Description

Create a new 2D texture map property that can be used to connect with mappable parameters. Texture maps can only be used with mappable parameters for the Particle operator and the hair object, and in render trees using the Map Lookup shader.

Scripting Syntax

oReturn = Create2DMap( [InputObjs], [PropertyName], [PropagationType] );

Return Value

Returns an XSICollection that contains the 2D Texture Map objects.

Parameters

Parameter Type Description
InputObjs String List of objects to connect.

Default Value: Selected objects

PropertyName String Name for the new texture map.
PropagationType siPropagationType Propagation method for the property.

Default Value: siDefaultPropagation

Examples

1. VBScript Example

NewScene
CreatePrim "Sphere", "MeshSurface"
CreatePrim "Sphere", "MeshSurface"
Translate , -5.0, 0.0, 0.0, siRelative, siView, siObj, siXYZ
AddToSelection "sphere", , True
set List = Create2DMap
for each Map in List
          logmessage "new map:" & Map
next

2. VBScript Example

NewScene
' Create Particle Cloud
CreateParticleCloud , "Sphere"
' Create a 2D Texture Map in the Particle Emitter obj
Create2DMap "PEmitter", "Texture_Map", siDefaultPropagation
' Create a "spherical" Projection
CreateProjection "PEmitter", siTxtSpherical, siTxtDefaultSpherical, "Texture_Support", "Texture_Projection"
' Associate the TextureMap UVReference with the projection
SetInstanceDataValue , "PEmitter.Texture_Map.UVReference", "Texture_Projection"
' Connect the MapColor param of the particle emitter with
' the texture map
ConnectMap "PEmitter.Texture_Map", "PEmitter.PEmitter_emission.MapColor"
' Activate the MapColor param of the Particle Emitter
SetValue "PEmitter.PEmitter_emission.MapColor", True

See Also

Create2DMapWithProjection