Texture Mapping Question


#1

Maybe someone can inform me a little bit in this area. I’ve done some looking around online and in RhinoCommon and can’t seem to find an answer.

I have made a Picture Frame. It produces a brep and makes a new material applied to that brep with the chosen picture as it texture. I believe this texture (the “Color” texture attribute of the material) to be a BitmapTexture with a mapping that is created when i instantiate the frame. I now split/trim the brep into several pieces, say the four quadrants of my square image. The surface with my applied image is now four new surfaces with their respective parts of the original image.

My question is this: Where/on what object is the UV mapping info of the texture stored? How can i access this mapping information per surface to determine how the image is “cropped” on each one? I understand that when a surface is trimmed, there is still only one representation of the surface but imbued with trim curve information. Yet each trimmed part of the surface has a new doc ID. Is there some sort of Brep-derived class for “TrimmedSurface”? And what is the “index” that shows up under the Render Material category in the surfaces’ object details?

EDIT: Doing a little more digging i realized that when split, four new materials are added to the MaterialTable. It seems like the mapping is maybe intrinsic to each material and therefore immutable? This would make some sense, but is it still possible to extract this data?


(Dale Fugier) #2

A picture frame is really nothing more than a surface that has a material with a bitmap texture. There is no custom UV mapping - the texture coordinates on the cached render mesh control the bitmap display.