Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - AGP

Pages: 1 ... 3 4 [5] 6 7 ... 102
Support / Re: Animate an avatar with jpct for Android
« on: June 08, 2017, 09:14:15 pm »
If you're going with vertex animations, your best bet is MD2. You could export all the keyframes in OBJ or 3DS, but then you'd have to manually add them to your animation in jpct. MD2 will export the whole thing in a single file.

Support / Re: Animate an avatar with jpct for Android
« on: June 07, 2017, 10:57:51 pm »
Skeletal animations' main advantage is animation blending. With them, a character can, for instance, walk and talk at the same time. Much more importantly, you can transition between, say, a walk and a run seamlessly. So if you have an Ogre exporter that works for you, go for it.

Support / Oculus VR SDK
« on: June 06, 2017, 05:45:14 pm »
Has anyone ever done an example using Android Studio and the Oculus VR SDK?

Bones / Re: My Format
« on: May 25, 2017, 09:22:54 pm »
It's been dead for well over a year. There's never even been a 3ds max 2016 version (let alone 2017 or 2018). There's an EasyOgreExporter which exports multi-part models as separate models and which has not been updated in a while.

If nobody helps me, I believe that bones will go the way of the dodo. And jpct will not have a viable skeletal structure. I don't say this to be dramatic, it is just a statement of fact.

Bones / My Format
« on: May 25, 2017, 04:01:30 am »
Raft, I sent you and Egon a screenshot of my Max exporter. My format, which comes out of 3ds max fully JSON-serialized, comes with three types of animation: vertex animation for expressions, skin animation, and a third kind, which is vertex animations in place of skin animations. Now there's two reasons for the third kind: no need for a bone structure should I use the format in other platforms and, more urgently, because although I can import a model whose joints distort it intuitively, I have never been able to play a skin animation either in Bones or in Blender (or, for that matter, in a Java port of Animadead which I made). The only thing I'm exporting, having tried everything else, are the euler angles per joint per animation frame. I'm convinced that that's enough, but I can't get it to work. The weights all appear to be the same as they are in Max. I would like your help in fixing this (there's really no other reasonable way to export skinned models out of Max and into Bones anymore now that OgreMax is dead).

Support / Re: How to import vertex animations
« on: May 09, 2017, 10:53:26 pm »
I solved it instead by creating Object3Ds for each Mesh and building them all (seems crazy redundant, doesn't it?). So, hey, vertex animations work and they come out of Max serialized. Performance tests to follow.

Support / Re: How to import vertex animations
« on: May 09, 2017, 09:40:01 pm »
From the JSON file. I actually fill an array of SimpleVectors. The only way I could think to apply them to a mesh is to call Object3D.cloneMesh(false), then to use a vertex controller to change the mesh's vertices. I must be doing something wrong because no animation runs (won't work with or without toControl.setVertexController(this, true)):

Code: [Select]
public VertexController(Mesh toControl, SimpleVector[] newVertices) {
        super.init(toControl, true);
        toControl.setVertexController(this, true);
        SimpleVector[] vertices = super.getDestinationMesh();
        for (int i = 0; i < vertices.length; i++) {
            vertices[i].x = newVertices[i].x;
            vertices[i].y = newVertices[i].y;
            vertices[i].z = newVertices[i].z;

Support / Re: How to import vertex animations
« on: May 09, 2017, 08:52:16 pm »
Yes, to be more precise, right now I'm getting the infamous "The sizes of the animations meshes don't match" message. And the difference is always 8. Build(), strip(), compress() and a host of other attemps haven't changed this.

Bones / Re: How to set texture to object material
« on: May 09, 2017, 02:18:58 pm »
It doesn't seem appropriate now that I've read the rest of the thread, but it's useful to point out the following max script that I use to create texture atlases (it fails 30% of the time but it's still very useful when it works):

Support / How to import vertex animations
« on: May 09, 2017, 02:12:21 pm »
As you know, Egon, I'm writing that JSON-serialized file format. Right now, I'm working on the vertex animations. I've stored the frames in a file. The current version of the method looks like the following. But the trouble now is that the only idea I have is to clone the only Mesh instance I have and distort it with a vertex controller. But that doesn't really seem right to me.

Code: [Select]
     public static Object3D loadVertexAnimated(String fileName) {
        NoBonesImporter jImporter = new NoBonesImporter();
        ArrayList<ArrayList> objects = jImporter.getList(fileName);
ArrayList<NoBoneAnimation> importedAnimations = jImporter.getAnimations(fileName);
Object3D[] list = Object3D[objects.size()];
for (int i = 0; i < objects.size(); i++) {
     ArrayList<ArrayList> theObject = objects.get(i);
     ArrayList<ArrayList> importedVertices = theObject.get(0);
             ArrayList<ArrayList> importedUVs = theObject.get(1);
             ArrayList<ArrayList> importedFaces = theObject.get(2);
             float[] coordinates = makeCoordinates(importedVertices);
             float[] uvs = makeUVs(importedUVs);
             int[] indices = makeIndices(importedFaces);
     Object3D anObject = new Object3D(coordinates, uvs, indices,0);
     list[i] = anObject;


int numTriangles = importedVertices.size(), numFrames = importedAnimations.size();
for (i = 0; i < numFrames; i++) {
     int frame = i;
     Object3D anObject = list[i];
     Mesh aMesh = anObject.getMesh();
     NoBoneAnimation anAnimation = animations.get(i);
     String name =;
     int numFrames = anAnimation.frames.size();
     Animation animation = new Animation(numFrames);

     for (ArrayList<ArrayList> importedVertices: anAnimation.frames) {
// Create a new mesh with vertex controller?
SimpleVector[] vertices = SimpleVector[importedVertices.size()];
for (int j = 0; j < vertices.length; j++) {
      SimpleVector v = new SimpleVector(vert.get(0), vert.get(1), vert.get(2));
vertices[j] = v;
Object3D anObject = makeAnimated3D(pose, objectsBonesReferences.get(i), theObject);

Support / Re: Painting a Mouse Cursor-Selected Polygon
« on: April 11, 2017, 07:47:16 pm »
The game is coming along nicely, but now I'm just abusing the CPU. From what I gather of what you wrote, I'm not going to have a problem with the mouse (the "if it should be applied to compiled objects, one would have to switch from individual textures..." comment was only about the painting of the polygon) in hardware. Right?

Support / Re: Rotation Towards 3D Point
« on: April 11, 2017, 07:41:22 pm »
It's normalized and it does frequently (say, 5% of the time) happen that the model get rotated 90 degrees on an axis other than the world's y.

Support / Re: PolygonManager.getTransformedVertex is Unreliable
« on: April 11, 2017, 07:39:14 pm »
It wasn't done on a thread other than the main thread.

Support / Re: Rotation Towards 3D Point
« on: March 10, 2017, 06:38:36 pm »
Update: sometimes the models are rotating in an axis other than the world's y. Is there  a way for me to limit the matrix's rotation to only the y axis?

Support / Re: Rotation Towards 3D Point
« on: March 10, 2017, 04:32:25 pm »
I wasn't being lazy, FYI. But after several attempts based on yours, this is what worked:

Code: [Select]
     public void rotateTowards(SimpleVector towards) {
SimpleVector target = new SimpleVector(towards);
        SimpleVector dir = target.calcSub(model.getTranslation());
        Matrix rotationMatrix = dir.getRotationMatrix(new SimpleVector(0, 1f, 0f));
if (this instanceof Worker)
else model.setRotationMatrix(rotationMatrix);

Pages: 1 ... 3 4 [5] 6 7 ... 102