Reference API Roblox

Engine API

Website

Related

Reference API Roblox

WrapTextureTransfer

WrapTextureTransfer allows a parent Decal to be wrapped around its parent MeshPart based on the cage of its WrapTarget.

This class is not browsable. It is not visible in Studio's object browser.
Tags: [NotBrowsable]

Member index 3

HistoryMember
691ReferenceCageMeshContent: Content
691UVMaxBound: Vector2
691UVMinBound: Vector2
inherited from Instance
553Archivable: bool
670Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
670Sandboxed: bool
680UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
691GetPredictionMode(): PredictionMode
641GetStyled(name: string): Variant
657GetStyledPropertyChangedSignal(property: string): RBXScriptSignal
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
690IsPredicted(): bool
664IsPropertyModified(property: string): bool
573Remove(): null
576RemoveTag(tag: string): null
664ResetPropertyToDefault(property: string): null
573SetAttribute(attribute: string, value: Variant): null
690SetPredictionMode(mode: PredictionMode): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
657StyledPropertiesChanged()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Description

WrapTextureTransfer provides an alternative projection mode for Decal where this Decal is fit to the parent MeshPart based on it's CageMesh provided in WrapTarget.

This is useful as it allows fitting of Decals to a wide variety of differently shaped MeshParts that share a similar WrapTarget CageMesh topology. By authoring textures that are in the WrapTarget UV space, these textures can be reused across many different MeshParts with different texture layouts.

A way to visualize how this works is to imagine the Decals textures on the WrapTarget CageMesh, which is wrapped around the MeshPart. These textures are then projected from the CageMesh onto the MeshPart surface. Geometry that is internal to the MeshPart, or that is not covered by the CageMesh, will not receive any projected decal textures. Segmented regions of the target MeshPart are used to improve projection quality near holes or boundaries in the CageMesh.

History 5

Members 3

ReferenceCageMeshContent

TypeDefault
Content

The reference cage mesh is the cage mesh that the texture was authored for. This target cage mesh defined in WrapTarget is pruned against this ReferenceCageMeshContent. If the target cage mesh contains vertices or faces that are not present in the reference cage mesh, these vertices and faces are removed from the target cage mesh before performing the texture transfer. If there are no shared UVs between ReferenceCageMeshContent and cage mesh defined in WrapTarget, the texture transfer fails.

When not defined, the cage in WrapTarget in ancestor MeshPart is used for transfer without any pruning or validation.

History 1

UVMaxBound

TypeDefault
Vector2-INF, -INF

Determines the maximum bound of the UV space to include in the transfer. Areas of the cage mesh with UV values greater than the maximum bound aren't included when applying the texture.

The Decal textures apply to the parent MeshPart with the textures scaling linearly between UVMinBound and UVMaxBound.

When set to default -inf, the maximum UV value is used from WrapTarget's cage.

History 1

UVMinBound

TypeDefault
Vector2INF, INF

Determines the minimum bound of the UV space to include in the transfer. Areas of the cage mesh with UV values smaller than the minimum bound aren't included when applying the texture.

The Decal textures apply to the parent MeshPart with the textures scaling linearly between UVMinBound and UVMaxBound.

When set to default inf, uses the minimum UV value from WrapTarget's cage.

History 1

Settings