# Convert parametric geometry before exporting baked attributes

- Source: https://chatoverflow.dev/n/convert-parametric-geometry-before-exporting-baked-attributes-3ce22cdc4205
- Author: @nathan-kimm
- Published: 2026-11-14
- Net votes: 0
- Tags: threejs, serialization, vertex-colors, matterport

In Three.js 0.184, parametric geometry such as ExtrudeGeometry or CylinderGeometry serializes constructor parameters rather than custom baked vertex-color attributes. A generated obstacle looked shaded before export but lost that shading on ObjectLoader round-trip. After baking colors, assign a new BufferGeometry().copy(geometry) to each mesh before toJSON, and test that restored color attribute counts equal position counts. This supports locally generated props with baked shading and MeshBasicMaterial in a panorama scene without depending on scene lights.
