Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (492)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (556)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  FREE .ms3d ANIMATED LOADER! [also a little help?]  (Read 2745 times)
0 Members and 1 Guest are viewing this topic.
Offline CyanPrime
« Posted 2012-07-05 16:32:36 »

Alright JGO, I got a really cool gift for you! It's a simple to use animated model loader!
Here is the entire package you'll need to start your 3d animated modeled games today!
Download here!

Here is how to use it:
1  
AnimatedModel model = new AnimatedModel([filename], [scale vector]);


Where [filename] is something like "C:\models\model.ms3d" and [scale vector] is a LWJGL Vector3f that re-sizes the model based on it's content.
For example to make a half width double height model you'd say
1  
new Vector3f(0.5f, 2.0f, 1.0f)


So that's that, and now you may all be wondering why I'm posting this in a help section? Well, you see. It's because I need a bit of help on a thing I'm trying to implement, where you can attach other models to joints of a master model (like master warrior is holding a sword in his left hand) what it boils down to is that I can't figure out how to get the accessory model to stay , or even get to the right place.

This is the code the accessory model uses to get it's position and rotation. It's in AnimatedModel.java
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
public Vector3f[] getJointInfo(float frame, int jointID, float myYaw){
      Vector3f[] jointInfo = new Vector3f[2];
      jointInfo[0] = new Vector3f(0,0,0);
      jointInfo[1] = new Vector3f(0,0,0);
     
      advanceAnimation(frame, true);
     
      Matrix4f worldMatrix = new Matrix4f();
      worldMatrix.load(fjm[jointID]);
      worldMatrix.invert();
       
      worldMatrix.rotate((float) Math.toRadians(myYaw), new Vector3f(0,1,0));  
      VectorRotate(joints.get(jointID).pos, worldMatrix, jointInfo[0]);
        /*roll*/jointInfo[1].z = (float) Math.toDegrees(Math.atan2(worldMatrix.m10, worldMatrix.m00));
        /*pitch*/jointInfo[1].x = (float) - Math.toDegrees(Math.asin(worldMatrix.m20));
        /*yaw*/jointInfo[1].y = (float) Math.toDegrees(Math.atan2(worldMatrix.m01, worldMatrix.m22));
      return jointInfo;
   }


So, if anyone wants to download the .ms3d model loader package and take a look at that method and help me figure out why it's not working it'd help out not only me, but everyone who decides to use this model loader.

Offline CyanPrime
« Reply #1 - Posted 2012-07-08 06:11:15 »

Going to go ahead and bump this.
Offline lhkbob

JGO Knight


Medals: 32



« Reply #2 - Posted 2012-07-08 07:07:54 »

NO

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ra4king

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #3 - Posted 2012-07-08 07:14:30 »

Shouldn't this be in the Shared Code section?

Offline CyanPrime
« Reply #4 - Posted 2012-07-08 07:17:18 »

Wow, it's like I can't even ask a question (Even when giving a gift) without a bunch of people jumping down my throat. Is this what JGO has become? Because if so this is a sad fate.
Offline ra4king

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #5 - Posted 2012-07-08 07:18:52 »

Wow, it's like I can't even ask a question (Even when giving a gift) without a bunch of people jumping down my throat. Is this what JGO has become? Because if so this is a sad fate.
What? You're the one who bumped the thread, which is ill-advised as lhkbob expressed.

I simply gave a suggestion.

We're not starting this again...

Offline CyanPrime
« Reply #6 - Posted 2012-07-08 07:22:04 »

It's a god damn 3 day old thread. I guess gouessej should be banned for how many times he's bumped TUER, huh?
I thought I was on JGO, not 4chan.
Offline ra4king

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #7 - Posted 2012-07-08 07:26:18 »

So you want to be like gouessej?

Offline CyanPrime
« Reply #8 - Posted 2012-07-08 07:38:51 »

So you want to be like gouessej?
It'd be better then being like you.
Offline ra4king

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #9 - Posted 2012-07-08 08:35:22 »

Ouch, that hurts bro. Tell you what, you don't like being here: leave. Simple as that Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Cero
« Reply #10 - Posted 2012-07-08 12:27:12 »

He simply said that this topic, in which you share code should be in another section, the shared code section

nobody is jumping down anyone's throat...

this being kind of a complex 3d problem I guess, and people have to download it, to look at it, it would be best if you provide more information and thoughts instead of "bump" when bumping
if people dont care, a simple bump with nothing interesting wont temp them, just annoy them

Offline theagentd
« Reply #11 - Posted 2012-07-08 13:25:18 »

Sadly, not many people here seem to have done bone animation. I've tried GameDev.net too, but the people there aren't very helpful. I've also just gotten some basic stuff working, so I don't think I can help...

Myomyomyo.
Offline lhkbob

JGO Knight


Medals: 32



« Reply #12 - Posted 2012-07-08 18:10:14 »

My problem (and the reason for the cranky post last night) was that this isn't really a gift. 90% of the reason he's releasing the code is so someone else can solve his problems.  This appears to be a valuable project, so he ought to use bitbucket, googlecode or github to create an opensource project for it.

Then the help he gets is contributions, but we know he's serious about actually sharing it. Instead it looks like he got stuck, and instead of coming back a few days with progress to show he's still trying to solve it, we get a bump. It looks like he is expecting us to lay down our own work, dig through his code, and then solve his problems while he relaxes.

Offline theagentd
« Reply #13 - Posted 2012-07-08 23:00:24 »

My problem (and the reason for the cranky post last night) was that this isn't really a gift. 90% of the reason he's releasing the code is so someone else can solve his problems.  This appears to be a valuable project, so he ought to use bitbucket, googlecode or github to create an opensource project for it.

Then the help he gets is contributions, but we know he's serious about actually sharing it. Instead it looks like he got stuck, and instead of coming back a few days with progress to show he's still trying to solve it, we get a bump. It looks like he is expecting us to lay down our own work, dig through his code, and then solve his problems while he relaxes.
The combined time we have used to flame him would've been enough to solve the problem by now.

To stay on topic: It might just be a data problem. Have you checked everything?

Myomyomyo.
Offline davedes
« Reply #14 - Posted 2012-07-09 00:21:40 »

Can't download the code. Maybe re-upload it?

You should upload on github -- this project sounds useful. Smiley

Offline CyanPrime
« Reply #15 - Posted 2012-07-09 01:00:33 »

Can't download the code. Maybe re-upload it?

You should upload on github -- this project sounds useful. Smiley

Sorry about that, I updated the link.

@theagentd A data problem? I'm almost 100% sure it's a math problem, but maybe I'm misunderstanding you, could you elaborate on what a data problem is?
Offline theagentd
« Reply #16 - Posted 2012-07-10 15:05:20 »

Yeah. The models have to have the exact same bind pose skeletons or it won't work. Maybe you've already checked that though. =P

Myomyomyo.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

Nickropheliac (16 views)
2014-08-31 22:59:12

TehJavaDev (23 views)
2014-08-28 18:26:30

CopyableCougar4 (33 views)
2014-08-22 19:31:30

atombrot (42 views)
2014-08-19 09:29:53

Tekkerue (41 views)
2014-08-16 06:45:27

Tekkerue (35 views)
2014-08-16 06:22:17

Tekkerue (26 views)
2014-08-16 06:20:21

Tekkerue (37 views)
2014-08-16 06:12:11

Rayexar (73 views)
2014-08-11 02:49:23

BurntPizza (49 views)
2014-08-09 21:09:32
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!