Orientation of BMP-asset when creating new Revit materials using GH

Hi all!

I’m currently working on a big facade made up of multiple perforated metal plates that forms a repeating pattern. I have all patterns as black and white image files that I want to use as a 1:1 scale cutout for the material to visualize the final pattern/building in Revit and Enscape.

Based on the Revit curtain panel geometry i recreate the surfaces using GH (because i dont want boxes with a back side, just a single surface with no thickness) in RiR.

Then, using GH, I create multiple materials with the image files as cutouts that I assign to each panel geometry (each image file also exists in four different colours to add to the complexity).

This all works fine on the south facade oriented in the Revit XZ-plane, however for all panels on the west and east facade the cutouts are all messy, rotated 90 degrees and misaligned.

The south facade in Revit Realistic Style (looks good):

The west facade, all messed up:

…I figure this has to something to do with how Revit orients the material in 3-dimensional space, but I was unsure if the problem was with RiR och just Revit. Therefore i made some tests.

First i made a test material using this image:

This material I assigned to Revit curtain panels arranged as a box with two rows and it all looks good, I’ve discovered Revit centers the texture on the curtain panel by default:

Then, I tried to recreate the texture placement using GH in RiR, by creating new surfaces with the Geo.Direct Shape component and creating new materials which should be identical the how the previous Revit material was set up. However the orientations are now messed up in two out of the four sides.

image

I thought maybe it could be the surfaces UV-directions differing but they look good to me.
image

After that I made a box with some rotation in the xy-plane to see how it affects the orientation, and I’m not sure what to make of the results.

With just the slightest rotation, the two sides in the front are correct, however the other turned 180 degrees upside down.

Then, reaching 180 degrees, two sides now flip 90 degrees again.

Moving away from 180 degrees the pattern repeats itself.

I could be separating my panels into groups based on their orientation to bypass the problem, but that would leave my unsatisfied as i dont understand whats going on here.

If anyone could share some insight in how to control the texture orientation i would be happy to be enlightened :smiley:

I’m sharing with you my test files if anyone would be interested to look into whats going on.
test-texturemapping_RiR.rvt (1.9 MB)
RiR_PanelMaterial_Test_210305.gh (34.2 KB)

Best
Carl

Well, I digged a little bit deeper and found there is an issue using direct shape and material orientation… Perhaps I’m better of using some other method than the direct shape component. Maybe going for some simple single surface family that can adapt its size to mimic the direct shape surface or similiar.

Just to report back in on the progress, i bypassed the problem by separating the panels by orientation and then applied some different corrections by trial and error to the textures based on their orientation.

Final textures towards west:

Final textures towards south:

Part of the GH-solution to overcome the warped textures:

Still dont get the logic by the texture orientations when using DirectShape however!