WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
  #1  
Old 01-01-2009, 11:20 AM
rfam rfam is offline
Member
 
Join Date: Dec 2008
Posts: 7
thank you all.. i will wait for your help..

another question...
is there any chance to make the referentials of each body segment of the avatars visible?


Thanks again.
RM

Last edited by rfam; 01-01-2009 at 11:22 AM.
Reply With Quote
  #2  
Old 01-02-2009, 12:29 PM
Veleno Veleno is offline
WorldViz Team Member
 
Join Date: Sep 2005
Posts: 148
Hi Rfam,

It is easy to export a skeleton as an avatar, but the animations that come with the vcc_male avatar will not work with the export unless the original skeleton file is used. We can't give out the original skeleton file, but I'll check if it's alright to export a skeleton avatar for you that can use the animations.

To export a biped skeleton as an avatar within Max, select all the bones in the biped, go to Tools ----> Snapshot , then select Mesh as the snapshot type. just take one snapshot in the biped's base pose.

Next, select the root node of the new non-biped skeleton and attach all its children into one mesh. Be careful not to attach any parts of the actual biped since this can cause crashes.

Once it is all one mesh, add a Skin modifier and add all the bones from the biped, then adjusted the skinning as you wish.

Once that is done, you can follow the exporting steps in this tutorial:
http://download.gna.org/cal3d/docume.../tutorial.html
Reply With Quote
  #3  
Old 01-02-2009, 12:30 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Here is a sample script showing how to draw the skeletal structure of an avatar using on-the-fly points and lines:
Code:
import viz
viz.go()

def CreateSkeleton(avatar):
	
	points = []
	lines = []

	def traverse(bone):
		points.append(bone)
		for b in bone.getChildren():
			lines.append((bone,b))
			traverse(b)
			
	#Collect list of bones for drawing points and lines
	for b in avatar.getRootBoneList():
		traverse(b)

	#Create OTF object
	viz.startlayer(viz.LINES)
	viz.linewidth(2)
	viz.pointsize(6)
	viz.vertexcolor(viz.RED)

	for l in lines:
		viz.vertex(0,0,0)
		viz.vertex(0,0,0)

	viz.startlayer(viz.POINTS)

	for p in points:
		viz.vertex(0,0,0)

	skeleton = viz.endlayer()
	skeleton.dynamic()

	#Link each vertex to corresponding bone
	count = 0
	for b1,b2 in lines:
		viz.link(b1,skeleton.Vertex(count))
		count += 1
		viz.link(b2,skeleton.Vertex(count))
		count += 1

	for b in points:
		viz.link(b,skeleton.Vertex(count))
		count += 1

	return skeleton
	
model = viz.add('male.cfg',alpha=0.7)
model.state(2)

CreateSkeleton(model)

#Toggle avatar mesh on space key
vizact.onkeydown(' ',model.visible,viz.TOGGLE)

import vizcam
cam = vizcam.PivotNavigate(distance=3)
cam.centerNode(model)
Reply With Quote
  #4  
Old 01-02-2009, 12:46 PM
rfam rfam is offline
Member
 
Join Date: Dec 2008
Posts: 7
thank you all for your attention...

Ricardo Martins
Reply With Quote
  #5  
Old 01-02-2009, 05:00 PM
rfam rfam is offline
Member
 
Join Date: Dec 2008
Posts: 7
and there is any option to make the referentials of each body segment visible in the vizard software?

thanks,
Ricardo Martins
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:00 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC