Recent Posts

Pages: [1] 2 3 ... 10
1
Support / Re: Camera rotation.
« Last post by EgonOlsen on May 14, 2018, 07:53:46 am »
Code: [Select]
camera.getBack().setIdentity();

might be a little more efficient.
2
Support / Re: Camera rotation.
« Last post by JakubBaku on May 13, 2018, 12:20:48 pm »
Okay I figured it out:
Code: [Select]
Matrix m = new Matrix();
m.rotateY(new angle);

camera.setBack(m);
3
Support / Camera rotation.
« Last post by JakubBaku on May 13, 2018, 12:06:32 pm »
Hi, I'm starting with jPCT and I'm trying to make a moving camera but every single method in camera class just increments the already set angle and what I want to do is to SET angle, not INCREMENT it. Any thought on that one? Thanks in advance :P
4
Support / Re: Now this looks like a Java 10 Thing
« Last post by AGP on May 10, 2018, 06:49:54 pm »
I've tried both -Dsun.java2d.d3d=false and -Dsun.java2d.opengl=false. Neither has solved this annoying issue. One of the reasons I so like the software renderer right there. Still, I'd like for this to go away.
5
Bones / Re: Parsing SkinClipSequence
« Last post by AGP on May 08, 2018, 10:18:15 pm »
I feel like this could be a sticky. It's working, and it will prove very helpful. The ArrayList is there because I was originally testing for nulls before adding to it, but it may as well be removed for performance (although this is the kind of performance that doesn't really matter because you only run this code once before creating your .bones file.

Code: [Select]
     private void firstFrameToLast() {
SkinClipSequence sequence = animatedGroup.getSkinClipSequence();
for (int i = 0; i < sequence.getSize(); i++) {
     SkinClip clip = sequence.getClip(i);
     java.util.Iterator<JointChannel> jCs = clip.iterator();
     ArrayList<JointChannel> jointChannels = new ArrayList<JointChannel>();
     while (jCs.hasNext()) {
JointChannel jC = jCs.next();
     jointChannels.add(jC);
JointChannel channel = jC;
int index = channel.getJointIndex();
float[] times = channel.getTimes();
SimpleVector[] translations = channel.getTranslations();
Quaternion[] rotations = channel.getRotations();
SimpleVector[] scales = channel.getScales();
translations[translations.length-1] = translations[0];
rotations[rotations.length-1] = rotations[0];
scales[scales.length-1] = scales[0];
channel = new JointChannel(index, times, translations, rotations, scales);
clip.removeChannel(jC);
clip.addChannel(channel);
     }
}
saveToBones(objectFileName.substring(0, objectFileName.lastIndexOf("."))+".bones");
System.out.println("Last Frame Replaced With First");
Toolkit.getDefaultToolkit().beep();
     }
6
Bones / Re: Parsing SkinClipSequence
« Last post by AGP on May 08, 2018, 08:38:19 pm »
Thanks a lot.
7
Bones / Re: Parsing SkinClipSequence
« Last post by raft on May 08, 2018, 07:51:07 pm »
okay, exposed a copy of internal data structures in JointChannel. please re-download.

hope this helps
8
Bones / Re: Parsing SkinClipSequence
« Last post by AGP on May 08, 2018, 06:26:02 pm »
They just implemented multiple animations and I just learned a trick to split them. But I still have a problem with the last (occasionally first) frame, which breaks an otherwise perfect loop. Control over the SkinClips would serve all kinds of purpose, and the ability to fix this would be one of them.
9
Bones / Re: Parsing SkinClipSequence
« Last post by raft on May 08, 2018, 05:44:50 pm »
SkinClip is the analogue of sub sequence in jPCT's Animation class. It's for whole skeleton, JointChannel is only for a joint in skeleton.

I can expose the internal data in JointChannel, but may not be trivial to split a channel's animation into shorter ones.

It's a bit weird EasyOgreExporter doesnt support multiple animations, it's written 'multiple Skeleton Animations' in their web page. Anyway, if that is the case, I would suggest, export each animation into a different file, and merge them with Bones, so you will end up with separate animations. merging can be done either with scripts (multiple input files) or programatically with AnimatedGroup.mergeAnimations(..) method.
10
Bones / Re: Parsing SkinClipSequence
« Last post by AGP on May 08, 2018, 07:32:15 am »
From what I gather, it's the JointChannels themselves, rather than their number, that I need to split here. But Bones doesn't give me access to that. Would you be willing to change that?
Pages: [1] 2 3 ... 10