Skip to content

Render Material To Image

The AddAllIn1Vfx component in the Inspector with its buttons: Deactivate All Effects, New Clean Material, Create New Material With Same Properties, Save Material To Folder, Apply Material To All Children, Render Material To Image, Add Particle System Helper, Remove Component and Remove Component And Material

If you press the Render Material To Image the current Texture + Material of the current Gameobject will get rendered into a texture. A save panel opens in the folder set in the Asset Window as Render Material to Image Save Path, and the image is saved wherever you pick. Before version 2.41 it was always saved in that folder, whatever the panel said.

In the Save Paths tab of the asset window you can change that folder and the Rendered Image Texture Scale. Since the output will look slightly less sharp than the in-engine version you can upscale the output to make it more crisp in case you need to.

This feature is useful to offload some work from the gpu or to create texture variations. By baking the result into a texture it means that the gpu won’t need to compute all effects every single frame. In any case please keep in mind that the asset is made with efficiency in mind, even in low end devices. This is just one more tool at your disposal. Please don’t try to optimize early by swapping out all Materials by a rendered image. Only use this for performance reasons after running into performance problems (you most likely never will, even in low end devices).

You can also use this feature to pre-render a certain image for some VFX or to pre-render a texture that you can then modify with the asset shader. This feature allows you to stack and re-apply the asset effects recursively as many times as you need.