Sansar Docs
  • 🚀Welcome to Sansar
  • 📚GLOSSARY
  • 🎏Patch Notes
  • 😇Work in Progress
  • ⚠️Creative Commons License
  • Support
    • General Troubleshooting
      • General FAQ
      • The Sansar Cache
      • The Sansar Log
    • Contact Support
  • Sansar Basics
    • Installation And Compatibility
      • Installing Sansar
      • System Requirements
      • Sansar Compatibility FAQ
      • Sansar on Mac
      • Body Tracking Vive
      • Configuring Firewalls
    • Account Management
      • Account Set Up
      • Avatar Name and ID
      • Adding Payment Method
      • Discord FAQ
      • Steam Integration
      • Subscription FAQ
    • Controls
      • Avatar Hand Gestures in VR
      • FreeCam and CineCam
      • Game Controller Buttons
      • HTC VIVE controls
      • Keyboard Shortcuts for Editing a Scene
      • Keyboard Shortcuts for Styling Your Avatar
      • Keyboard Shortcuts for Visiting an Experience
      • Mouselook Mode
      • Oculus Rift Controls
      • Vive Index Controls
    • Settings
      • General Settings
    • VR Settings
      • VR Settings Menu
      • Calibrating Height in VR
  • Exploring in Sansar
    • Navigate and Explore
      • The Codex
      • Instances
      • Interactive objects
      • The Main Menu
      • The Nexus
      • Portals
      • Quests
      • Quick Start: Exploring in Sansar
    • Socialize And Connect
      • Chat Panel
      • Experience Points, Levels, and Titles.
      • Finding People in Sansar
      • Identifying Interacting With Avatars
      • The People panel
      • User profiles
    • Attending events
      • Deploying Unpublished Event to Event World
      • Adding Events to Your Calendar
      • Attending Events in Sansar
      • Avatar Broadcasting FAQ
      • Creating Your Own Events
      • Redemption Codes
      • Tipping
    • Share Content
      • Streaming Sansar
      • Taking a photo
  • Avatar Creation
    • Avatar Basics
      • Avatar 2.0 FAQ
      • Customizing Your Avatar
      • Avatar Emotes
      • The Avatar Editor
    • Dressing The Avatar
      • Fitting Designer Clothing to your Avatar
      • Setting Custom Emotes
      • Wearing Accessories
      • Wearing Rigged Clothing
    • Managing Avatar Items
      • Importing Avatar-Related Items
      • Editing an inventory item's name
      • Editing an inventory item's image
      • Deleting avatar looks from your inventory
      • Importing a custom emote animation
      • Managing your avatar looks inventory items
    • Avatar Resources
      • Avatar Reference Files
      • Blender - Avatar files
      • Blender - Using Decimate Tool
      • Exporting Custom Avatars From Blender
      • Sansar Skeleton Skinning Details
      • Using Animation Skeleton
  • Creating In Sansar
    • Importing Things to Sansar
      • Supported file types
      • AABB Bounding Box and Item Restrictions
      • Importing Audio
      • Importing a Custom Avatar
      • Importing World Items
      • Importing Collision Volumes
      • Importing Accessories
      • Importing Clothing
      • Importing Emotes
      • Importing Hair
      • Importing Custom Scripts
      • Importing a Skybox
      • Troubleshooting Import Errors
    • Shaders and Materials
      • Shaders Information
      • Materials Information
      • VAT Shader Guides
        • VAT Shader Basics
        • VAT Technical Info
      • Displacement Guides
        • Simple Displacement
        • Advanced Displacement
    • Marvelous Designer Info
      • Marvelous Designer Integration
      • Marvelous Designer Creator Resources
      • Marvelous Import and Export
      • MD Limitations
    • Shader Scripting
    • Materials editing and shaders
    • Creator Tools
      • Creating a World
      • Creating Quests
      • Diagnostics Toolbar
      • Importing Items to Sansar
      • My Worlds Panel
    • Managing Worlds
      • Quick start: Creating experiences in Sansar
      • Deleting an experience or scene
      • Deploying a new scene to an existing experience
      • Editing a scene
      • Experience memos
      • Linking A Scene To A World
      • Managing your scenes and worlds
      • Moderation Tools for World Owners
      • Publishing Options for Your Experiences
      • Renaming a scene
      • Saving and Building A Scene
      • Sharing Your Experiences
      • Visiting your own experience
    • Part Of The World Editor
      • Object Stats Toolbar
      • Object Components
      • Parenting objects
      • Scene Item Inventory
      • Scene Objects Panel
      • Collision Volumes
      • Scene Settings
      • System objects
      • Object Motion Types
    • Working With Scripts
      • Working With Scripts
      • Working With Trigger Volume
      • Referencing Scene Components
      • Intro to Scripting in Sansar
      • Using the Script Console
      • Setting Script Parameters
      • Adding Scripts to an Object
      • Configuring Teleport Scripts
      • Simple Script User Guide
    • Working With Audio and Video
      • Working With Audio
      • Creating Media surface
      • Streaming Web Audio
      • Audio Emitter
      • Sansar Audio FAQ
      • Using Media Streams
      • Ambisonic Sounds
      • High Quality Spacial Audio
      • Audio Resource - Room Tones
      • Previewing Audio and Video in a Scene
      • Using Audio Materials
    • Working With Lights
      • Working With Lights
      • Light Types
      • Global Illumination
  • Sansar Store
    • Using the Sansar Store
      • The Sansar Store
      • Buying Items From The Store
      • Redelivering Lost Purchases
    • Buying and Selling Sansar Dollars
      • Gifting Sansar Dollars
      • Buying Sansar Dollars
      • Converting Sansar Dollars
      • Processing US Dollar Credit
    • Selling Your Content
      • Hidden Store Listings
      • Selling Items in Sansar Store
      • Selling Items in an Experience
      • Allowing Resale Of Items
      • Buyers Permissions
  • Guidelines and Moderation
    • Guidelines and Policies
      • Terms of service
      • Sansar's Discord Server Rules
      • Community Standards
      • Content Guidelines
      • World Publishing Guidelines
      • Store Listing Guidelines
      • Store Banner Guidelines
      • Event Guidelines
      • Privacy Policy
      • Sansar Freeware License Agreement
      • Intellectual Property Infringement Notification
      • Cookie Policy
    • Moderation and Reporting
      • Abuse and Griefing
      • Blocking Avatars
      • Muting Avatars
      • Reporting abuse
      • Reporting issues and bugs
      • Security issues
  • Script API Docs
    • General Information
      • External Script Repository's
      • Sansar Script API
      • Script API Updates
      • Restricted API's
    • Example Scripts
      • Example Scripts in Sansar
      • Cannonball
      • Follow The Path
      • Random Movement
      • Reflective Detector
      • Simple Script
      • Sound Randomizer
      • Stats Example
      • Teleport Hotkeys
      • Visitor Tracker
      • Mover Examples
    • Sansar Namespace
      • Namespace
      • Color
      • Mathf
      • Quarterion
      • Vector
      • Vector Extensions
    • Sansar.Script Namespace
      • AddEntryAttribute
      • CancelData
      • ComponentID
      • CoroutineException
      • Default Attributes
      • Editor Visible Attribute
      • Entries Attribute
      • Event Data
      • ICoroutine
      • IEvent Subscription
      • Instance Interface
      • Locked Attribute
      • Log
      • MaxEntriesAttribute
      • Memory
      • MinEntriesAttribute
      • NonReflectiveAttribute
      • ObjectID
      • OperationCompleteEvent
      • RangeAttribute
      • Reflective
      • Script.Base
      • Script Event Data
      • Script Handle
      • ScriptID
      • SessionID
      • Simple Script Event Data
      • ThrottleException
      • Timer
      • Tooltip Attribute
    • MetaData Namespace
      • Assembly MetaData
      • Script MetaData
    • Sansar Script Testing Namespace
      • Assertion Failure Exception
      • Assertions
    • Sansar Utility Namespace
      • GenericEnumerable <T>
      • GenericEnumerable<T>.GetItem
      • JSON Serialization Data
      • JSON Serialization Data 1
      • JSON Serializer
      • JSON Serializer Options
    • Sansar Simulation Namespace
      • Agent Info
      • Animation
      • Audio Component
      • Camera Control Mode
      • Character Tracker
      • Chat
      • Client
      • Cluster
      • Command Action and Data
      • Component Type
      • Control Point Type
      • Held Object
      • HTTP
      • Interaction
      • Light
      • Media Action
      • Mesh Component
      • Modal Dialogue
      • Move Mode and Mover
      • Objective
      • PlayHandle
      • PlaySettings
      • PlayStatus
      • Quest
      • RayCastHit
      • Rigid Body
      • Scene
      • Scene Public
      • Simple Script
      • Sit Event Type
      • Sit Object Data
      • Sound Resource
      • Stream Channel
      • Tutorial Hint
      • UI
      • User Data
