Refactor material catalog for roofing and flooring

This commit is contained in:
sudhir
2026-05-20 00:52:01 +00:00
committed by open-pascal
parent a3378a666d
commit a9d26239b7
45 changed files with 118 additions and 191 deletions
+57 -185
View File
@@ -40,14 +40,7 @@ const ROOF_TARGETS: MaterialTarget[] = [
const CEILING_TARGETS: MaterialTarget[] = [MaterialTargetSchema.enum.ceiling]
export const MATERIAL_CATEGORIES = [
'wood',
'wallpaper',
'parquet',
'granite',
'marble',
'other',
] as const
export const MATERIAL_CATEGORIES = ['wood', 'flooring', 'roof', 'other'] as const
export type MaterialCategory = (typeof MATERIAL_CATEGORIES)[number]
export const MATERIAL_CATALOG: MaterialCatalogItem[] = [
@@ -227,19 +220,23 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [
},
},
{
id: 'wall-granite1',
label: 'Granite',
category: 'granite',
description: 'Polished granite finish',
previewThumbnailUrl: '/material/granite1/granite_thumbnail.webp',
id: 'roof-classicshingles',
label: 'Classic Shingles',
category: 'roof',
description: 'Classic roof shingle finish',
previewThumbnailUrl: '/material/roof_shingles_classic/roof_shingles_classic_basecolor.webp',
preset: {
maps: {
albedoMap: '/material/granite1/albedoMap_Granite.jpg',
albedoMap: '/material/roof_shingles_classic/roof_shingles_classic_basecolor.webp',
aoMap: '/material/roof_shingles_classic/roof_shingles_classic_ambientocclusion.webp',
metalnessMap: '/material/roof_shingles_classic/roof_shingles_classic_metallic.webp',
normalMap: '/material/roof_shingles_classic/roof_shingles_classic_normal.webp',
roughnessMap: '/material/roof_shingles_classic/roof_shingles_classic_roughness.webp',
},
mapProperties: {
color: '#ffffff',
roughness: 0.189,
metalness: 0,
roughness: 1,
metalness: 0.15,
repeatX: 1,
repeatY: 1,
rotation: 0,
@@ -248,8 +245,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [
normalScaleX: 1,
normalScaleY: 1,
emissiveIntensity: 1,
displacementScale: 0.02,
transparent: true,
displacementScale: 0,
transparent: false,
flipY: true,
bumpScale: 1,
emissiveColor: '#000000',
@@ -261,19 +258,23 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [
},
},
{
id: 'wall-marble1',
label: 'Marble',
category: 'marble',
description: 'Smooth marble finish',
previewThumbnailUrl: '/material/marble1/marble1_thumbnail.webp',
id: 'roof-claytiles',
label: 'Clay Tiles',
category: 'roof',
description: 'Clay roof tile finish',
previewThumbnailUrl: '/material/roof_tiles_clay/roof_tiles_clay_basecolor.webp',
preset: {
maps: {
albedoMap: '/material/marble1/albedoMap_marble.jpg',
albedoMap: '/material/roof_tiles_clay/roof_tiles_clay_basecolor.webp',
aoMap: '/material/roof_tiles_clay/roof_tiles_clay_ambientocclusion.webp',
metalnessMap: '/material/roof_tiles_clay/roof_tiles_clay_metallic.png',
normalMap: '/material/roof_tiles_clay/roof_tiles_clay_normal.webp',
roughnessMap: '/material/roof_tiles_clay/roof_tiles_clay_roughness.webp',
},
mapProperties: {
color: '#ffffff',
roughness: 0.133,
metalness: 0,
roughness: 1,
metalness: 0.1,
repeatX: 1,
repeatY: 1,
rotation: 0,
@@ -282,8 +283,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [
normalScaleX: 1,
normalScaleY: 1,
emissiveIntensity: 1,
displacementScale: 0.02,
transparent: true,
displacementScale: 0,
transparent: false,
flipY: true,
bumpScale: 1,
emissiveColor: '#000000',
@@ -295,19 +296,23 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [
},
},
{
id: 'wall-marble2',
label: 'Marble',
category: 'marble',
description: 'Soft marble finish',
previewThumbnailUrl: '/material/marble2/marble2_thumbnail.webp',
id: 'roof-terracottatiles',
label: 'Terracotta Tiles',
category: 'roof',
description: 'Terracotta roof tile finish',
previewThumbnailUrl: '/material/roof_tiles_terracotta/roof_tiles_terracotta_basecolor.webp',
preset: {
maps: {
albedoMap: '/material/marble2/albedoMap_marble.jpg',
albedoMap: '/material/roof_tiles_terracotta/roof_tiles_terracotta_basecolor.webp',
aoMap: '/material/roof_tiles_terracotta/roof_tiles_terracotta_ambientocclusion.webp',
metalnessMap: '/material/roof_tiles_terracotta/roof_tiles_terracotta_metallic.webp',
normalMap: '/material/roof_tiles_terracotta/roof_tiles_terracotta_normal.webp',
roughnessMap: '/material/roof_tiles_terracotta/roof_tiles_terracotta_roughness.webp',
},
mapProperties: {
color: '#ffffff',
roughness: 0.122,
metalness: 0,
roughness: 1,
metalness: 0.1,
repeatX: 1,
repeatY: 1,
rotation: 0,
@@ -316,8 +321,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [
normalScaleX: 1,
normalScaleY: 1,
emissiveIntensity: 1,
displacementScale: 0.02,
transparent: true,
displacementScale: 0,
transparent: false,
flipY: true,
bumpScale: 1,
emissiveColor: '#000000',
@@ -329,19 +334,23 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [
},
},
{
id: 'wall-parquet1',
label: 'Parquet',
category: 'parquet',
description: 'Parquet wood finish',
previewThumbnailUrl: '/material/parquet1/parquet_thumnail.webp',
id: 'roof-weatheredshingles',
label: 'Weathered Shingles',
category: 'roof',
description: 'Weathered roof shingle finish',
previewThumbnailUrl: '/material/roof_shingles_weathered/roof_shingles_weathered_basecolor.webp',
preset: {
maps: {
albedoMap: '/material/parquet1/albedoMap_parquet.jpg',
albedoMap: '/material/roof_shingles_weathered/roof_shingles_weathered_basecolor.webp',
aoMap: '/material/roof_shingles_weathered/roof_shingles_weathered_ambientocclusion.webp',
metalnessMap: '/material/roof_shingles_weathered/roof_shingles_weathered_metallic.webp',
normalMap: '/material/roof_shingles_weathered/roof_shingles_weathered_normal.webp',
roughnessMap: '/material/roof_shingles_weathered/roof_shingles_weathered_roughness.webp',
},
mapProperties: {
color: '#ffffff',
roughness: 0.644,
metalness: 0.4,
roughness: 1,
metalness: 0.1,
repeatX: 1,
repeatY: 1,
rotation: 0,
@@ -350,145 +359,8 @@ export const MATERIAL_CATALOG: MaterialCatalogItem[] = [
normalScaleX: 1,
normalScaleY: 1,
emissiveIntensity: 1,
displacementScale: 0.02,
transparent: true,
flipY: true,
bumpScale: 1,
emissiveColor: '#000000',
aoMapIntensity: 1,
side: 0,
opacity: 1,
lightMapIntensity: 1,
},
},
},
{
id: 'wall-parquet2',
label: 'Parquet',
category: 'parquet',
description: 'Soft parquet finish',
previewThumbnailUrl: '/material/parquet2/parquet2_thumbnail.webp',
preset: {
maps: {
albedoMap: '/material/parquet2/albedoMap_parquet.jpg',
},
mapProperties: {
color: '#ffffff',
roughness: 0.6,
metalness: 0,
repeatX: 1,
repeatY: 1,
rotation: 0,
wrapS: 'Repeat',
wrapT: 'Repeat',
normalScaleX: 1,
normalScaleY: 1,
emissiveIntensity: 1,
displacementScale: 0.02,
transparent: true,
flipY: true,
bumpScale: 1,
emissiveColor: '#000000',
aoMapIntensity: 1,
side: 0,
opacity: 1,
lightMapIntensity: 1,
},
},
},
{
id: 'wall-wallpaper1',
label: 'Wallpaper',
category: 'wallpaper',
description: 'Soft wallpaper finish',
previewThumbnailUrl: '/material/wallpaper1/wallpaper1_thumbnail.webp',
preset: {
maps: {
albedoMap: '/material/wallpaper1/albedoMap_1.webp',
normalMap: '/material/wallpaper1/normalMap_NormalMap.webp',
},
mapProperties: {
color: '#ffffff',
roughness: 0.911,
metalness: 0,
repeatX: 1,
repeatY: 1,
rotation: 0,
wrapS: 'Repeat',
wrapT: 'Repeat',
normalScaleX: 1,
normalScaleY: 1,
emissiveIntensity: 1,
displacementScale: 0.02,
transparent: true,
flipY: true,
bumpScale: 1,
emissiveColor: '#000000',
aoMapIntensity: 1,
side: 0,
opacity: 1,
lightMapIntensity: 1,
},
},
},
{
id: 'wall-wallpaper2',
label: 'Wallpaper',
category: 'wallpaper',
description: 'Decorative wallpaper finish',
previewThumbnailUrl: '/material/wallpaper2/wallpaper2_thumnail.webp',
preset: {
maps: {
albedoMap: '/material/wallpaper2/albedoMap_5.webp',
},
mapProperties: {
color: '#ffffff',
roughness: 0.889,
metalness: 0.255,
repeatX: 1,
repeatY: 1,
rotation: 0,
wrapS: 'Repeat',
wrapT: 'Repeat',
normalScaleX: 1,
normalScaleY: 1,
emissiveIntensity: 1,
displacementScale: 0.02,
transparent: true,
flipY: true,
bumpScale: 1,
emissiveColor: '#000000',
aoMapIntensity: 1,
side: 0,
opacity: 1,
lightMapIntensity: 1,
},
},
},
{
id: 'wall-wallpaper3',
label: 'Wallpaper',
category: 'wallpaper',
description: 'Patterned wallpaper finish',
previewThumbnailUrl: '/material/wallpaper3/wallpaper3_thumbnail.webp',
preset: {
maps: {
albedoMap: '/material/wallpaper3/albedoMap_wallpaper3.avif',
},
mapProperties: {
color: '#ffffff',
roughness: 0.887,
metalness: 0.35,
repeatX: 1,
repeatY: 1,
rotation: 0,
wrapS: 'Repeat',
wrapT: 'Repeat',
normalScaleX: 1,
normalScaleY: 1,
emissiveIntensity: 1,
displacementScale: 0.02,
transparent: true,
displacementScale: 0,
transparent: false,
flipY: true,
bumpScale: 1,
emissiveColor: '#000000',