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.


Messages - atreyu64

Pages: [1] 2 3
1
Bugs / Re: Changing Near plane leads to weird "reproject" results
« on: March 30, 2016, 10:16:05 pm »
The new beta jar did not change anything, that said I have found the solution.
Actually I use a skybox, and I was calling the skybox.render() method after world.renderScene().
After switching this call order, everything works fine.

Thanks again and sorry for bothering you, cheers !

2
Bugs / Re: Changing Near plane leads to weird "reproject" results
« on: March 30, 2016, 10:54:17 am »
Ok I'll give it a try tonight, thanks a lot Helge.

So what you're saying is that I should move the renderScene calls out of the "if" block ? Like this :

Code: [Select]
if(displayNeedsUpdate) {
cameraChanged();
displayNeedsUpdate = false;
}

world.renderScene(fb);
world2.renderScene(fb);

world.draw(fb);
world2.draw(fb);

blitting();

fb.display();

3
Bugs / Re: Changing Near plane leads to weird "reproject" results
« on: March 30, 2016, 10:27:39 am »
Well actually it's like if glIgnoreNearPlane was not taken into account, but sometimes the display is ok, only when I don't call the renderScene method, which happens here  when "displayNeedsUpdate" is set to false :

Code: [Select]
if(displayNeedsUpdate) {
cameraChanged();
displayNeedsUpdate = false;

world.renderScene(fb);
world2.renderScene(fb);
}

world.draw(fb);
world2.draw(fb);

blitting();

fb.display();

I'm doing this to avoid rendering again the scene when nothing has changed in the scene.
If I try to call renderScene evry time, it is like glIgnoreNearPlane was ignored.

4
Bugs / Re: Changing Near plane leads to weird "reproject" results
« on: March 29, 2016, 11:46:51 pm »
Sorry to bother you again, but it seems like setting Config.glIgnoreNearPlane to false does not work properly on Android.

Have you ever noticed anything wrong with it ?

5
Bugs / Re: Changing Near plane leads to weird "reproject" results
« on: March 25, 2016, 11:07:38 am »
Ok thanks a lot !
I don't use any shadows so it should be ok.

Cheers,

Sylvain

6
Bugs / Re: Changing Near plane leads to weird "reproject" results
« on: March 24, 2016, 10:59:50 am »
Hi, have you upload the fixed jpct-ae jar yet ?

7
Bugs / Re: Changing Near plane leads to weird "reproject" results
« on: March 16, 2016, 01:48:26 pm »
Yes I would need it, but no worries, I'm not in a hurry.

8
Bugs / Re: Changing Near plane leads to weird "reproject" results
« on: March 15, 2016, 10:39:57 pm »
Everything works perfectly now. Thanks a lot !
Do you plan to report the corrections on jpct-AE ?

Cheers, thanks again for your precious time.

9
Bugs / Re: Changing Near plane leads to weird "reproject" results
« on: March 14, 2016, 07:02:14 pm »
The reprojection function now works great, thanks a lot !

But I still have a problem : the method Interact2D.project3D2D returns wrong values.

10
Bugs / Changing Near plane leads to weird "reproject" results
« on: March 14, 2016, 12:23:18 am »
Hi boys and boys,

I've noticed a strange behaviour when I modify the near plane value.
In my apps I have two types of camera controls (and I can switch from one to another at any time) : orbit camera and "walk camera" meaning that the camera is very close to the ground, which of course leads to some "frustum" effects.
Here is basically what I do to avoid this problem when I change the camera control type :

Code: [Select]
if(walkMode) {
Config.nearPlane = 0.25f;
Config.farPlane = 10000000000f; // yes I want to see everything...
}
else { // orbit camera settings :
Config.nearPlane = 1f;
Config.farPlane = 1000f;
}
cam.setFOVtoDefault();
cam.adjustFovToNearPlane();

I thought that adjustFovToNearPlane function would be enough but I also had to call setFOVtoDefault to avoid zoom-in/zoom-out effets, but this is not a problem, it solves my frustum problem very well.

