Help automating the objects' texture scale of surface mapping

Hi all,

I’m working on a project which needs modification all the time. I’m trying to automate as much as possible.

I’m now stuck at automating the objects’ texture scale based on surface mapping.

Basically, there are two ways to do this. One is to use the UVEditor, which I can use the rhinoscriptsyntax.command to work in python but I need to click the “Apply” button manually. The other way is to modify the texture mapping’s UVW repeat which I cannot find anything in Grasshopper and in Python.

I found two helpful posts but I’m still stuck at some point:

Any help would be greatly appreciated!

Thanks,
Haotian

Hi Haoitan - I do not have a good enough idea of what it is you’re trying to accomplish - can you post an example?

-Pascal

Pascal,

Thanks for the reply.

I’m automating the process of modeling an architecture I’m designing.

I bake objects in grasshopper with layers and group numbers. (I already assigned materials for layers)

However, the scale of material is not always good. But I applied one material for many objects so that changing the scale of texture for material doesn’t work. And since the surface is a slice of a deformed cone, the default surface texture mapping works the best.

The usual way I do this is to change the uvw repeat. But I didn’t find anything in grasshopper or python for rhino.

Then, I learned from one of your posts to put rhino commands with rs.command in python. I thought I can change the UV scale of objects’ mesh through UVEditor. However, I found that I need to click the “Apply” button manually.

That’s where I’m stuck in.

Thanks,
Haotian

Hi Haotian… I’ll poke around - I don’t know how easy this mapping stuff is in Rhino Common - it looks like it’s possible to set the repeat though, I’ll have a try.

-Pascal

Set the repeat in Rhino Common will be perfect. Thank you for the help.

1 Like