ScriptSpot

Script

Randomize UV coordinates

By klyde · 2013-10-05

Version
v 1.2
Date updated
2013-10-05
Votes
7
Description

This script randomizes UV Offsets of selected objects or selected object's elements. It's an irreplaceable tool to bring some variace to your models!

Installation:
1)MaxScript --> Run Script
2)Customize User Interface --> Toolbars --> Category "# Scripts"
3)Drag and drop "randomize UV coordinates" to any panel you want

Videos
Attachments
Comments (14)

Good Job

MichaelFahmy · 2019-12-03

Thanks, Works just fine.

1rv · 2017-08-17

logged in just for up-vote. So helpful for imported meshes from Sketchup!

uv channel

super gnu · 2015-05-21

works great for me, but no way to change the uv mapping channel? its more than a little common to have mapping in channels other than 1. any chance of a fix/workaround?

deathevor · 2015-05-20

As mentioned by somebody in comments:

Worth to add Float number to offset. Like:
i.modifiers[#UVW_Xform].u_offset = (random -2500.00 2500.00)
i.modifiers[#UVW_Xform].v_offset = (random -2500.00 2500.00)

As in some cases offset by 1 (or any integer) means full tile offset, so txture stays in the same position.

So by using float or at least decimal will fix that.

Making the shift work

theedge · 2015-03-20

I got the UV shifting to work (max 2015) by replacing these two lines


i.modifiers[#UVW_Xform].u_offset = (random -2500 2500)
i.modifiers[#UVW_Xform].v_offset = (random -2500 2500)

By these ones :


i.modifiers[#UVW_Xform].u_offset = (random -1.0 1.0)
i.modifiers[#UVW_Xform].v_offset = (random -1.0 1.0)

no shift

marobaro · 2014-07-28

Hi Alexander

I don't know if you keep an eye on this thread. If you do - the script doesn't quite work the way, which I think you intended in max 2014 (x64). In your video, it is clearly demonstrated that you are able to just shift the UVWs by element (the beginning of the vid). Sadly this functionality is missing for me (and I suspect others judging by their questions). I am only able to rotate UVWs by element. Random shift is not working :(
Is this something that you could look into, by any chance?
Thank you
Marek

no shift

klyde · 2015-03-23

Marek, I wrote this script to the real world map size approach.

marobaro · 2014-07-25

Very useful script Alexander.
Would it be possible to add option to shift (randomly) the UVWs rather than rotating them? Important if you want to break the continues pattern, but retain directionality (i.e. wood grain on panels, or parquet, etc.)
Thank you

Very useful script

klyde · 2015-03-23

Marobaro, if you disable rotation, you'll got that you want.

nice script

oncire · 2013-12-05

very usefull indeed... you can just use one texture and make it look like many textures are use (e.g. tile patterns)

Useful!

Yog · 2013-12-04

Thanks.It is useful script for me.Is it possible also add Randomize UV by Polygons?

klyde · 2014-07-15

Yes it's possible, but if you can persuade me, that it is so important, I'll recommend you to use split commad for all edges of an object instead.

Perfect

fede4383 · 2013-10-11

works perfect for me in max 2014. Thanks

Please

barufinho · 2013-10-09

Max 2011 and 2013 randomize UV by Element, randomize UV by object not run.