Edit materials
A material binds textures to numbered shader slots and stores constant vectors. Studio does not know which slot is color and which is normal, so you pick textures by slot number and check the preview. Shaders cannot be authored.
Read a material
- Open the material, or click the material name in the Inspector’s PART section.
- Open the Materials page for its texture slots and constants.
- Open the Shaders page for the compiled shader declarations and code.
A model’s Materials page lists every material the model uses. Pick one in the list at the top. Open material opens it as its own asset. On the Shaders page, Open bytecode opens the shader code entry.
Change a slot or a constant
- Open a project.
- Open the material.
- Press Edit in the viewer toolbar.
- Under Texture slots, open a slot and pick a texture.
- Under Constants, type new values. Each must be a finite number.
- Press Create.
The change is saved as a delta of the material. You can also edit a texture assignment or a vector value on the Properties page. See Edit properties and bytes.
Copy a material
- Open a project.
- Open an installed material and press Clone in the viewer toolbar. It becomes the Template material. Clone material in the All other assets New list opens the same dialog. It uses the open material as the template when one is open.
- Type a Name and an unused Package ID.
- Change Texture slots and Constants as needed. A slot picks an installed or project texture. To use a new image, make it with New > Texture first.
- Press Create.
The copy keeps the template’s shaders and slot layout. It is stored as a delta of the template. The template must be installed. New is gray for materials, because shaders cannot be authored.
Edit a material in Blender
- Open the material in Studio.
- Choose Assets > Export material to Blender….
- Pick an empty folder outside the project and the installation.
- In Blender, select a mesh.
- Choose File > Import > Sunrise material.
- Open
material.sunrise-material.json. The material is added to the mesh and selected. - Edit the named nodes. Save image edits inside the material folder, as PNG or DDS.
- In Material Properties, open the Sunrise material panel and press Export Sunrise edits.
- In Studio, open the same material.
- Choose Assets > Import as delta… and pick
material.edited.sunrise-material.json.
Texture nodes keep the game’s stage and slot names. Value nodes hold the constants. The native texture tags are editable in the Sunrise material panel. The add-on leaves texture and value nodes unconnected, because the slots have no known shader roles.
On this path, a PNG edit works only for a single-mip RGBA8 or BGRA8 texture. Edit other textures as DDS. A full asset bundle also accepts PNG edits for compressed formats. See Edit an asset in Blender.