npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

quixel-to-three

v1.0.4

Published

Convert Quixel materials into Three.js compatible PBR textures

Downloads

12

Readme

Convert Quixel assets into Three.js compatible PBR materials.

Usage

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.)

ezgif-1-5868c0f73076

Output

Output files are placed next to the original assets with an appended t3 prefix.

Usage with Three.js

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.

Missing files

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).

Output size

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.

Limitations

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.

ezgif-1-b594713bff95