Recent Posts

Pages: [1] 2 3 ... 10
Support / Re: Documentation Error
« Last post by AGP on March 22, 2018, 04:41:14 am »
They made more sense when I added them, though, if still not perfect.
Support / Re: Documentation Error
« Last post by EgonOlsen on March 20, 2018, 10:24:45 pm », it doesn't. jPCT has no concept of w? when it comes to texture coordinates.
Support / Documentation Error
« Last post by AGP on March 20, 2018, 09:40:16 pm »
The docs for Object3D state:

public Object3D(float[] coordinates,
                float[] normals,
                float[] uvs,
                int[] indices,
                int textureId)
uvs - the texture coordinates [u1,v1,u2,v2,...]

When in fact it seems to read ws too (thus being u1, v1, w1, u2, v2, w2...).
Support / Re: Crash (native)
« Last post by EgonOlsen on March 18, 2018, 08:36:56 pm »
Interesting...maybe I'm stripping dummy texture layers away...I'm not sure ATM, but if it works now... ;)
Support / Re: Crash (native)
« Last post by AeroShark333 on March 18, 2018, 04:38:30 pm »
Yes, it's save and it's cheap. However, compiling the object fixes the texture stage count for it. That's why you are getting that exception with the TextureInfo. YOu could assign a TextureInfo with the same amount of stage but using some dummy textures, compile, assing the actual textures. That should actually work.
So I tried this with two TextureInfo's (one 3-layered with dummy textureID and one 3-layered with the actual textureID's) but I am still getting the Exception.

Code: [Select]
final int dummyID = textureManager.getTextureID(textureManager.getNameByTexture(textureManager.getDummyTexture()));
final TextureInfo ti = new TextureInfo(dummyID);
ti.add(dummyID, TextureInfo.MODE_ADD);
ti.add(dummyID, TextureInfo.MODE_ADD);



This is how I first load the Object3D with 3 (not even sure if it actually gives 3...) texturelayers.

But when I apply the real TextureInfo (after loading Textures and getting their ID's) it will crash:
Code: [Select]
03-18 11:35:18.768: E/AndroidRuntime(4487): java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
03-18 11:35:18.768: E/AndroidRuntime(4487): at com.threed.jpct.Object3D.setTexture(
When the real TextureInfo only holds one texture(layer) it won't crash... So it doesn't really seem to set 3 layers using the dummy textures or something..?

I moved the obj.strip() line to after applying the real TextureInfo, which seemed to fix it...
Support / Re: Rotating multiple objects around a single object or center
« Last post by behelit on March 15, 2018, 11:10:39 pm »
Yes, that was the problem.
Thanks for the help everyone.

Support / Re: My Object3D just dont want to rotate.
« Last post by Melssj5 on March 15, 2018, 02:26:26 pm »
SOLVED: The problem was neither the pivot center nor the maths. The problem was that I was referencing and moving an Object3D and adding another one to the world. I fixed this and everything is working.
Bones / Re: Invisible Submesh
« Last post by raft on March 15, 2018, 12:55:38 pm »
sorry for late answer, somehow jPCT email went into spam folder  ::)

is it displayed in submesh list?
in wireframe mode, can you see it without textures?
by debugger I guess you mean skeleton debugger, what do you see exactly?
Support / Re: Rotating multiple objects around a single object or center
« Last post by EgonOlsen on March 15, 2018, 10:14:04 am »
Make sure to call build() before setting the pivot. Otherwise, it will be resetted to a calculated one.
Support / Re: Rotating multiple objects around a single object or center
« Last post by behelit on March 15, 2018, 03:26:19 am »
Thanks, you were right, now it rotates the correct amount but it is still only rotating on it's own axis and not the pivot

Pages: [1] 2 3 ... 10