Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / maxscript Bone Creation (orienting and end bone questions)
  RSS 2.0 ATOM  

maxscript Bone Creation (orienting and end bone questions)
Rate this thread
 
36083
 
Permlink of this thread  
avatar
  • madguru
  • Posted: 28 October 2009 07:40 AM
  • Total Posts: 49
  • Joined: 11 November 2006 03:27 PM

Hi,

I’m writing a script to create bones based off the location of point helpers in Max 2010. The point helpers have 0 rotation, and 0 scale.

1. How do I set orientation of the bones as desired?

I think the vector I use during bone creation determines this. If that is the case, what should the vector value be based off in order to control the rotation axis of the created bone.

I’m trying this:

vec=uparm_pt.pos-lowarm_pt.pos

bonesys.createbone uparm_pt.pos lowarm_pt.pos vec

but want the bone rotated differently on creation. Is there an intelligent way to code this? Are the point helpers with no rotation a good way, or should they be rotated to help?

2. How do I create an end bone via maxscript?

By creating a bone with the same start and end point, I get a messed up looking bone facing the wrong direction. What is the correct way to create an end bone via max script?

Thanks in advance!

Adnan Hussain
http://www.madguru.net



Replies: 0
avatar
  • madguru
  • Posted: 28 October 2009 10:35 AM

In regards to the bone orientation, I have tried also hard coding values for the vec value.

It works for some bones, but there are some that get created shooting off. If anyone could help me understand how best to go about this that would be great. Still wondering about creating end bones as well.

Thanks.

Adnan



Replies: 1
/img/forum/dark/default_avatar.png

well if your points are already oriented the right way you can grab the normal from the point and apply it to the bone.

i beleive to create a bone you have to use bonesys.createbone
i dont remember though look it up in maxscript help

type in “bonesys”

Author: a3dcreator

Replied: 28 October 2009 11:20 AM  
avatar
  • madguru
  • Posted: 30 October 2009 04:04 PM

Thanks for the reply. I ended up hard coding vectors so that it the user does not have to rotate the point objects.

-Adnan



Replies: 0