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 - K24A3

Pages: 1 2 3 [4] 5 6 ... 16
46
Support / Re: Confirming 32bit color output via jPCT
« on: October 11, 2012, 11:25:09 am »
Yes.

The shader works fine on the Tegra3.

I'm using a 3DS file now and that too has the lighning bolt effect, also visible on the Tegra3 but it's barely visible.

[attachment deleted by admin]

47
Support / Re: Confirming 32bit color output via jPCT
« on: October 11, 2012, 10:57:41 am »
...update

rotating the screen causes the whole sphere to be textured as if it had no directional lighting, just ambient light all around.

(and yes I am calling calcTangentVectors() at the beginning)


Edit: Attached log of starting with default shader, 5 seconds later it sets the user shader, then rotate the screen a second later. Also attached an image showing all three stages.

[attachment deleted by admin]

48
Support / Re: Confirming 32bit color output via jPCT
« on: October 11, 2012, 10:45:20 am »
Ok I moved obj.setShader(shader) into updateFrame() calling it 5 seconds later, the standard texture looks normal at the beginning then after 5 seconds it goes black with white bolts.

49
Support / Re: Confirming 32bit color output via jPCT
« on: October 11, 2012, 09:33:39 am »
1. Yes the lighting is correct at startup using the default shaders. There is no 'bolt' either.
2. It doesn't seem to switch over properly and I can't seem to figure out why... it's crashing when setting the TextureInfo when setting the shader:

01-01 06:21:57.850: E/AndroidRuntime(5425): java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
01-01 06:21:57.850: E/AndroidRuntime(5425):    at com.threed.jpct.Object3D.setTexture(Object3D.java:3467)
01-01 06:21:57.850: E/AndroidRuntime(5425):    at com.threed.jpct.ES2Test.OffsetShader.Set(OffsetShader.java:88)
01-01 06:21:57.850: E/AndroidRuntime(5425):    at com.threed.jpct.ES2Test.Scene.updateFrame(Scene.java:240)
01-01 06:21:57.850: E/AndroidRuntime(5425):    at com.threed.jpct.ES2Test.Scene.onDrawFrame(Scene.java:351)
01-01 06:21:57.850: E/AndroidRuntime(5425):    at com.threed.jpct.ES2Test.HelloShader$MyRenderer.onDrawFrame(HelloShader.java:206)
01-01 06:21:57.850: E/AndroidRuntime(5425):    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1462)
01-01 06:21:57.850: E/AndroidRuntime(5425):    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)


3. Logs are attached for both devices, setting the user shader normally from the beginning.

[attachment deleted by admin]

50
Support / Re: Confirming 32bit color output via jPCT
« on: October 11, 2012, 05:26:56 am »
Ok I tried what you said;

Code: [Select]
obj3DMain3 = Primitives.getSphere(20, fScale);
obj3DMain3.calcTextureWrapSpherical();
obj3DMain3.translate(20, 0, 440);
obj3DMain3.setSpecularLighting(true);
offsetShaders.Set(obj3DMain3, R.drawable.venus_bmp, R.drawable.venus_normal, R.drawable.venus_height, 2);
obj3DMain3.calcTangentVectors();
obj3DMain3.build();
obj3DMain3.strip();
world.addObject(obj3DMain3);

..plus I added 0.3 to the Ambient vectors in the shader which has improved the brightness, but that lightning symbol is still appearing.

GalaxyNote: Extremely dark output on first launch, you can only see the lightning effect. Jump to another app and back, it looks like the image in the attachment.
Tegra3 device: Shader looks fine but again the lightning effect is evident as seen in the attachment.

Why is Thor cursing me with a bolt of lightning?

[attachment deleted by admin]

51
Support / Re: Confirming 32bit color output via jPCT
« on: October 11, 2012, 01:00:09 am »
I realized earlier the shader was dark by design and added extra ambient lighting static uniforms, but calcTangentVectors() still made it much darker, and without calcTangentVectors it looked perfect in the emulator which is what really confused me.

