Recent Posts

Pages: 1 [2] 3 4 ... 10
Support / Re: Retrieve Model Matrix and scale along a particular Matrix
« Last post by EgonOlsen on December 02, 2017, 10:28:41 am »
Out of the box, jPCT doesn't support non-uniform scaling, because of...reasons. However, you can retrieve the rotation matrix and apply a scale to it. The drawback is, that this will modify the normals as well, so it might cause lighting to go off. But depending on the app, that might not even be an issue at all.
Support / Retrieve Model Matrix and scale along a particular Matrix
« Last post by tsaha on December 02, 2017, 12:20:58 am »
Hello Everyone,

I working on AR (ARToolkit) android application as a part of my coursework. I am using JPCT-AE to render 3D objects. Now my world objects has multiple 3D objects. I intend to scale a cylinder along Y axis only to represent some parameter value. I went through the official documentation and could find anything useful. Can anyone direct me towards the right way. Thanks in advance. Appreciate your help.
Support / Re: How can I get a bitmap from fb.getpixel()?
« Last post by EgonOlsen on November 29, 2017, 08:20:22 am »
Can you check the actual array content? Maybe it's all 0 at that stage already from some reason.
Support / How can I get a bitmap from fb.getpixel()?
« Last post by ScienceHill on November 29, 2017, 06:41:28 am »
Hello. Currently I am trying to take a screenshot use fb.getpixel() function. And here is my code:
int[] my_pixels = fb.getPixels();
Bitmap bitmap = Bitmap.createBitmap(fb.getWidth(), fb.getHeight(), Bitmap.Config.ARGB_4444);
But I just got a black image. And I also tried this:
int[] tmpPixels = fb.getPixels();
for (int i = 0; i < tmpPixels.length; i++){
   int tmpInt = ((tmpPixels & 0xf8) >> 3);
   tmpInt += ((tmpPixels & 0xfc00) >> 5);
   tmpInt += ((tmpPixels & 0xf80000) >> 11);
  tmpPixels = tmpInt;
Bitmap lastImage = Bitmap.createBitmap(tmpPixels, fb.getWidth(), fb.getHeight(), Bitmap.Config.RGB_565);
But it still did not work. I know that the fb.getPixels() function return an int array. And it contains R, G and B channels value. But how can I actually use it? Any answer is appreciated and thanks in advance.
Support / Re: Loader.loadOBJ Problem
« Last post by AGP on November 28, 2017, 05:06:22 pm »
As soon as you posted this, I re-exported for the hundredth time and, for reasons passing understanding, it worked. Just to let you know.
Support / Re: Loader.loadOBJ Problem
« Last post by EgonOlsen on November 23, 2017, 07:57:25 am »
Can you post the content of the mtl-file? Looks like as if there's no actual material definition in there or it's done in a way that I've never encountered before.
Support / Re: Loader.loadOBJ Problem
« Last post by AGP on November 22, 2017, 07:10:49 pm »
Sorry for taking this long but this baffling bug discouraged me. The file exists.
Code: [Select]
System.out.println("\n\n\nWarcraft.loadObject: "+fileName +" Is the mtl null? "+(mtlFile==null) +" Does the file exist? "+new File(fileName).exists());

Warcraft.loadObject: buildings\castle_construction1.obj Is the mtl null? false Does the file exist? true
Bugs / Re: macos cannot load native libraries
« Last post by EgonOlsen on November 20, 2017, 08:15:03 am »
To be honest, I've no clue about MacOS. Here's a thread that deals with a same error message, with some solution in the last entry:

I'm not sure, if this applies here though. But it has to be something with your jar/native locations, I assume. I've no idea what LWJGL does here, jPCT itself doesn't do anything with native libraries, as it relies on LWJGL to handle that.
Bones / Re: Making a 3d model move by code(user input).
« Last post by raft on November 19, 2017, 02:49:15 pm »
during those times, I was using 3dsMax + OgreMax. but as I heard OgreMax is kind of dead nowadays, dont know the details.

Blender is a quite popular 3D editor, Ogre3D is still very popular, so I assume Ogre exporters for Blender should work reasonably well.

I would suggest trying following instructions in Wiki for Blender, if that doesnt help contacting writers of the Wiki page

Bugs / macos cannot load native libraries
« Last post by douglaslyon on November 18, 2017, 04:19:21 pm »
 The macosx cannot load one of the native libraries. To illustrate this issue, I have written the following test program:
 public static void main(String[] args) {
Exception in thread "main" java.lang.NoSuchMethodError: getPointer
   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
   at java.lang.ClassLoader.loadLibrary0(
   at java.lang.ClassLoader.loadLibrary(
   at java.lang.Runtime.load0(
   at java.lang.System.load(
   at nativeLibs.NativeLibDetect.main(
Are you depending on a dylib to be somewhere it isn't?
Is there a JNA approach to the problem?
 - Doug

Pages: 1 [2] 3 4 ... 10