@unitywear/garment-preview
v1.0.10
Published
## 2. Simplifying polygons and converting to GLTF Use Blender to reduce polygon count and export as GLTF
Downloads
3
Readme
Adding new models
1. Finding a model
2. Simplifying polygons and converting to GLTF
Use Blender to reduce polygon count and export as GLTF
- Hit wrench icon on model to access modifiers
- Add the Decimate modifer to reduce polygon account
- Export
- Make sure scale is 1
- Object is close to origin
- Modifiers are all applied
References
3. GLTF to JSX components
4. Adding a canvas texture
interface IModel{
skinRef: React.RefObject<HTMLCanvasElement>
}
export default function Model(props: IModel) {
...
return (
...
<mesh>
<meshStandardMaterial>
<canvasTexture attach="map" image={props.skinRef?.current}/>
</meshStandardMaterial>
</mesh>
)
}