Rhino Loader in three.js: texture UVs messed up

I am building a simple 3D viewer using three.js and the 3dm Loader library to load 3dm files (containing meshes).

I create a mesh in Grasshopper and apply Box Mapping to it. The whole thing looks like this in Rhino:

Once I load the 3dm file in three.js though, it seems as though the box mapping has gone missing and has caused some weird UV mapping:

Anybody know what could be causing this? How come the UV maps are all messed up? Is it the 3dm loader?

Thanks for any hints.

box-mapping-10-mm_O10_W94_H45_A724_rhino.3dm (565.3 KB)

Never mind, found the answer. It is to do with three.js’s default handling of UV values over 1, which it clamps.

You have to set the wrap mode of each texture to RepeatWrapping.


1 Like