Help & Feedback
Work in progress
Indespensible MaxScripts, Plugins and 3rd Party Tools
The allmighty FREE Resources Thread !
The Life of a Sea Turtle - Tutorial by mrgrotey
Maxforums member photo gallery index
Maxforums Member Tutorials
three cheers to maxforums...
101 Things you didnt know in Max...
A Face tutorial from MDB101 :D
Maxforums.org Members Gallery
SON OF POST YOURSELF
Dub's Maxscript Tutorial Index
Maxunderground news unavailable
Xforming a texture to sweep in maxscript
I'm facing this task:
I have a lot of splines with different lenghts(with a sweep modifier on them and generate mapping on).
I have one texture for all of them.
I have to uvxform every piece in order to fit correctly the texture repetition.
Can you suggest a way to do it via script?
Practically and in other words, say the texture is 2048x256.
Say I need to repeat it horizontally in a segment which is 10 meters long and then adapt it so it has the same aspect on a segment which is 1 centimenter long.
Manually, I'd go with uvwxform modifier and in every " u tile" spinner, I'd be changing it's value.
Edit: The effect would exactly be the same of using real world map size (but of course I can't use it, for the sake of this specific task)
read 372 times
7/1/2014 3:30:37 PM (last edit: 7/1/2014 4:24:39 PM)
You can get the length of the spline with this:
splineLength = curveLength yourSpline curveIndex
Curve index is the index of the spline you are interested in - a single spline shape can have multiple "curves" in it - this index ensures you are getting the length of the right one.
yourSpline is obviously the splineshape object you are talking about.
With the length information, you can just calculate an appropriate tiling number and apply it to the tiling attributes of the spline UVs.
read 333 times
7/3/2014 4:25:54 AM (last edit: 7/3/2014 4:25:54 AM)
Done. Thanks Dub!
read 324 times
7/3/2014 8:21:52 AM (last edit: 7/3/2014 8:21:52 AM)
Open chat window