Author Topic: create a pyramide pointing some location  (Read 10117 times)

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: create a pyramide pointing some location
« Reply #15 on: December 31, 2009, 04:45:36 pm »
mm, i need to investigate it further..

their look at method is something like:

Code: [Select]
       
        direction.normalize(zAxis); // stores normalized in zAxis
        up.normalize(xAxis).crossLocal(zAxis);
        zAxis.cross(xAxis, yAxis);

        fromAxes(xAxis, yAxis, zAxis);

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: create a pyramide pointing some location
« Reply #16 on: December 31, 2009, 05:30:22 pm »
The algorithm looks the same. However, i've updated the beta-jar with a version that offers a new getRotationMatrix(<SimpleVector>)-method in SimpleVector that takes an additional up-vector. Maybe trying that with an actual jPCTish up vector (0, -1, 0) shows different/better results.

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: create a pyramide pointing some location
« Reply #17 on: December 31, 2009, 05:47:14 pm »
this new getRotationMatrix(0,-1,0) method bahaves exactly the same as no arg one for this case.
thanks. i'll look for a reliable up vector

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: create a pyramide pointing some location
« Reply #18 on: December 31, 2009, 06:28:15 pm »
and here is a skinned capture rendered in jPCT ;D
www.aptalkarga.com/tmp/seymour.ogv

edit: updated the link with a more correct version (bones weren't rendered correctly)
« Last Edit: January 01, 2010, 09:56:32 pm by raft »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: create a pyramide pointing some location
« Reply #19 on: December 31, 2009, 07:06:18 pm »
Very nice.  Is the skeletal animation system also an Ardor port or are you using the loader only?

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: create a pyramide pointing some location
« Reply #20 on: December 31, 2009, 07:18:39 pm »
indeed all is Ardor's at the moment. except, at the very last stage, ardor's matrix is converted into jPCT's and used in IVertexController.
i'm planning to convert all data to jPCT at load time allowing to be serialized standalone and later reloaded without Ardor