I'm working with a SEA3D model, loaded as BufferGeometry, and adding externally an aoMap.
However there is some problem with both maps.
aoMap just does not affect the color of the model.In three.js documentation, there is the a reference
The aoMap requires a second set of UVs.
In BufferGeometry, I know the UV info is on the geometry.attributes.uv.
How do I get the second set of UV's so I can get the aoMap?
Thank you
You can add a 2nd set of UVs to a BufferGeometry like so:
var uvs = geometry.attributes.uv.array;
geometry.addAttribute( 'uv2', new THREE.BufferAttribute( uvs, 2 ) );
(Of course, using this pattern, the 2nd set will match the first set.)
three.js r.74
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With