Overall Flow Diagram
Download
1 / 10

Overall Flow Diagram - PowerPoint PPT Presentation


  • 95 Views
  • Uploaded on

Overall Flow Diagram. Interpolator Problem. Main.wrl- (Integration done!). DEF buttons Group {} DEF containers Group{} DEF scripts Group{}. Main.wrl- (Integration done!). DEF buttons Group { #Button to load skeleton #Button to load skin #Button to load skin #Button to load animation

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Overall Flow Diagram' - elden


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript


Main wrl integration done
Main.wrl-(Integration done!)

DEF buttons Group {}

DEF containers Group{}

DEF scripts Group{}


Main wrl integration done1
Main.wrl-(Integration done!)

DEF buttons Group {

#Button to load skeleton

#Button to load skin

#Button to load skin

#Button to load animation

#Button to animate

}

ROUTE LoadSkeletonButton.isActive TO loadSkeleton.start

ROUTE LoadSkinButton.isActive TO loadSkin.start

ROUTE AttachWeightsButton.isActive TO assignWeights.start

ROUTE LoadInterpolatorsButton.isActiveTO loadInterpolators.start

ROUTE AnimateButton.isActive TO ENGINE.start


Main wrl integration done2
Main.wrl-(Integration done!)

DEF containers Group {

DEF importedSkeleton Group{}

DEF importedSkin Group{}

DEF importedInterpolators Group{}

}

ROUTE importedSkeleton.children_changed TO putInHumanoid.start

ROUTE importedSkin.children_changed TO putInHumanoid.skinCalled

ROUTE importedInterpolators.children_changed TO loadInterpolators.routeTimerToInterpolators


Main wrl integration done3
Main.wrl-(Integration done!)

DEF scripts Group {

#loadSkeleton

#loadSkin

#putInHumanoid

#assignWeights

#loadInterpolators

#animate

}

ROUTE LoadSkeletonButton.isActive TO loadSkeleton.start

ROUTE LoadSkinButton.isActive TO loadSkin.start

ROUTE AttachWeightsButton.isActive TO assignWeights.start

ROUTE LoadInterpolatorsButton.isActive TO loadInterpolators.start

ROUTE AnimateButton.isActive TO ENGINE.start


Main wrl integration done4
Main.wrl-(Integration done!)

DEF putSkeletonInHumanoid Script {

eventIn MFNode start

eventIn MFNode skinCalled

directOutput TRUE

field SFNode humanoid NULL

url "javascript:

function start(value)

{

humanoid=value[1];

print('in first'+humanoid);

}

function skinCalled(value)

{

//print(value[0]+','+value[1]);

humanoid.humanoidSkin=value[1];

humanoid.skinCoord=value[0];

}

"

}


Main wrl integration done5
Main.wrl-(Integration done!)

DEF assignWeights Script {

directOutput TRUE

field SFFloat threshold 8.5

field SFNode humanoid USE HUMANOID

#field SFNode mcSkin USE mocapSkin

field MFVec3f coordList []

field SFNode joint NULL

field MFNode jointList []

field SFInt32 count 0

url "javascript:

function initialize() {

coordList = humanoid.skinCoord.point;

jointList=humanoid.joints;

if(count==0)

AssignVertices();

}

function AssignVertices() {

count++;

var iNumJoints = humanoid.joints.length;

for (j=0; (j<iNumJoints) ; j++) {

var currentJoint = jointList[j];

joint=currentJoint;

//Go through all vertices in skin (mocapSkin)

for(v=0;v<coordList.length;v++)

{

var currentVertex=coordList[v];

//calculate distance between current vertes to joint

var distance=Math.sqrt((currentJoint.translation[0]-currentVertex[0])*(currentJoint.translation[0]-currentVertex[0])+

(currentJoint.translation[1]-currentVertex[1])*(currentJoint.translation[1]-currentVertex[1])+

(currentJoint.translation[2]-currentVertex[2])*(currentJoint.translation[2]-currentVertex[2]));

//if distance within threshold

if(distance<threshold)

{ //add vertex to affectedVertices of the joint

joint.affectedVertices[joint.affectedVertices.length]=v;

//based on the distance calculate weight of this vertex and add that to weights filed of the joint

var weight;

//needs a more logical strategy

weight=(threshold-distance)/1000*threshold;

joint.vertexWeights[joint.vertexWeights.length]=weight;

}

}

}

}

"

}


Main wrl integration done6
Main.wrl-(Integration done!)

DEF loadInterpolators Script {

directOutput TRUE

eventIn SFBool start

eventIn MFNode routeTimerToInterpolators

field MFString address ["boxman-interpolatorGroup.wrl"]

field SFNode node USE importedInterpolators

field SFString event "addChildren"

field SFNode fromNode USE TIMER

field SFNode toNode NULL

field SFString fromEventOut "fraction_changed"

field SFString toEventIn "set_fraction"

field SFNode jtoNode NULL

field SFString jfromEventOut "value_changed"

field SFString jtoEventInt "set_translation"

field SFString jtoEventInr "set_rotation"

field SFNode humanoidContainer USE importedSkeleton

field SFNode humanoid NULL

field SFNode engineNode USE ENGINE

field SFNode fn NULL

field SFString ffe "rotation_changed"

field SFString fte "update"

url "javascript:

function start(clicked)

{

//Bring in teh interpolators

if(clicked) {

print('loading interpolators');

Browser.createVrmlFromURL(address, node, event);

}

}


Main wrl integration done7
Main.wrl-(Integration done!)

function routeTimerToInterpolators(groupOfInterpolators)

{

print('animation routing');

humanoid=humanoidContainer.children[1];

var interCount=groupOfInterpolators[0].children.length;

//print(interCount);

for(i=0;i<interCount;i++)

{

toEventIn=groupOfInterpolators[0].children[i];

Browser.addRoute(fromNode, fromEventOut, toNode, toEventIn);

//routeInterpolatorsToJoints();

if(i==0)

{

Browser.addRoute(toNode,jfromEventOut,jtoNode,jtoEventInt) jtoNode=humanoid.joints[interCount-2];

}

else{

jtoNode=humanoid.joints[interCount-2-(i-1)];

Browser.addRoute(toNode,jfromEventOut,jtoNode,jtoEventInr) }

print(i+ toEventIn+jtoNode);

}

//someone!!

fn=humanoid.joints[interCount-i];

print('fn'+fn);

Browser.addRoute(fn, ffe, engineNode, fte);

}

"

}