The problem is that when the near plane value is different than the default value, the calcMinDistanceAndObject3D method returns wrong results.
Indeed, when I call the following method, I get wrong results :

Code: [Select]
// cursor projection on terrain :
protected SimpleVector getCursorProjection(int x, int y) {
SimpleVector cursorProjection = null;
SimpleVector dir = Interact2D.reproject2D3DWS(cam, fb, x, y).normalize();
Object[] res = world.calcMinDistanceAndObject3D(cam.getPosition(), dir, 1000000);
Object3D pickedObject = (Object3D) res[1];
if(pickedObject == terrain) {
float distance = (Float) res[0];
cursorProjection = dir;
cursorProjection.scalarMul(distance);
cursorProjection.add(cam.getPosition());
}

return cursorProjection;
}

The method still returns something, but it's like if the coordinate system of the frame buffer was different. Maybe the near plane value is not taken into account in the reproject2D3DWS method. Or maybe I'm doing something wrong ?...

Thanks in advance for your answers, cheers,


Sylvain

11
Support / Re: How to create an Applet
« on: August 11, 2015, 03:33:09 pm »
Ok, I see...
Well I will disable the bloom effect in my applet for now, not a big deal.

What about the specular light not showing ? Any idea ?

Thanks, cheers !

12
Support / Re: How to create an Applet
« on: August 05, 2015, 11:51:08 pm »
I tried to init bloom processor through an IPaintListener and I don't get the warning message anymore.

However, I now get an error during the rendering of the bloom :
Code: [Select]
Exception in thread "AWT-EventQueue-1" java.lang.RuntimeException: No OpenGL context found in the current thread.
   at org.lwjgl.opengl.GLContext.getCapabilities(GLContext.java:124)
   at org.lwjgl.opengl.GL11.glBindTexture(GL11.java:651)
   at com.threed.jpct.procs.BloomGLProcessor.snapshot(BloomGLProcessor.java:362)

Here is basically what I do in my loop (remember the bloomProc.setDelayed(true) method you kindly introduced for me ?) :

Code: [Select]
      // First render the actual world to fill the zbuffer and let the
      // processor take a snapshot of the result
      world.renderScene(fb);
      if(enableSkyBox)
         skybox.render(world, fb);
      pictoWorld.renderScene(fb);
     
      // draw first world :
      world.draw(fb);
     
      if(displayNeons && nbNeons > 0) {
         bloomProcessor.snapshot(); ///////////////////////////// bug here

         // Then render the line world and apply the blur...but only to the
         // back buffer of the processor because it's delayed.
         // Make sure to clear the color but not the depth buffer.
         fb.clearColorBufferOnly(Color.BLACK);
         bloomWorld.renderScene(fb);
         bloomWorld.draw(fb);
         fb.runPostProcessors();

         // Now combine the snapshot with the blurred image.
         bloomProcessor.render();
      }
     
      // then draw picto world :
      pictoWorld.draw(fb);
     
      fb.update();
     
      blitting();
     
      fb.displayGLOnly();


What am I doing wrong ?

13
Support / Re: How to create an Applet
« on: August 05, 2015, 03:40:43 pm »
No in my app I use the GLRenderer.
I will try to init the Bloom process differently.

Thanks !

14
Support / Re: How to create an Applet
« on: August 05, 2015, 11:58:52 am »
Hi, I have a problem with my applet.

It works quite good but the lightning is different than the java version of my app : ambient light is at maximum (it should'nt) and I can't see specular lighting anymore.
Also, Bloom processor crashes, I get this message while trying to initialize it :
Quote
"Warning: unable to initialize post processing textures due to: no opengl context found in the current thread"

I have disabled software renderer just after enabling canvas OpenGL renderer, so it should work exactly the same as the java version, right ?

Any idea of what's happening ?


Thanks in advance, cheers !

15
Projects / Re: Rando 3D - Hiking Guide Android Apps (in french)
« on: June 12, 2015, 10:39:24 am »
Thanks a lot !

We have sold 145 apps for now, had 3 articles in local papers and will soon be on local TV news.
Also, we have had a few propositions to develop other apps based on the same concept.

 :)

Pages: [1] 2 3