← MPP-Mainstore › Scripts MPP - Emissive Color Cycle Download the documentation (.md)

Version 1.2.2 · updated September 24, 2026

MPP - Emissive Color Cycle Script V1.2.2 - Documentation

Cycles the glow color of your materials through three colors of your choice, over a cycle that can last a tenth of a second or ten minutes: neon signs, sci-fi props, portals, shop displays, party lights. One material, several materials by name, or every material of the object at once.

This script is standalone - it does not require any other MPP script to function.

New in V1.2.2: a material is written only when its color really changes (with the default cycle, about four times fewer writes than v1.2, with no visible difference), the cycle follows the real elapsed time even on a busy server, a write refused by Sansar is simply retried instead of counting as a failure, and Debug Logging reports the measured write rate. Settings are grouped by category in the Build panel. Your settings are kept when you update: see "Updating from v1.2".


Quick Start

  1. After purchase, the script is in your Inventory in Build mode. Add it to the object whose material should glow.
  2. In the object's properties, set the mesh that carries the material Scriptable. The material must have a Tint (most glowing materials do).
  3. Build and visit: the first material of the object cycles from red to green to blue and back, over three minutes.
  4. Pick your own colors in Cycle/Color 1 (Start), Color 2 and Color 3, and the length of the cycle in Cycle/Cycle Seconds.

That is all most objects need. The rest of this guide details every option.


How It Works

The tint of the driven materials goes from Color 1 to Color 2, then to Color 3, then back to Color 1, each leg taking a third of Cycle/Cycle Seconds. The cycle starts on Color 1 each time the scene starts.

In the Build panel the settings are grouped by category: Cycle/, Materials/, Performance/ and Debug/.

Colors

Each color is entered as red, green, blue and alpha values from 0 to 1, for example (1,0,0,1) for pure red or (0.05,0,0,1) for a very dark red. The alpha value is kept at 1 for a normal glow.

To hold a color for a third of the cycle, give the same color to two consecutive fields (for example Color 1 = Color 2): the held color is shown exactly as you typed it.

Cycle length

Cycle/Cycle Seconds goes from 0.1 second to 600 seconds (default 180). Short cycles give a fast pulse, long cycles a slow, ambient drift.


Materials

Materials/Target Materials chooses what is driven:

ValueMaterials driven
(empty)The first material of the object
*Every material of every scriptable mesh of the object
Glow, Neon Left, Neon RightThose materials, by name (commas or semicolons, case does not matter)
Neon*Every material whose name starts with "Neon"

Only materials that have a Tint are driven. A material without one is skipped; if the first material has no Tint and the field is empty, a warning tells you to use * or a name. A name that matches nothing gets a warning listing the material names found, so you can copy the right one; if the wanted material sits on a mesh that is not scriptable, the warning names that mesh too.

To find the exact material names, turn Debug/Debug Logging On: the script console lists every material discovered at start.


Performance

A material that keeps refusing its writes is dropped after five failures in a row, with a warning; a write that Sansar merely delays is not a failure and is retried at the next update.


Editor Properties Reference (8 total)

Cycle

PropertyTypeDefaultDescription
Cycle/Cycle Secondsnumber, 0.1-600180Length of a full cycle (Color 1 to 2 to 3 to 1)
Cycle/Color 1 (Start)Color(1,0,0,1)First color, shown at each start
Cycle/Color 2Color(0,1,0,1)Second color
Cycle/Color 3Color(0,0,1,1)Third color

Materials

PropertyTypeDefaultDescription
Materials/Target Materialsstring(empty)Empty = first material; * = all; names separated by commas; a trailing * matches a prefix

Performance

PropertyTypeDefaultDescription
Performance/Update Interval Millisecondsinteger, 20-100050Time between two color updates
Performance/Per-Write Lerp Secondsnumber, 0-10.05Fade of each write; 0 = instant

Debug

PropertyTypeDefaultDescription
Debug/Debug LoggingboolOffWrites the materials found, the targets chosen and the measured write rate to the script console

Version Notes

VersionWhat changed
v1.1Three-color cycle on the first material, or on one exact material name
v1.2Target Materials (empty, *, name list, prefix), Tint and Scriptable checks, adjustable update interval, materials dropped after repeated failures, "MPP -" name. Sold until V1.2.2
V1.2.1A material is written only when its color really moved (one exact write when it stops), the cycle follows the real elapsed time, a delayed write is retried instead of counting as a failure, quieter warnings, settings grouped by category
V1.2.2 (this version)Version number only

Updating from v1.2

v1.2V1.2.2
Cycle Seconds, Color 1 (Start), Color 2, Color 3Cycle/Cycle Seconds, Color 1 (Start), Color 2, Color 3
Target MaterialsMaterials/Target Materials
Update Interval Ms, Per-Write Lerp SecondsPerformance/Update Interval Milliseconds, Per-Write Lerp Seconds
Debug LogDebug/Debug Logging

Recipes

A - Neon sign. Target Materials = Neon*, three vivid colors, Cycle Seconds 30.

B - Slow ambient drift. One material, three pastel colors, Cycle Seconds 600, Update Interval Milliseconds 100.

C - Two colors with a hold. Color 1 = Color 2 = your main color, Color 3 = the accent: the main color holds for a third of the cycle, then blends to the accent and back.

D - The whole object. Target Materials = *: every tintable material of every scriptable mesh follows the same cycle.

E - Fast pulse. Cycle Seconds 3, Update Interval Milliseconds 50, Per-Write Lerp Seconds 0.05.


Troubleshooting

SymptomCheck
Nothing changesThe mesh must be set Scriptable; the script console shows "No valid RenderMaterial found on any scriptable MeshComponent" otherwise. Check that the material has a Tint
Only one part of the object changesMaterials/Target Materials is empty: only the first material is driven. Use * or the names
"No material matches '...'" in the consoleCopy a name from the "Available:" list of that warning; if the mesh is listed as non-scriptable, set it Scriptable
The colors look wrongValues go from 0 to 1, not 0 to 255: (1,0.5,0,1) is orange
The held color is not exactIt is, from the second cycle on: the first pass starts on Color 1 and blends
Steps are visible on very dark colorsLower Update Interval Milliseconds or raise Per-Write Lerp Seconds
I want to see what is drivenTurn Debug/Debug Logging On: the materials found, the targets chosen and, every 10 seconds, the number of writes

Limits


ItemWhat it adds
Light Drain And Restore ScriptA rainbow and a dimming light on a prop that visitors pick up. Store: https://www.sansar.com/store/listings/95238b17-f553-4656-88b6-6bf10e4070b9/light-drain-and-restore-script
Light Switch ScriptTurn lights and glowing materials on and off with fades. Store: https://www.sansar.com/store/listings/7379d48c-2b6f-45f6-b6f1-205ce95aec1c/light-switch-script

MPP - My Pretty Pixels. Emissive Color Cycle Script V1.2.2 (script MPP - Emissive Color Cycle). Store: https://www.sansar.com/store/listings/23b8b34f-c12a-47ac-930f-5765b1cbcaf9/emissive-color-cycle-script

↑