Skocz do zawartości
View in the app

A better way to browse. Learn more.

Max3D.pl

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Napisano

Ot - taki sobie pomysł na narzędzie.

Może ktoś będzie miał jakąś dobrą ideę jak to rozwijać dalej:

 

{

$sel = `ls -sl`;

$joint = $sel[0]; // selected joint
$childs = `listRelatives -c $joint`; 
$childJoint = $childs[0]; // his first child joint

$conn = `listConnections -t "skinCluster" $sel[0]`; //this is a first skin cluster connected to the joint
$meshes = `listConnections -t "mesh" $conn[0]`; // meshes connected to the joint
$vertsNum = `polyEvaluate -v $meshes[0]`; // number of a verts in a mesh

string $influencedVerts[]; // influenced verts init

float $subJointsNum = 5; // number of subjoints (later to be controlled with a passed argument
float $vertDots[]; // dot products of vertex  joint vectors. Needed to estimate the position against the joint's X-axis.

$jointPos = `xform -q -ws -t $joint`;
$childPos = `xform -q -ws -t $childJoint`;

float $vecX = $childPos[0] - $jointPos[0];
float $vecY = $childPos[1] - $jointPos[1];
float $vecZ = $childPos[2] - $jointPos[2];

vector $jointVector = >;

string $newSkinJoints[];
$newSkinJoints[0] = $joint;

// CREATE SUBJOINTS

for ($a = 1; $a 	$njX = ($vecX * ((1 / $subJointsNum) * $a)) + $jointPos[0];
$njY = ($vecY * ((1 / $subJointsNum) * $a)) + $jointPos[1];
$njZ = ($vecZ * ((1 / $subJointsNum) * $a)) + $jointPos[2];
$roo = `joint -q -roo $joint`;
$o = `joint -q -o $joint`;
$rad = `joint -q -rad $joint`;
$newJoint = `joint -p $njX $njY $njZ -roo $roo -rad $rad[0] -n ($joint +"_"+$a + "_rotator")`;
//-o $o[0] $o[1] $o[2] 
$newSkinJoints[size($newSkinJoints)] = $newJoint;
}
$newSkinJoints[size($newSkinJoints)] = $childJoint;
parent $newSkinJoints[size($newSkinJoints) - 1] $newSkinJoints[size($newSkinJoints) - 2];


// LOCK ALL INFLUENCES EXCEPT THE SPLITTED JOINT

$influ = `skinCluster -q -inf $conn[0]`;
for ($inf in $influ){
setAttr ($inf + ".liw") 1;
}
setAttr ($joint + ".liw") 0;
//setAttr ($childJoint + ".liw") 0;

// ADD INFLUENCES TO THE SKIN CLUSTER

for ($a = 1; $a 	skinCluster -e -wt 0 -ai $newSkinJoints[$a] $conn[0];
}

//REGISTER ALL INFLUENCED VERTS IN ONE ARRAY

for ($a = 0; $a 	$val = `skinPercent -t $joint -q $conn[0] ($meshes[0] + ".vtx[" + $a + "]" )`;
if ($val > 0) $influencedVerts[size($influencedVerts)] = $a;
}


for ($vertNum in $influencedVerts){
$vertPos = `xform -q -t -ws ($meshes[0] + ".vtx[" + $vertNum + "]")`;
float $vertPosX = $vertPos[0] - $jointPos[0];
float $vertPosY = $vertPos[1] - $jointPos[1];
float $vertPosZ = $vertPos[2] - $jointPos[2];
vector $vertVector = >;
$vertDot = `dot $jointVector $vertVector`;
$jointVecMag = `mag $jointVector`;
if ($jointVecMag > 0){
	$vertDot = $vertDot / $jointVecMag;
	$vertDot = $vertDot / $jointVecMag;
	$vertDots[size($vertDots)] = $vertDot;
}

$vertexJointNum = $vertDot / (1 / $subJointsNum);
float $floorJoint = `clamp 0 (size($newSkinJoints) - 1) (floor($vertexJointNum))`;
float $easeVal = $vertexJointNum - $floorJoint;
int $floorInt = $floorJoint;
int $floorIntClamp = `clamp 0 (size($newSkinJoints) - 1) ($floorInt+1)`;
float $vtxBaseWt = `skinPercent -t $newSkinJoints[0] -q $conn[0] ($meshes[0] + ".vtx[" + $vertNum + "]")`;
skinPercent -tv $newSkinJoints[0] 0 $conn[0] ($meshes[0] + ".vtx[" + $vertNum + "]");
skinPercent -tv $newSkinJoints[$floorInt] ($vtxBaseWt - ($vtxBaseWt * $easeVal)) $conn[0] ($meshes[0] + ".vtx[" + $vertNum + "]");
skinPercent -tv $newSkinJoints[$floorIntClamp] ($vtxBaseWt * $easeVal) $conn[0] ($meshes[0] + ".vtx[" + $vertNum + "]");
}

}

  • Odpowiedzi 6
  • Wyświetleń 1k
  • Created
  • Ostatniej odpowiedzi

Top Posters In This Topic

Napisano

no ok, szacun, tylko po co ? maya to jeden wielki majdan, ktory niebawem sie wykrzaczy, tylko na to czekam, ale masz 5+

Napisano
  • Autor
no ok, szacun, tylko po co ? maya to jeden wielki majdan, ktory niebawem sie wykrzaczy, tylko na to czekam, ale masz 5+

 

nie wiem czy nie zauważyłeś ale ten "majdan" to wciąż jedyne słuszne narzędzie do animacji przy pełnych metrażach i szybko się to nie zmieni.

Napisano
nie wiem czy nie zauważyłeś ale ten "majdan" to wciąż jedyne słuszne narzędzie do animacji przy pełnych metrażach i szybko się to nie zmieni.

 

pffff..... to mi argument zes znalazl, ze wszyscy jezdza na zimowkach latem to znaczy ze i ty musisz ? masz potencjal nie marnuj go,

Napisano
Hmmm, czy mi sie zdaje, czy w Majce jest juz narzedzie do zmian w szkielecie po zeskinowaniu?

 

to bedzie w 2015

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Powiadomienie o plikach cookie

Wykorzystujemy cookies. Przeczytaj więcej Polityka prywatności

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.