Anyway I see how it all works now, I'll make the changes you mentioned and see how it goes. Thanks.

52
Support / Re: Confirming 32bit color output via jPCT
« on: October 10, 2012, 03:34:55 pm »
hmm ok I'll look into that tomorrow, it's getting late here but I had a quick look at the textures, the height map is an 8bit grayscale texture so perhaps that is the cause? However the emulator renders it perfectly which is confusing.

I've sent through the test case anyway, if you could have a quick look that would be great. Screenshots are included.

53
Support / Re: Confirming 32bit color output via jPCT
« on: October 10, 2012, 02:16:01 pm »
calcTangentVectors makes everything really dark and introduces the lightning effect again.

I'll prepare the test case and send it through soon, thanks.

54
Support / Re: Confirming 32bit color output via jPCT
« on: October 10, 2012, 01:16:17 pm »
False alarm, the project had that jPCT lib linking glitch. Renaming Lib to Libs solved the problem.


I also solved that 'lightning' glitch with the texture, calling .build() for every object seems to have fixed the problem.

But now I have a new problem with the offset shader included in the HelloShader example.
I built a test app so the problem is not related to the screensaver code.

I'm using the shader on a basic sphere, the results are:

Emulator: Looks perfect. The texture is shaded gradually depending on the light source.
Galaxy Note (Mali): The lit side of the sphere is pure white except for the closest part to the light which is pure black. Looks like a snooker ball.
Tegra 2 Tablet: It looks fine but there is no gradual lighting at all. The lighting effect is either on or off.

I'm guessing the shader wasn't designed to be used on a sphere, but why does it look perfect in the emulator?

55
Support / Re: Confirming 32bit color output via jPCT
« on: October 09, 2012, 09:36:30 am »
Ok I think I found the problem, the banding is caused by the SuperAMOLED screen on the Galaxy Note. Dark colors produce quite a lot of banding on these screens.

ps. the HellowShader example app crashes on the Note, if I can get logcat working in Eclipse I'll post the exception.

56
Support / Confirming 32bit color output via jPCT
« on: October 05, 2012, 05:15:44 pm »
Is there a way to confirm that the app is rendering in 32bit mode via jPCT during runtime?

I've set everything up to use 8:8:8:8 but the output still looks 16bit with excessive color banding and I'm not sure if it's a texture/transparency issue or a configuration issue with the new Wallpaper service I'm using.


57
Support / Re: setTransparency precision
« on: October 05, 2012, 02:32:23 pm »
ok thanks guys. Setting both values to 0.0039f seems to do the trick giving me 256 levels.

58
Support / Re: setTransparency precision
« on: September 30, 2012, 06:12:58 pm »
ok thanks I'll give them a try,

59
Support / setTransparency precision
« on: September 30, 2012, 04:19:54 pm »
Object3D.setTransparency(int trans) only seems to work from 0 to 15, anything over 15 defaults to the transparency of 15.

The difference between each level is quite a big jump. I need a smooth transition of a textured plane.

Is there a way to vary the transparency to 256 levels or a floating point value?
Can we add a new function that takes a float from 0.0 to 1.0? i.e. Object3D.setTransparency(float fTrans);

ps. The image already has alpha so I'm using the alpha flag when creating the texture (boolean useAlpha).

60
Support / Re: Multiple textures on a terrain
« on: September 28, 2012, 09:49:15 am »
What you could do is create a thin mixed color layer between the main colors.

For example you could put a strip of Orange between Red  and Yellow to blend them in better which should relieve the harshness of the jaggies.

between 300 and 398 = Red
between 398 and 402 = Orange
between 402 and up = Yellow

...or you could simply modify the textures themselves to contain the color transition at the top and bottom of the texture.

Pages: 1 2 3 [4] 5 6 ... 16