[Closed] UV Flow Calculation
I’m trying to figure out the best solution for guessing a good UV for a polygon resulting from a Cap Holes Modifier (or Epoly cap holes). At the moment, I’m just applying a UVWMap() to the resulting face. But this never automatically matches any of the surrounding UVs.
Ideally, the Cap Holes function would flow the UVs from the adjacent side of the first edge across the resulting polygon–and would apply across the whole polygon. But Cap Holes sadly only adds a guessed UV to the first tri of the Polygon.
I’ve done all the searches I can think of on Google for this, but almost always come back to similar questions I’ve made about related UVW topics.
Does anyone have a working solution in MAXScript to take any arbitrary polygon and get the transform of the polygon in UVW so that it can be re-used in another arbitrary face (via the a UVWMap gizmo transform or the polyop.applyUVWMap() method.)
In other words, I’d like to be able to do something like this:
uvtransform = getUVWTransformOfPolygon poly channelId sourcePolygonID
polyop.applyUVWMap poly #planar targetFaceId tm:uvtransform channel:channelId
Ideally, there would be a helper function as well to calculate the target uvtransform as it would be offset in world space between the source polygon and target.
In the following image, there are two object adjacent to one another. How would I get the appropriate UV from the Red Polygons and get them to apply to the Polygons represented with blue and black?