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.

Topics - AGP

Pages: 1 2 [3] 4 5 ... 14
Support / Is this scale normal for a town this size?
« on: August 17, 2015, 06:22:09 pm »
Because I'm having trouble with very blocky shadows. And the shadow map size is already 8192x8192.
As printed by World.getBounds():
-264.87097, 276.26025
-11.555313, 104.79436
-304.63678, 247.57347

Support / Where to put blit(...)?
« on: June 11, 2015, 06:43:33 pm »
The docs make reference to a non-existent buffer.update(). Where do I put it in Android? Just after clear()?

Support / 2 Questions: Tiling and a Shader for Shadows
« on: January 28, 2015, 10:20:18 pm »
The following method (yours, but I was close to writing the same thing!) doesn't work at all on my ground. I think that something must have changed either in jpct or OpenGL in the years since you wrote it:

Code: [Select]
     public void tileTexture(Object3D obj, float tileFactor) {
PolygonManager pm = obj.getPolygonManager();
int end=pm.getMaxPolygonID();
for (int i=0; i<end; i++) {
     SimpleVector uv0=pm.getTextureUV(i,0);
     SimpleVector uv1=pm.getTextureUV(i,1);
     SimpleVector uv2=pm.getTextureUV(i,2);
     int id = pm.getPolygonTexture(i);
     TextureInfo ti=new TextureInfo(id, uv0.x, uv0.y, uv1.x, uv1.y, uv2.x, uv2.y);
     pm.setPolygonTexture(i, ti);

And a good while ago you mentioned that you were considering a shader-based solution for shadow-casting from texture transparency (otherwise, my trees' shadows would all be rectangular). Have you started it? Has anyone else?

Support / Restricting the Mouse
« on: November 12, 2014, 07:12:02 pm »
I'm making a zombie-shooting game and trying to mimic some of the mechanics of The Last of Us, but with a mouse and keyboard. When the player presses S, the camera zooms over the character's shoulder and the mouse can then be used to target a zombie. For the most part, it works. Except that for the life of me I can't seem to restrict the camera's rotation. The following are my mouse event methods. The weird thing is that sometimes the vertical rotation behaves perfectly (and blocks at both ends), and, most of the times it doesn't.

Code: [Select]
     public void mouseMoved(MouseEvent e) {
if (initialX == 100101 && initialY == 100101) {
     initialX = e.getX();
     initialY = e.getY();
if (aiming) {
     float deltaX = e.getX()-initialX;
     float deltaY = e.getY()-initialY;
     float addX = deltaX-lastDeltaX;
     float addY = deltaY-lastDeltaY;
     if ((addX > 0.00f && cameraDisplacementY < Math.PI*.3) || (addX < 0.00f && cameraDisplacementY > -Math.PI*.3))
cameraDisplacementY += addX*.02f;//HORIZONTAL ROTATION
     if ((addY > 0.00f && cameraDisplacementX < Math.PI*.1) || (addY < 0.00f && cameraDisplacementX > -Math.PI*.1))
cameraDisplacementX += addY*.02f;//VERTICAL ROTATION
     lastDeltaX = deltaX;
     lastDeltaY = deltaY;

// if (cameraDisplacementY > 1f || cameraDisplacementY < -1f) {
     cameraDisplacementY = 0.00f;
// }

     public void mouseDragged(MouseEvent e) {}
     public void mouseExited(MouseEvent e) {
robot.mouseMove(this.getWidth()/2, this.getHeight()/2);
initialX = e.getX();
initialY = e.getY();

     public void mouseClicked(MouseEvent e) {
if (aiming)
     fireWeapon = true;
     private void fire() {
if (bullet != null)
bullet = new Bullet(gun, theCamera);;
if (buffer.usesRenderer(IRenderer.RENDERER_OPENGL))
soundQueue = new SoundQueue();
soundQueue.add(new SoundAndTime(shotgunBlast, 0l));
soundQueue.add(new SoundAndTime(shotgunShellsFalling, 700l));
soundQueue.add(new SoundAndTime(shotgunReload, 1100l));
fireWeapon = false;//JUST FIRED

Support / ShadowHelper Bug?
« on: November 06, 2014, 07:02:15 pm »
I'm making a zombie-shooting game about which I'm very excited. I've just run into a problem, though: when I enable shadows and I press fire my shotgun, the following message immediately appears. The two casters so far are the hero and his shotgun. The only receiver is the ground. But when you fire, a bullet (which is a sphere as returned by Primitives.getSphere(...)) is spawned. Note: line 583 is sh.drawScene();

Exception in thread "main" java.lang.NullPointerException
        at com.threed.jpct.Object3D.setAdditionalColor(
        at com.threed.jpct.util.ShadowHelper.drawScene(
        at com.threed.jpct.util.ShadowHelper.drawScene(
        at RPG3D.doShadows(
        at RPG3D.draw(
        at RPG3D.gameLoop(
        at RPG3D.<init>(
        at RPG3D.main(

Bones / Animation All Over the Place
« on: October 16, 2014, 08:49:07 pm »
This animation is fixed in the exact same place in 3ds max. In jpct, it's all over the place. All other animations work perfectly with this model.

Bones / Joint.addChild(Object3D)
« on: October 01, 2014, 08:49:03 pm »
That would be beyond useful...

Support / Group Scale
« on: September 24, 2014, 05:41:20 pm »
Do you know what would most definitely be useful? Group stuff. For instance, a World.groupAll() method followed by a World.getGroup(...).scale(10f). Up until this latest build of jpct there was no real way of knowing the scale of your scene. I'm finding too many scenes are either too small or too large for their own good (shadows, for instance, get hurt from this). Anyway, it's just a suggestion.

Bones / Morpher Issue?
« on: September 24, 2014, 08:42:30 am »
Raft, please check this (,4127.0.html) thread out. I went with the path of greater resistance but indeed greater results (Egon's second option). But in doing so, I think that I may have exposed a bug in bones.

The model has been re-rigged and exported as a two-part model (submesh0 for everything opaque and submesh1 for the furry parts). It looks phenomenal. But it had three morph targets in Max. Of those, I only used one (which is properly listed in OgreMax both for the fur and for the body--same names all around (fur has an "Idle" for Skin, body has an Idle for Skin, etc.)) in my idle animation. I'm fairly certain that as I execute the following code, only AnimatedGroup.get(0)'s morph is being used.
Code: [Select]
model.animateSkin(frame, currentAnimation);
if (poseClipSequence != null)
     model.animatePose(frame, currentPoseAnimation);//IT'S NOT NULL, AND THE MODEL IS BLINKING, BUT I DON'T THINK THAT THE FUR'S animatePose() IS BEING CALLED

Support / Transparency Sorting Issue
« on: September 22, 2014, 08:44:44 am »
Obviously, the right side one is the jpct-rendered one. The object is being set to a transparency value of 252. The texture has alpha channel, and is being initialized with true set in its constructor. For scale, I placed a cube as created by Primitives.getCube(5f). The sorting is less than desirable. Please advise how to address this. I've noticed that there's a setSortOffset method, but it (jpct docs lack this too often, in my opinion) gives us no idea of scale. Thanks in advance.

Support / Z Component in reproject2D3DWS?
« on: August 27, 2014, 02:35:18 pm »
What is the z component in this line?

Code: [Select]
Interact2D.reproject2D3DWS(theCamera, buffer, destination.x*Grid.SQUARE_SIZE, destination.y*Grid.SQUARE_SIZE, 1f);

Bones / AnimatedGroup.CrossFade?
« on: August 18, 2014, 10:30:28 pm »
Is there a way to transition gradually between one animation and another? Something along the lines of Unity's Animator.CrossFade ( Because that's one of the main things that a rigged object can do that a vertex-animated one can't.

Bones / Multiple Textures on Single-Part Model
« on: August 16, 2014, 06:42:45 pm »
Raft, could you help me out with this thread, please?,4054.0.html

Support / Two Textures On Single-Part Model
« on: August 16, 2014, 04:34:35 pm »
Is there a way for me to assign two diffuse texture maps to a single-part model, much like 3ds max can do for object ids (say, a texture map just for the head, another one for the body)? I have some critical models that need this.

Support / Is there something lwjgl-y about Polyline?
« on: August 03, 2014, 02:09:20 am »
Or have you just not made it available to the software renderer out of disinterest? It would be cool to have it in software...

By the way, is it just a coincidence that while I'm posting questions on the board nobody else seems to? For instance, I was trying to lend a hand during your vacation and as long as I was answering the questions but not asking them two or three people were constantly posting here. But as soon as I posted a question that changed. :- )

Pages: 1 2 [3] 4 5 ... 14