feat(extract): multi-texture & 3D/4D texcoords + matrix/multi texture transforms#42
Merged
Merged
Conversation
… transforms Extend texture extraction to the multi-channel and higher-dimension texture coordinate/transform nodes, plus reader-tolerant field aliasing. Resolves four conformance findings: - TXT-6 (§18.4.4): MultiTextureCoordinate no longer falls back to default UVs. MeshBuilder unwraps MultiTextureCoordinate.texCoord children into MeshData.texcoordSets (all channels preserved), mirrors the first usable channel onto the legacy MeshData.texcoords seam, and emits (0,0) fallback corners for empty channels. - T3D-3 (§33.4.4): TextureCoordinate3D (MFVec3f) and TextureCoordinate4D (MFVec4f) point arrays are now read and projected onto the 2D (s,t) seam -- (s,t) for 3D, homogeneous (s/w, t/w) for 4D (spec-permitted impl-dependent 2D-texture fallback). - TXF-3 (§18.4.10): MultiTextureTransform yields one TextureTransform2DParams per child; SceneExtractor applies per-channel transforms to matching texcoordSets. TextureTransformMatrix3D projects its 4x4 over (s,t,0,1). - TPJ-2 (§42.4.2): reader-only FieldAliases.hpp accepts 'shadowsIntensity' on TextureProjectorParallel as a tolerant alias for canonical 'shadowIntensity' across XML, ClassicVRML, VRML97, and JSON. Writers stay canonical. Coverage: texture_extract_test (multi/3D/4D coords, multi/matrix transforms) and reader_audit_test (field-alias across all four encodings). findings.yaml updated and the generated conformance view regenerated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Extends texture extraction to the multi-channel and higher-dimension texture coordinate / transform nodes, and adds reader-tolerant field aliasing. Resolves four conformance findings.
MultiTextureCoordinatesilently fell back to default UVs (it has nopointfield)MeshBuilderunwrapsMultiTextureCoordinate.texCoordchildren intoMeshData.texcoordSets(all channels preserved), mirrors the first usable channel onto the legacyMeshData.texcoordsseam, emits(0,0)fallback corners for empty channelsTextureCoordinate3D/4Dpoint arrays were never extractedMFVec3f/MFVec4fand projects onto the 2D(s,t)seam —(s,t)for 3D, homogeneous(s/w, t/w)for 4DTextureTransformwas handledMultiTextureTransform→ oneTextureTransform2DParamsper child, applied per-channel;TextureTransformMatrix3Dprojects its 4×4 over(s,t,0,1)shadowsIntensityFieldAliases.hppaccepts it onTextureProjectorParallelas a tolerant alias for canonicalshadowIntensityacross XML, ClassicVRML, VRML97, JSON. Writers stay canonicalHow
MeshDatagainstexcoordSets(per-channel UVs); the legacy single-channeltexcoordsis preserved and mirrors the first usable channel, so existing consumers (PickSystem, both renderers) are unaffected on the common path.applyTextureTransformsToMesh/textureTransformParamsListOfare the new plural entry points;SceneExtractorswitches to them. Identity transforms / absenttextureTransformstill early-out with no allocation.TextureTransform2DParamsgains an optionalhasMatrixpath used byTextureTransformMatrix3D.FieldAliases.hpp(codecs) is purely reader-side: it remaps accepted input spellings to canonical field names during ingest and changes no node metadata or writer output.Tests / gates
texture_extract_test: multi-texture coords (incl. empty leading channel), 3D/4D projection,MultiTextureTransform,TextureTransformMatrix3D.reader_audit_test:shadowsIntensityalias across all four encodings.mise run build-cigreen — 112/112 ctest.mise run conformance-gateclean (generated view matchesfindings.yaml).Notes / scope
texcoordSetsis forward-looking plumbing: no renderer consumes the extra channels yet, so multi-channel UVs are extracted and transformed but only channel 0 reaches the current single-texture render path. The 3D/4D → 2D projection and matrix → 2D projection are the spec-permitted implementation-dependent fallbacks onto the current single-(s,t)seam, not full volumetric/3D-texture support.