See demo here.
npm install quixel-to-three
quixel-to-three /absolute/path/to/any/quixel/asset_2K_Albedo.jpg
Command converts a collection of Quixel assets (albedo, normals, roughness, etc.) into a corresponding Three.js PBR maps (use with MeshStandardMaterial.)
Output files are placed next to the original assets with an appended t3
prefix.
Converted assets can be plugged directly into Three.js PBR materials:
const mesh = new THREE.Mesh(
new THREE.IcosahedronBufferGeometry(2, 5),
new THREE.MeshStandardMaterial({
map: './assets/texture_2K_t3map.png', // Use t3map for map
normalMap: './assets/texture_2K_t3normal.png', // Use t3normal for normalMap
aoMap: './assets/texture_2K_t3pbr.png', // Use t3pbr for aoMap
metalnessMap: './assets/texture_2K_t3pbr.png', // Use t3pbr for metalnessMap
roughnessMap: './assets/texture_2K_t3pbr.png', // Use t3pbr for roughnessMap
displacementMap: './assets/texture_2K_t3displacement.png' // Use t3displacement for displacementMap
})
);
See PBR example here.
Some materials contain all texture maps - albedo, normals, roughness etc. Some skip the maps that are unnecessary. For example, if original assets do not contain a displacement map t3displacement
will not be created.
For PBR texture maps, if some are not present, default Three.js values are used instead (see docs for more details).
You can limit output size by defining the output width.
quixel-to-three /Files/Quixel/test_4K_Normal.jpg 512
Output textures preserve aspect ratio of the original assets.
Node processes have memory limits that are easily exceeded when trying to convert 5 x 8K textures. To save time and prevent memory errors, use with 2K or 4K Quixel textures.