Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / jMonkeyEngine / Re: SMD Animation on: 2005-01-24 16:24:32
I think I found the answer to this....

The description of the Milkshape format indicates:

"...the key matrices animate the reference matrices, so you have to multiply them, to get the final local joint matrix..."

So, if the engine was built with this format in mind, I need to adjust the SMD key positions by the local ref matrix.

Thanks again, cep21 that was some invaluable insight.

Todd
2  Java Game APIs & Engines / jMonkeyEngine / Re: SMD Animation on: 2005-01-24 16:01:37
Here is the function in jointController that is throwing me...  Specifically, the bold line below where the jointmovements are set to the localRefMatrix?  Why is that necessary?  Are the animations supposed to be have joint positions relative to the localRefMatrix or just relative to their parent?

Thanks again, this is really helpful.

private void createJointTransforms(float changeAmnt) {
       PointInTime now = (PointInTime) movementInfo.get(curTimePoint);
       PointInTime then = (PointInTime) movementInfo.get(curTimePoint - 1);
       for (int index = 0; index < numJoints; index++) {
                int theParentIndex = parentIndex[index];

                unSyncbeginAngle.set(then.jointRotation[index]);
                unSyncbeginPos.set(then.jointTranslation[index]);

                unSyncbeginAngle.slerp(now.jointRotation[index], changeAmnt);
                unSyncbeginPos.interpolate(now.jointTranslation[index], changeAmnt);

                tempUnSyncd.set(unSyncbeginAngle, unSyncbeginPos);
                jointMovements[index].set(localRefMatrix[index]);
                jointMovements[index].multLocal(tempUnSyncd, unSyncbeginPos);
                if (theParentIndex != -1) {
                      tempUnSyncd.set(jointMovements[index]);
                      jointMovements[index].set(jointMovements[theParentIndex]);
                      jointMovements[index].multLocal(tempUnSyncd, unSyncbeginPos);
                }
            }
}
3  Java Game APIs & Engines / jMonkeyEngine / Re: SMD Animation on: 2005-01-24 14:54:22
Hey guys, thanks for the help with this.

First, the file format is laid out in the appendix of the tutorial in the SDK for Half-life.  Also, I misspoke in my first post...the vertices are stored in local (model) space, not world space.

So, to make sure I understand....The vertices are stored in local space, so animation takes the following steps:

1) multiply the vertices by the inverse of the localRefMatrix to put them into bone space

2) multiple each vertex by the relative transform matrix of its joint

Thanks
Todd
4  Java Game APIs & Engines / jMonkeyEngine / Re: JVM Error with jME on: 2005-01-23 23:00:24
Thanks guys.

I'll go to 1.5

5  Java Game APIs & Engines / jMonkeyEngine / JVM Error with jME on: 2005-01-23 22:23:36
I am getting the following error running jME apps.  Anyone know why?

#
# HotSpot Virtual Machine Error, Internal Error
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode)
#
# Error ID: 43113F2652414D452D41503F491418160E435050005C
#
# Problematic Thread: prio=5 tid=0x0003f148 nid=0xe44 runnable
#

Heap at VM Abort:
Heap
def new generation   total 576K, used 154K [0x10010000, 0x100b0000, 0x104f0000)
 eden space 512K,  24% used [0x10010000, 0x1002f4a8, 0x10090000)
 from space 64K,  46% used [0x10090000, 0x10097750, 0x100a0000)
 to   space 64K,   0% used [0x100a0000, 0x100a0000, 0x100b0000)
tenured generation   total 5576K, used 3343K [0x104f0000, 0x10a62000, 0x14010000)
  the space 5576K,  59% used [0x104f0000, 0x10833ce0, 0x10833e00, 0x10a62000)
compacting perm gen  total 7168K, used 7125K [0x14010000, 0x14710000, 0x18010000)
  the space 7168K,  99% used [0x14010000, 0x14705778, 0x14705800, 0x14710000)
6  Java Game APIs & Engines / jMonkeyEngine / SMD Animation on: 2005-01-22 17:31:05
Hey,

I am working on an importer for SMD files.  Right now I am getting some very odd transformations...

Specifically, in SMD files the vertices are stored in worldspace, therefore each vertex needs to be multiplied by the inverse of the initial bone position to put the vertices into bone space.   Does jME expect the vertices to be stored in bone space or world space?

Also, in SMD files each frame of the animation sequence gives the starting bone position in worldspace (not as an incremental transform from the starting skeletal position).  So, how is the localRefMatrix of a jointController used in setting the transforms for the model?

Please let me know if my questions are too garbled to follow!

Thanks
Todd
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (19 views)
2014-09-12 09:08:26

Norakomi (54 views)
2014-09-10 13:57:51

TehJavaDev (63 views)
2014-09-10 06:39:09

Tekkerue (31 views)
2014-09-09 02:24:56

mitcheeb (53 views)
2014-09-08 06:06:29

BurntPizza (37 views)
2014-09-07 01:13:42

Longarmx (23 views)
2014-09-07 01:12:14

Longarmx (27 views)
2014-09-07 01:11:22

Longarmx (26 views)
2014-09-07 01:10:19

mitcheeb (34 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!