04 April 2006 | |
![]() |
|
Know-it-All
portfolio
James Haywood
Senior Technical Artist
Bungie Studios
Seattle,
USA
|
Thanks Martin. That got me going in the right direction, along with this site: http://www.kirupa.com/developer/act...rigonometry.htm
Here's what I came up with to illustrate what I wanted to do:
|
04 April 2006 | |
![]() |
|
Know-it-All
cg artist
|
make a rotation by using a quaternion
The quaternion is easy to use to rotate a position in 3D space. You know:
1- the axis of rotation (it must be normalized) 2- the center of the rotation 3- the angle 4- the position of the point to be moved
The direction of the rotation can be modified by changing the direction of the axis. if you use rotAxis = -[0,0,2], the rotation will be reversed. Here is a variation of your function:
|
04 April 2006 | |
![]() |
|
Veteran
student
|
hi all
i am trying to make a sort of "one axis lookat" scriptcontroller. object_a is flying around in 3d space and object_b is located at position [0,0,0] object_b has a script_contoller at the z-rotation so that it looks at object_a. this is what i have so far as scriptcontroller for object_b z-rotation: -----------------------------------------
------------------------------------------------------------------- it does not work any ideas??? thanks Last edited by proteus2002 : 04 April 2006 at 09:55 AM. |
04 April 2006 | |
![]() |
|
Veteran
student
|
this seems to work:
But is there a way not to use the matrix3 calculations? any ideas??? |
04 April 2006 | |
![]() |
|
Frequenter
portfolio
haibo lan
Shanghai,
China
|
thanks a lot .
that is great topic . espacially the math website , thanks .
__________________
-- to be better every day -- google talk : haibo.lan@gmail.com msn: ehblan@hotmail.com -- add me to ur IM buddy list as u wish. |
05 May 2006 | |
![]() |
|
dRaster.com
portfolio
Andrew Johnson
dRaster, Inc.
Irvine,
USA
|
I concur... this is really great, props to prettyPixel and everyone else that contributed!
|
06 June 2006 | |
![]() |
|
New Member
sleepite
Interactive designer
Changeling
United Kingdom
|
Originally Posted by proteus2002:
...But is there a way not to use the matrix3 calculations?
any ideas??? The code I use for doing a look-at type operation is:
Last edited by sleepite : 06 June 2006 at 10:33 AM. |
08 August 2006 | |
![]() |
|
Frequenter
RR
london,
United Kingdom
|
THought this might be the best topic to post it:
I have this camera data: posz=-12.896441 posy=10.177296 posx=-248.952271 And this for the angle: anglez=1.000000 angley=0.000000 anglex=0.000000 this is how they calculated the angle: angle = camera_target - camera angle = normalize angle anglex = angle.x angley = angle.y anglez = angle.z how would i go about transforming the angle from this data? how can i create a target or free camera from this? |
08 August 2006 | |
![]() |
|
Frequenter
arketip
Bruxelles,
Belgium
|
I prefer to rename "angle" in "direction" because the angle can remind the angle of the camera (fov)
Regrettably your data are not complete : the camera's FOV is missing. |
08 August 2006 | |
![]() |
|
Frequenter
RR
london,
United Kingdom
|
Thanks for your reply but i already solved it. I did it slightly different though:
camera_target_position = point3 (posx + directionx*10) (posy + directiony*10) (posz + directionz*10) Which returns the correct 'direction'. Oh and you dont need a FOV to create a camera, it uses default setting when you leave it out. |
10 October 2006 | |
![]() |
|
Frequenter
portfolio
xiss burg
2D/3D Artist, Programmer
Santo Andre,
Brazil
|
I just wanna give you two link for resources about geometry (intersections , distance computations etc):
http://www.softsurfer.com (algorithms section) http://www.geometrictools.com Hope this helps |
12 December 2006 | |
![]() |
|
Repeat-customer
Dave Stewart
Animator / scripter
United Kingdom
|
Great thread! Seeing basic concepts as code snippets is fantastic!
I do think that the posting of questions (as opposed to answers) clutters the "repository" feel, though. For those asking (new and unrelated) questions wouldn't it be more helpful to start and finish a new thread, THEN post (a concise answer) here? ![]() |
12 December 2006 | |
![]() |
|
Stealthy Tea Monkey
portfolio
Martin Brennand
VFX Artist
Melbourne,
Australia
|
Originally Posted by davestewart:
I do think that the posting of questions (as opposed to answers) clutters the "repository" feel, though. For those asking (new and unrelated) questions wouldn't it be more helpful to start and finish a new thread, THEN post (a concise answer) here? ![]() This is being transferred to the CGWiki bit by bit, so the information can be kept clean: http://wiki.cgsociety.org/index.php...ns_%283dsmax%29 __________________
"There Really is No Secret" Martin Brennand - mocha Product Manager - Imagineer Systems |
12 December 2006 | |
![]() |
|
New Member
Yuen
Cartago,
Costa Rica
|
point-segment distance
Hy all,
I am new at maxscript and I want to calculate the shortest distance between a vertex in a skin and a bone. Can someone help me? -edit- ok, i modified pretty pixel's code and got this:
not sure if it is 100% correct, i have other issues but will start a new thread for that. Last edited by yuenlw : 12 December 2006 at 09:55 PM. |
03 March 2007 | |
![]() |
|
random data generator
portfolio
Georg Duemlein
New Zealand
|
L-system - definitve book
The Algorithmic Beauty of Plants can be downloaded here as PDF:
http://algorithmicbotany.org/papers/ This is the 'definitve book' about L-Systems (see also Challenge #16). Sometimes you can find a printed version in 'antique shops' - get it! I ordered mine some weeks ago, hope it arrives soon ... Georg __________________
Georg Duemlein |
reply share thread |
«
Previous Thread
|
Next Thread
»
|
|
|