Powered by GitBook
On this page
  • Displacement Map colors:
  • Displacement Factor Map:
  • Using Simple Displacement maps
  • Scrolling animated Displacement
  • Flipbook Displacement
  1. Creating In Sansar
  2. Shaders and Materials
  3. Displacement Guides

Simple Displacement

PreviousDisplacement GuidesNextAdvanced Displacement

Last updated 1 year ago

These example textures provided below can be used for any purpose and in any combination for static and animated displacement within Sansars material editor.

Displacement is influenced by the UV layout of a model. When applying displacement to items from the store for which you don't have access to the original files, the outcome may differ due to the significance of the model's UV layout and export settings.

Displacement Map colors:

This is a texture map that the shader reads the color information to determine the displacement strength and direction of the corresponding vertex.

  • Red = X axis direction

  • Green = Y axis direction

  • Blue = Z axis direction

  • White = All directions in the positive

  • Black = No displacement

Displacement Factor Map:

Think of this as a mask slot or as a 'strength'

  • functional as a greyscale mask, black being full strength and white being no displacement, this is the opposite to how other masks work within the shaders.

Using Simple Displacement maps

Avatar items are able to utilise the new displacement to create animated clothing and accessories, it is recommended to create a test within a edit world scene to be able to see what settings are required.

While in world edit:

  1. Open the Materials edit window

  • Right click the object you want to add displacement to.

  • You should see a pop-up menu appear, choose "Materials..." alternately you can use the short-cut "Ctrl + M" while your object is selected.

  1. Choose the shader and locate the map slots

  • Select the shader you would like to use in the top right drop down menu.

  • You are looking for the Displacement Map and Displacement Factor slots.

  • See "Texture Settings" screenshot that is also provided in the folder for reference.

  1. Add Texture Maps to the Displacement Map and Factor slots.

