Thread: WTF! uv problem
View Single Post
# 4 19-12-2006 , 08:33 PM
enhzflep's Avatar
Subscriber
Join Date: Oct 2006
Location: Melbourne
Posts: 313
If the stuff in the helpfiles doesn't er, help then you may like the tute that Mike has done on the topic. Check it out here: Mike's UV mapping tutorial

There's also a really good one on texturing a 3 legged stool, complete with the rungs that go from leg to leg.
You'll find it here: https://www.ramyhanna.com/texturing/p...utorial01.html

For what it's worth, I'd be inclined to cylindrical map each of the fingers one-by one before perhaps automatic mapping the palm itself. Just depends on the topology of the hand I guess.


Just this week on another forum we were discussing the lack of a couple of tools that would make some UV mapping operations much easier. Of notable concern was the inability to scale UVs by an exact, numerical figure. Long story short, after playing around capturing the commands echoed in the script editor and reviewing a text I've got on MEL, the following script was developed.

Code:
// Simple MEL script to provide a UI to some of the tools commonly used
//  during the UV editing process. The script provides a way to scala and
//  rotate by numerical amounts, rather than doing it interactively.
//  While a mechanism is provided for rotating, there is none for scaling
//  Date: 18 Dec 2006 Simon Beeching

// Title of pop-up window
window -title "UV Tools";

// variables used to retrieve the values of our sliders
float $RotVal;
float $ScaleVal;

// command string to be executed when the Rotate button is pressed
// (1) Query value of the rotation slider
// (2) Rotate by this amount around <0.5, 0.5>
string $RotCmd = "$RotVal = `floatSliderGrp -q -v RotSlideVal`; \
		     polyEditUV -pu 0.5 -pv 0.5 -a $RotVal ;";

// command string to be executed when the Scale button is pressed
// (1) Query value of the scale slider, AND divide by 100, since a scale value of 1 = 100%
// (2) Scale by this amount around <0.5, 0.5>
// NOTE: Negative values are allowed here. This has the effect of scaling, AND rotating by 180 degrees
string $ScaleCmd = "$ScaleVal = `floatSliderGrp -q -v ScaleSlideVal`/100.0; \
		     polyEditUV -pu 0.5 -pv 0.5 -su $ScaleVal -sv $ScaleVal;"; 

// the layout to be used for the window
columnLayout;

// Note the difference between the definition of the controls for scale and rotation
//  the fieldMinValue and fieldMaxValue fields define the min and max values of the field.
//  this means that you can specify a number that you can't select with the slider.
// After a value has been entered that is outside the default range for the slider, the slider's
// range changes. By default, you can scale from 0-100%. By entering a value in the box, you may
// scale between -100 and +500 %
// Define the slider and button to be used for Scaling
 	floatSliderButtonGrp  -field true		// ????
 		-buttonLabel "SCALE %"		  	// Text that is on button
		-buttonCommand $ScaleCmd		// what to do when button is pressed
		-minValue 0				// default min of slider
		-fieldMinValue -100			// min value that can be entered in numeric box
		-maxValue 100				// default max value of slider
		-fieldMaxValue 500			// max value that can be entered in numeric box
		-value 0				// value of slider at start-up
 		-columnWidth 1 40			// width of column1 = 40 pixels
		ScaleSlideVal;			// name of slider

// Define the slider and button to be used for Rotating
 	floatSliderButtonGrp -field true
 		-buttonLabel "ROTATE"
		-buttonCommand $RotCmd
              -minValue 0
              -maxValue 360
 		-columnWidth 1 40 
		RotSlideVal;
showWindow();
Don't worry there's hardly anything to it, it's nearly all comments. Here's a screen shot of it when loaded.

Simon

Attached Images