Textures in Onirix
One of the biggest drains on performance is the texture resolution. By default bigger textures than 2K are automatically reduced to 2K during model conversion. But sometimes this isn’t just enough and we need to reduce even more the texture resolution of an object that it’s barely visible or we don’t want so much detail.
There are a plenty of tools that can do that:
- Photoshop: Largely known image editing software (It requires a recurrent subscription)
- GIMP: Free alternative to Photoshop.
- iLoveIMG: Easy in use tool that allows us to resize images, crop, convert, etc.
- PickResize: An alternative.
With our new fresh resized image we should head on to Blender (or whatever 3D software we are working with) and in the material properties panel select our texture and replace it for the new one. Once we have replaced the desired textures we must export our object.
Working with .glb format allows us the metal/rough PBR materials (Physically Based Rendering). PBR materials describe the visual properties of a surface in a physically plausible way.
Transmission is a new property for modeling transparency, different from alpha blending. Transmission allows full-strength specular reflections. Alpha blending instead is intended to represent physical materials that are partially missing from the geometry.Transmission is intended to represent physical materials that are solid but allow non-specularly-reflected light to transmit through the material, like glass.
When a texture is used in the Principle BSDF transmission input, glTF stores the value in the red channel. The color space should be set on non-colour.
One parameter to keep in mind while setting a transmission material is the IOR (Index Of Refraction). This parameter will give us a physically realistic behavior of our transparent material. By default IOR value is set to 1.5 (glass). This value is only included in the export if we have previously set a transmission texture.
Follow the last tip of supported formats. Textures and materials have to be uploaded in a ZIP file along with the model. Make sure you use relative paths to reference your external files.
When uploading OBJ files, ensure the materials file (.mtl extension) is located in the same directory and has the same name as the .obj file. i.e: sample.obj and sample.mtl.