Hello,
I am working on rendering a revit scene in my own application and am having trouble getting the correct UVs.
Currently I am using the CustomExporter to get the UV scale and offset from RealWorldScale and RealWorldOffset X and Y. We don't want to export the full UVs because it would take too long. Instead, what we do is get the vertices for each face by calling Triangulate. Then, get the UV axes for that face and project the vertex point onto the UV plane. We use the resulting value as our UV value.
After getting the UV, we apply the appropriate scale and conversion to meters and end up with correct looking UVs, except for the fact that they are offset along the V by some amount that is unclear. We have found a temporary work-around, which is to offset the V by 1/2 the V scale value, but this only works for some surfaces, not all. Interesting note is that when we used the exported Face UVs instead of the projection UV method, we still had the same problem.
My question is: does anyone know of a way to get accurate UVs from the Revit API directly without using the exporter? Also, I am curious to know the technique Revit uses to do its UVs?