Author Topic: textures are gone after some time  (Read 9107 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: textures are gone after some time
« Reply #15 on: October 20, 2009, 11:26:02 pm »
Maybe you can try 1.18 instead and see if it happens there too: http://www.jpct.net/download/jpctapi_118.zip

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: textures are gone after some time
« Reply #16 on: October 20, 2009, 11:41:14 pm »
i've made a search and found no compile() call.

1.18 is same as 1.19. 1.17 is working fine (i've that version and tried).

my render method is like this:
Code: [Select]
                    buffer.clear();
                   
                    if (skyBox != null) {
                        skyBox.renderScene(buffer, world.getCamera().getBack());
                        skyBox.draw(buffer);
                       
                        buffer.clearZBufferOnly();
                    }
                   
                    world.renderScene(buffer);
                    world.draw(buffer);
                   
                    buffer.update();

where SkyBox.renderScene is
Code: [Select]
    public void renderScene(FrameBuffer buffer, Matrix matrix) {
        world.getCamera().setBack(matrix);
        world.renderScene(buffer);
    }
   

and SkyBox.draw is
Code: [Select]
    public void draw(FrameBuffer buffer) {
        world.draw(buffer);
    }

see any flaw ?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: textures are gone after some time
« Reply #17 on: October 21, 2009, 07:50:08 am »
Looks fine to me. The only light related change that i can see in my code shouldn't show this effect nor do i have ever experienced something like this in my tests...strange...
Can you provide me with a test case for this? When i'm back home, i'll upload a jar that reverts the change to see if this does any good.

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: textures are gone after some time
« Reply #18 on: October 21, 2009, 08:45:47 am »
i will try to when i get home

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: textures are gone after some time
« Reply #19 on: October 21, 2009, 04:46:24 pm »
OK...i've updated the jar at http://www.jpct.net/download/beta/jpct.jar with a version that takes back the change in the lighting calculation. I really doubt, that this will show any effect, but it's worth a try anyway.

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: textures are gone after some time
« Reply #20 on: October 21, 2009, 06:34:16 pm »
no, it didnt help. i will try to setup a test case..

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: textures are gone after some time
« Reply #21 on: October 21, 2009, 07:09:42 pm »
Egon, i've sent you a test case with email..

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: textures are gone after some time
« Reply #22 on: October 21, 2009, 08:30:27 pm »
No mail so far...maybe my spam filter eated it!? I've whitelisted both, your gmail-account and aptalkarga.com now. Could you please try again?

Edit: Got it. Took some time but it finally arrived. I'll look into it now.
« Last Edit: October 21, 2009, 08:57:52 pm by EgonOlsen »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: textures are gone after some time
« Reply #23 on: October 21, 2009, 09:25:40 pm »
Found it! As usual, it's not a bug...it's a feature. To be exact, it's this (from the change log of 1.18): "The 3ds- and obj-loaders now load transparency information."
Your sky has a transparency value of 100 for whatever reason. The loader now loads this information. That, combined with the way how transparency works in the software renderer, cuts the light intensity in half on the sky. Just add a

Code: [Select]
sky.setTransparency(-1);
and it should look better.

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: textures are gone after some time
« Reply #24 on: October 21, 2009, 09:43:01 pm »
thanks, this solved my problem :)