Author Topic: Projector class  (Read 2761 times)

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Projector class
« Reply #15 on: November 11, 2012, 11:46:13 am »
No, maxTextureLayers is set to 4

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Projector class
« Reply #16 on: November 11, 2012, 11:57:17 am »
Strange then...it's this line that crashes:

Code: [Select]
myObj.multiTex[i][polyID] == TextureManager.TEXTURE_NOTFOUND

polyID is 0 in your case, so it can't be the problem. The length of multiTex should be maxTextureLayers-1, so if it crashes on index 1, it seems to me that the array has been created for only 2 texture layers. However, it's actually not supposed to crash...i've updated the beta jar with a version that should not crash but give a log output instead if it can't add another layer. It would be interesting to see what this prints out in your case.

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Projector class
« Reply #17 on: November 11, 2012, 12:06:18 pm »
Here is log. What is it mean?
Code: [Select]
11-11 12:05:12.101: I/jPCT-AE(15482): [ 1352631912106 ] - WARNING: No further texture stage available (2/1/4)!
11-11 12:05:12.101: I/jPCT-AE(15482): [ 1352631912106 ] - WARNING: No further texture stage available (2/3/4)!

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Projector class
« Reply #18 on: November 11, 2012, 12:24:45 pm »
It means that, while the config would allow for 4 stages, the actual arrays are smaller. Maybe i should modify the method to deal with this, but i would like to know the root cause. Are these serialized objects?

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Projector class
« Reply #19 on: November 11, 2012, 12:32:12 pm »
Particles and water-levels are created by code, everything else are serialized objects. 3DS and OBJ are no longer in use.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Projector class
« Reply #20 on: November 11, 2012, 12:37:05 pm »
As a workaround, try to serialize them in unreduced, i.e. reduced set to false. I'll fix the method later to handle this case.

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Projector class
« Reply #21 on: November 11, 2012, 12:47:38 pm »
Oh, this is for testing purposes? Want to know if it will work? It is more than 50 objects. I'd rather wait for fix...

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Projector class
« Reply #22 on: November 11, 2012, 02:04:25 pm »
I've updated the beta, but haven't really tested the fix... ;) Please give it a try to see if it helps.

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Projector class
« Reply #23 on: November 11, 2012, 02:28:08 pm »
It works ;) but projected shadows are shifted, I have to look where is problem

edit: game can be started, but there is still this:
Code: [Select]
11-11 14:32:38.082: I/jPCT-AE(19080): [ 1352640758087 ] - WARNING: No further texture stage available (2/3/4)!
« Last Edit: November 11, 2012, 02:36:08 pm by Thomas. »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Projector class
« Reply #24 on: November 11, 2012, 02:46:33 pm »
How many layers are you using...looks like as if you've exceeded the maximum of 4 at least for some objects.