How to make unlit and ghosting materials

Found out how to make meshes have a ghosting effect and a unlit effect and thought i would share it. - Original post


What does it look like?

Here’s what the ghosting and unlit effects look like;


You can see a video of it here: https://youtu.be/dyqh8ZyEX9w?si=Rzk3ktofH6oGQqKa


But how do we create this?

Step 1
  • Add a mesh to your scene in Blender.

Step 2
  • Go into your scripting window and create a new script.
Open me if you need help getting to the scripting window
  • Click the + icon at the top of your screen.


  • You can now add the scripting window.


Step 3
  • Inside of your new script, paste this code:
import bpy

# the alpha. 0 is fully transparent, 1 is fully visible
alpha_value = 0

# layer name
color_layer_name = "Col"

# get selected object
obj = bpy.context.active_object

# check if selected is a mesh
if obj and obj.type == 'MESH':
    mesh = obj.data

    # create vertex layer if it deosnt already exist
    if color_layer_name not in mesh.color_attributes:
        mesh.color_attributes.new(name=color_layer_name, type='FLOAT_COLOR', domain='CORNER')

    color_layer = mesh.color_attributes[color_layer_name]

    # add the alpha to mesh
    for poly in mesh.polygons:
        for loop_index in poly.loop_indices:
            color = list(color_layer.data[loop_index].color)
            
            color[3] = alpha_value
            color_layer.data[loop_index].color = color

else:
    print("No mesh object selected.")

Last step
  • Once you have your mesh and your script setup, Make sure you have your mesh selected and run the script. The mesh will visually be the same in blender (so don’t worry if it looks like it did nothing)

  • You can now import the mesh into roblox with the FBX format. (Needs to be FBX)

  • For the ghosting effect, set the meshes material to glass.

  • For the unlit effect, set the meshes material to forcefield.


Incase you dont want to go through the whole blender process, you can get a model of basic shapes with these effects added here; https://create.roblox.com/store/asset/135393291662010

3 Likes

Interestingly enough, the glass meshes only appear black for me.

your graphics level needs to be on max.
you can change your studio graphics level in your settings or use renderSettings

Sorry, forgot to mention that.

i cant seem to replicate this sorry, ived tried using an alt account with the model and changing the graphics modes and so far nothing.

what device are you testing this on? mac, windows, linux? also does normal glass refraction work for you?

Unfortunately the ghosting effect only works when you have the “Unified lighting” Beta Feature enabled.
This means that the effect isn’t usable in an actual game and may sadly be patched at some point.

2 Likes