[x3d-public] Extrusion texture coordinates

Andreas Plesch andreasplesch at gmail.com
Sat Jul 12 23:39:00 PDT 2025


Looking into how to generate texture coordinates for Extrusions with all
coincident spine points, I noticed this section in the spec.:

"Textures are mapped so that the coordinates range in the U direction from
0 to 1 along the crossSection curve (with 0 corresponding to the first
point in crossSection and 1 to the last) and in the V direction from 0 to 1
along the spine curve (with 0 corresponding to the first listed spine point
and 1 to the last)."

V varies along the spine from 0 to 1. The spec. does not define how V
should vary. x3dom uses the distance between spine points to define V.
Another option may be to use the index of a spine point to define V. There
may be other strategies.

Both options produce similar results if the spine points are regularly
spaced. However, in the case of a spine with all coincident points, the
results will be very different. Using distance, all Vs will be 0 (except
for last to satisfy the spec.). Using the index, Vs will be distributed.

Should the spec. better define how Extrusion UVs should vary ?

Cheers, -Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250713/a8544e19/attachment.html>


More information about the x3d-public mailing list