Main Menu
Menu

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.

Show posts Menu

Messages - AGP

#1
Support / Re: Shadow Shader
March 19, 2026, 06:31:21 PM
The shadows look better. And it's meant to work like ShadowHelper.
#2
Support / Shadow Shader
March 19, 2026, 07:25:22 AM
I'd love for you to include this shader in jpct. This is an example of how to call it:
//In the game loop:
           shadows.setCenter(batman.model.get(0).getTransformedCenter());
           shadows.updateShadowMap(theWorld, buffer, camera);
//The setup:
    private void setupShadows() {
       shadows = new ShadowMapper(1024);
       shadows.setLightDirection(new SimpleVector(.2f, .4f, -.3f));

       shadows.setShadowArea(360f);//120f
       shadows.setShadowBias(0.00f);
       shadows.setShadowDarkness(0.50f);
       shadows.setCenter(batman.model.get(0).getTransformedCenter());

       // ALL visible objects must be casters
       for (Object3D part : batman.model)
           shadows.addCaster(part);
       shadows.addCaster(batman.cape);

       for (Object3D part : joker.model)
           shadows.addCaster(part);

       shadows.addCaster(catwoman);

       shadows.addCaster(batmobile.hull);
       shadows.addCaster(grappleTarget);

       shadows.addReceiver(ground);

       for (Object3D obj : cityObjects)
           shadows.addReceiver(obj);
    }
#3
Support / Re: Problem with AWTGLCanvas
January 29, 2026, 06:47:18 PM
I hadn't seen this message. Please do. Then I'll show you what I just did (morph targets, lip-synching with speech synthesizing all offline, of course).
#4
Support / Re: Problem with AWTGLCanvas
December 12, 2025, 07:36:08 PM
I'll produce a simple test for you. But it's interesting that it doesn't happen on Intel, right?
#5
Support / Re: Problem with AWTGLCanvas
December 04, 2025, 10:52:31 AM
I have a surprising piece of information: I've been trying hardware for running offline AI and I got an excellent computer with an Intel GPU. On AMD and NVidia that problem happens. On the Intel GPU it does not. So I asked that very computer and it suggested the following:

// After you have moved the camera or otherwise changed the viewport size:
GL11.glDisable(GL11.GL_SCISSOR_TEST);          // make sure the old scissor is gone
GL11.glViewport(0, 0, canvas.getWidth(), canvas.getHeight());
GL11.glEnable(GL11.GL_SCISSOR_TEST);           // re‑enable with the *new* dimensions
GL11.glScissor(0, 0, canvas.getWidth(), canvas.getHeight());
#6
Support / Re: Problem with AWTGLCanvas
December 03, 2025, 09:07:50 PM
The code is only the following. Is it possible that the Overlay class needs attention after this change to AWTGlCanvas?

       fullScreenOverlay = new Overlay(theWorld, 0, 50, (int)(buffer.getWidth()), (int)(buffer.getHeight()-50), "FullInterface");
       fullScreenOverlay.setTransparencyMode(Object3D.TRANSPARENCY_MODE_DEFAULT);
       fullScreenOverlay.setTransparency(250);
#7
Support / Re: Problem with AWTGLCanvas
November 13, 2025, 09:27:17 AM
It's bizarre that you compiled. I'll see if I did something weird to the jar.

Yeah, it's like our repair just extended the drawing area. I'll show you the code tomorrow, but it should draw at the ends of the frame, but instead it's not centralized.
#8
Support / Re: Problem with AWTGLCanvas
November 07, 2025, 10:26:54 AM
That line compiles with old jpct versions and not with the latest one.

What about the canvas?
#9
Support / Re: Problem with AWTGLCanvas
November 05, 2025, 02:05:09 AM
There's a little problem with the Canvas fix: it's not centering. I've only noticed once I updated jpct on a very centered (fighting) game. Check out the two images. One, naturally, is before the fix, the other one is after. Everything renders in the same place, it's just that the new version doesn't clip on the canvas space.

Also, we're missing a version of blit() because the following line isn't compiling: buffer.blit(splash1, 0, 0, 0, 0, splash1.getWidth(), splash1.getHeight(), buffer.getOutputWidth(), buffer.getOutputHeight(), 200, true);

https://www.dropbox.com/scl/fi/hlz31f7yuhgpusijmhjbw/CanvasFix_before.png?rlkey=rx8al2fz1ani7dz3khprxkgc5&st=cxyi3f3w&dl=0

https://www.dropbox.com/scl/fi/dinizqm379uh1rzaho1qf/CanvasFix_after.png?rlkey=axi07hpkewics8qbfmsgpp65m&st=9ww1q8pb&dl=0
#10
And I'm only using JDK 21 (I never go to bleeding edge purposely). Also: warning: [removal] finalize() in Object has been deprecated and marked for removal.

The good news: I made an OrthographicCamera class which works with minimal changes to AWTGLRenderer and World. I'll add it to SoftGLRenderer also. I'd be more than happy to share it with you if you added it to the official release.
#11
Support / Object3D.mergeAll(List)
October 09, 2025, 09:21:58 PM
Egon, could you possibly add that to version 1.33? I'm trying to mergeAll without looping but the line Object3D.mergeAll((Object3D[])new SimpleGlbLoader().loadGlbNoSkin(modelFile).toArray()) doesn't work. If I have to loop, we're back to very slow merging.
#12
Support / Re: Problem with AWTGLCanvas
October 06, 2025, 09:22:10 PM
It works, thanks a lot. I'm glad jpct is back at form. Actually, my standalone GLB importer is nearly perfect now. I have a script for splitting animations inside Blender and exporting multiple clips straight into jpct, so it's better than at form.
#13
Support / Re: Problem with AWTGLCanvas
October 03, 2025, 12:38:25 AM
Exception in thread "main" java.lang.NoClassDefFoundError: com/threed/jpct/AWTJPCTCanvas$1
        at com.threed.jpct.AWTJPCTCanvas.init(AWTJPCTCanvas.java:53)
        at com.threed.jpct.AWTJPCTCanvas.<init>(AWTJPCTCanvas.java:38)
        at com.threed.jpct.AWTGLRenderer.init(AWTGLRenderer.java:73)
        at com.threed.jpct.FrameBuffer.enableRenderer(FrameBuffer.java:1154)
        at com.threed.jpct.FrameBuffer.enableGLCanvasRenderer(FrameBuffer.java:739)
#14
Support / Re: Problem with AWTGLCanvas
October 02, 2025, 02:05:25 AM
Thanks very much. I'll let you know before I sleep.
#15
Support / Re: Problem with AWTGLCanvas
September 27, 2025, 07:49:36 PM
It's software. I managed to recompile just the one class. And the fix worked!