Recent Posts

Pages: [1] 2 3 ... 10
1
Support / Re: Scale X and Y axis
« Last post by MichaelJPCT on July 19, 2019, 06:57:34 pm »
Apart from that: We are talking about Android/jPCT-AE here? In that case, you can't do it this way unless some more setup work which might not be worth it. There's another way, though. You can tweak the rotation matrix directly. This has some drawbacks as well, in particular it might increase a light source's brightness on the scaled object when it shouldn't and it doesn't work well together with the build-in scale methods. Anyway, this is how it works:

Code: [Select]
Matrix scale=new Matrix();
scale.set(0, 0, 2); // 0,0 for x-axis scaling, 1,1 for y, 2,2 for z
obj.getRotationMatrix().matMul(scale);

If you otherwise don't change the rotation matrix, you only have to apply this once. If you set it to a new anyway in each frame (or even sometimes), you have to apply this afterwards. Also keep in mind that scaling is cumulative. That means that doing this by 2 and then by 3 will result in a scaling of 6.

hi Egon, i read this thread and remember that i used to tried lengthening the normal vector to change lighting effect (over bright effect ? :) ) , i did that when meshes were created from vertex info, such as multiplying the normal by 5. but the lighting didnt change at all, seems like the normal vector is normalized when rendering.
can this behavior of normalizing the normal vector be canceled?
i was just exploring possibilities.
2
Support / Re: Crash (native)
« Last post by AeroShark333 on June 13, 2019, 07:48:09 pm »
I don't...
3
Support / Re: Crash (native)
« Last post by EgonOlsen on June 13, 2019, 12:53:23 pm »
I guess you don't have access to the log messages that are printed before this exception?
4
Support / Re: Crash (native)
« Last post by AeroShark333 on June 07, 2019, 05:45:34 pm »
This looks like a similar stacktrace from another user:

java.lang.RuntimeException:
  at com.threed.jpct.Logger.log (Logger.java:206)
  at com.threed.jpct.GL20.checkError (GL20.java:163)
  at com.threed.jpct.GL20.glGenBuffers (GL20.java:1385)
  at com.threed.jpct.CompiledInstance.compileToVBO (CompiledInstance.java:1478)
  at com.threed.jpct.CompiledInstance.render (CompiledInstance.java:606)
  at com.threed.jpct.GLRenderer.drawWireframe (GLRenderer.java:2548)
  at com.threed.jpct.World.draw (World.java:1424)
  at com.threed.jpct.World.drawWireframe (World.java:1132)
  at com.aeroshark333.artofearthify.lw.ArtOfEarthify$1.run (ArtOfEarthify.java:732)
  at com.aeroshark333.artofearthify.utils.WorkerThread$2.run (WorkerThread.java:46)
  at com.aeroshark333.artofearthify.lw.ArtOfEarthify.onDrawFrame (ArtOfEarthify.java:1402)
  at com.aeroshark333.artofearthify.lw.LiveWallpaperRenderer.onDrawFrame (LiveWallpaperRenderer.java:45)
  at android.opengl.GLSurfaceView$GLThread.guardedRun (GLSurfaceView.java:1531)
  at android.opengl.GLSurfaceView$GLThread.run (GLSurfaceView.java:1248)
5
Support / Re: Crash (native)
« Last post by EgonOlsen on June 05, 2019, 01:02:09 pm »
Strange. Actually, there has to be some output what the actual GL error is. It might not be part of the actual exception though. If it helps to know this, is another question...
6
Support / Re: Crash (native)
« Last post by AeroShark333 on June 04, 2019, 03:49:52 pm »
No, this is the complete stacktrace
7
Support / Re: Crash (native)
« Last post by EgonOlsen on June 03, 2019, 10:12:05 am »
Is that the complete stack trace? I'm somehow missing the top part...
8
Support / Re: Crash (native)
« Last post by AeroShark333 on May 31, 2019, 08:41:45 pm »
  at com.threed.jpct.Logger.log (Logger.java:206)
  at com.threed.jpct.GL20.checkError (GL20.java:163)
  at com.threed.jpct.GL20.glGenBuffers (GL20.java:1385)
  at com.threed.jpct.CompiledInstance.compileToVBO (CompiledInstance.java:1478)
  at com.threed.jpct.CompiledInstance.render (CompiledInstance.java:606)
  at com.threed.jpct.GLRenderer.drawWireframe (GLRenderer.java:2548)
  at com.threed.jpct.World.draw (World.java:1424)
  at com.threed.jpct.World.drawWireframe (World.java:1132)

Any idea what'd cause this error?

EDIT:
Also... I found this: https://stackoverflow.com/questions/47754714/load-huge-texture-in-parts-in-opengl-es-2-0
Maybe it would be a cool feature for jPCT
9
Support / Re: Problem with object position
« Last post by EgonOlsen on May 16, 2019, 12:03:49 pm »
Object3D has a static method to create a dummy object. Use one of those, attach it as a parent to all the other objects in question, then rotate the dummy.
10
Support / Re: Problem with object position
« Last post by Mareos9593 on May 14, 2019, 04:32:53 pm »
I have the same problem, can you post the code please  :(
Pages: [1] 2 3 ... 10