Displacement Map Slot

  • Add any texture you like from the provided folder into the "Displacement Map" slot to see your object displace, you can also create your own!

  • White in this Displacement Map slot acts as full strength, while black acts as zero strength.

  • The displacement may initially be quite strong and distorted but can be adjusted further down the shader under "Displacement Scale" or with a factor map.

Displacement Factor Slot

  • Optionally you can use the second slot "Displacement Factor" as a simple black and white mask.

  • Black by default in this Displacement Factor slot acts as full strength, while White acts as zero strength, the inverse to the Displacement Map menu.

  • Example: The gradient textures included in this pack will go from white (masked out) to black (full strength displacement)

  • All values in between black and white act as a sliding scale between the two values which determine the level of displacement strength.

  1. Tweak and adjust displacement settings

  • Scroll down until you see "Displacement Scale" input boxes

  • This is where you can have greater control over the strength and turn on or off each direction, you can use these to compensate for a model rotation set by export.

  • To turn off a direction, type in 0 when using black and white texture maps.

  • I recommend trying values like 0.5 or 0.05 to get more subtle or toned down results.

  1. Choose between Local or UV Tangent space

  • Displacement is defined by Local and Tangent Space for its direction, Local space is determined by the models export setting (this can differ from the editor Gizmo). UV Tangent Space is determined by the face direction of the mesh.

  • Scroll down and find the "Displacement in LocalSpace" tick box, you toggle this on and off to see which result is preferable for your needs as it affects what direction the mesh is being displaced.

  1. Choose additional settings

  • If using an animated shader the Factor and Map can also be animated either together or one or the other instead of remaining static this can be used to create interesting effects like bubbling water, flowing grass or leaves, waving flags, etc.

Scrolling animated Displacement

  • For simple UV scrolling displacement animations, you can scroll the Map and Factor like other maps in sansar to achieve animated effects. "TextureSettings2" screenshot has also been provided in the folder for future reference.

Flipbook Displacement

  • It is possible to use Flipbook sprite sheets to create an animated displacement that can be used to create more advanced looking assets, even mimicking particles, you need to create a sprite map of 'keyframed' displacement that you can use the regular flipbook settings to change between.

  • A new 'Blend Displacement Flipbook' checkbox has been added that interpolates between frames creating a smoother animation

The simple displacement in Sansar uses "Red, Green, Blue, White and Black" or "RGB" to define each direction of vertices on mesh in 3D space, if using PNG textures you can only displace in a Positive direction, if you wish to utilise negative direction you will need to create EXR maps, covered more in .

Make sure the shader you are using supports the displacement you require (static or animated) by scrolling down to see if it has the right texture map slots or checking the page.

Advanced Displacement
Shader info
4MB
Simple_Displacement_Textures.zip
archive
Example textures for use with Simple Displacement
Files contained in the following folder
Displacement Map and Factor slots
Local Space
UV Tangent Space
Additional settings and options