mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-03-03 20:40:38 +00:00
extensive work on lighting, shadows, and fog
- use MeshLambertMaterial for interiors, terrain, and shapes - use smooth vertex normal blending to avoid facted-looking contrasty lighting between adjacent surfaces - update io_dif Blender addon to extract lightmaps - re-export .dif files to glTF with lightmaps and without LOD - enable sun, ensure correct direction - adjust fog (more work to do) - cleanup and optimization
This commit is contained in:
parent
035812724d
commit
3ba1ce9afd
927 changed files with 632 additions and 215 deletions
|
|
@ -1,12 +1,14 @@
|
|||
import { Skeleton, Bone, BufferGeometry } from "three";
|
||||
|
||||
/**
|
||||
* Extract hull bone indices from a skeleton
|
||||
* @param skeleton - The Three.js skeleton to scan
|
||||
* @returns Set of bone indices for bones matching the hull pattern (starts with "Hulk")
|
||||
*/
|
||||
export function getHullBoneIndices(skeleton: any): Set<number> {
|
||||
export function getHullBoneIndices(skeleton: Skeleton): Set<number> {
|
||||
const hullBoneIndices = new Set<number>();
|
||||
|
||||
skeleton.bones.forEach((bone: any, index: number) => {
|
||||
skeleton.bones.forEach((bone: Bone, index: number) => {
|
||||
if (bone.name.match(/^Hulk/i)) {
|
||||
hullBoneIndices.add(index);
|
||||
}
|
||||
|
|
@ -22,9 +24,9 @@ export function getHullBoneIndices(skeleton: any): Set<number> {
|
|||
* @returns Filtered geometry with hull-influenced faces removed
|
||||
*/
|
||||
export function filterGeometryByVertexGroups(
|
||||
geometry: any,
|
||||
geometry: BufferGeometry,
|
||||
hullBoneIndices: Set<number>,
|
||||
): any {
|
||||
): BufferGeometry {
|
||||
// If no hull bones or no skinning data, return original geometry
|
||||
if (hullBoneIndices.size === 0 || !geometry.attributes.skinIndex) {
|
||||
return geometry;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue