Overall Flow Diagram
This presentation is the property of its rightful owner.
Sponsored Links
1 / 10

Overall Flow Diagram PowerPoint PPT Presentation


  • 66 Views
  • Uploaded on
  • Presentation posted in: General

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

Download Presentation

Overall Flow Diagram

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


Overall flow diagram

Overall Flow Diagram


Interpolator problem

Interpolator Problem


Main wrl integration done

Main.wrl-(Integration done!)

DEFbuttons Group {}

DEF containers Group{}

DEF scripts Group{}


Main wrl integration done1

Main.wrl-(Integration done!)

DEFbuttons 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.isActiveTO assignWeights.start

ROUTE LoadInterpolatorsButton.isActiveTO loadInterpolators.start

ROUTE AnimateButton.isActive TO ENGINE.start


Main wrl integration done2

Main.wrl-(Integration done!)

DEFcontainers 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!)

DEFscripts 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.isActiveTO loadInterpolators.start

ROUTE AnimateButton.isActive TO ENGINE.start


Main wrl integration done4

Main.wrl-(Integration done!)

DEF putSkeletonInHumanoid Script {

eventIn MFNodestart

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!)

DEFassignWeights Script {

directOutput TRUE

fieldSFFloatthreshold 8.5

field SFNode humanoid USE HUMANOID

#field SFNode mcSkin USE mocapSkin

field MFVec3f coordList []

field SFNode joint NULL

field MFNodejointList []

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 SFBoolstart

eventIn MFNoderouteTimerToInterpolators

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 SFStringfromEventOut "fraction_changed"

field SFStringtoEventIn "set_fraction"

field SFNode jtoNode NULL

field SFStringjfromEventOut "value_changed"

field SFStringjtoEventInt "set_translation"

field SFStringjtoEventInr "set_rotation"

field SFNode humanoidContainer USEimportedSkeleton

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);

}

"

}


  • Login