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 ... 16
31
Support / Re: Fake volumetric lights
« on: October 15, 2012, 09:23:29 am »
Yeah that may do the trick, assuming jPCT allows you to change the opacity of the 2nd texture leaving the base texture opaque. Haven't tried it myself but Egon can help you with that.

32
Support / Re: Confirming 32bit color output via jPCT
« on: October 15, 2012, 09:16:37 am »
I tried 0.001 with a light nearby and both devices are showing black textures.

Not to worry, I'll use the original shader since I need multiple light support and since it only fails on Mali.

33
Support / Re: Confirming 32bit color output via jPCT
« on: October 12, 2012, 03:39:26 pm »
You were right, the build path was pointing to the jPCT lib in the original HelloShader, which was earlier than v1.25 (you may want to update the lib in the HelloShader folder of the zip on the website), but running the app tells me it's using v1.26 in logcat during runtime - eclipse bug I suppose.

I added sun.setDistanceOverride(10000f) but the output is totally black, which is why I tried increasing the ambientColor in the shader. Below is the additional log info, which I assume it's because ambientColor is a uniform type, not a varying type?

Edit: It's totally black on the Tegra3 as well.


01-02 12:07:46.060: I/jPCT-AE(1088): Compiling shader program!
01-02 12:07:46.070: I/jPCT-AE(1088): Could not compile shader 35632: <invalid atom 65535>(30) : error C7563: assignment to uniform ambientColor
01-02 12:07:46.070: I/jPCT-AE(1088): <invalid atom 65535>(31) : error C7563: assignment to uniform ambientColor
01-02 12:07:46.070: I/jPCT-AE(1088): <invalid atom 65535>(32) : error C7563: assignment to uniform ambientColor
01-02 12:07:46.070: I/jPCT-AE(1088): [ 946814866081 ] - ERROR: Failed to load and compile fragment shaders!

34
Support / Re: Confirming 32bit color output via jPCT
« on: October 12, 2012, 11:41:07 am »
Here's the log:

10-12 09:39:39.422: E/AndroidRuntime(1567): java.lang.RuntimeException: [ 1350034779427 ] - ERROR: Failed to load and compile fragment shaders!
10-12 09:39:39.422: E/AndroidRuntime(1567):    at com.threed.jpct.Logger.log(Logger.java:189)
10-12 09:39:39.422: E/AndroidRuntime(1567):    at com.threed.jpct.GLSLShader.loadProgram(GLSLShader.java:764)
10-12 09:39:39.422: E/AndroidRuntime(1567):    at com.threed.jpct.GLSLShader.preInit(GLSLShader.java:276)
10-12 09:39:39.422: E/AndroidRuntime(1567):    at com.threed.jpct.GL20.setShader(GL20.java:336)
10-12 09:39:39.422: E/AndroidRuntime(1567):    at com.threed.jpct.GLRenderer.setShader(GLRenderer.java:510)
10-12 09:39:39.422: E/AndroidRuntime(1567):    at com.threed.jpct.CompiledInstance.render(CompiledInstance.java:159)
10-12 09:39:39.422: E/AndroidRuntime(1567):    at com.threed.jpct.GLRenderer.drawVertexArray(GLRenderer.java:2244)
10-12 09:39:39.422: E/AndroidRuntime(1567):    at com.threed.jpct.World.draw(World.java:1321)
10-12 09:39:39.422: E/AndroidRuntime(1567):    at com.threed.jpct.World.draw(World.java:1083)
10-12 09:39:39.422: E/AndroidRuntime(1567):    at com.threed.jpct.ES2Test.Scene.updateFrame(Scene.java:293)
10-12 09:39:39.422: E/AndroidRuntime(1567):    at com.threed.jpct.ES2Test.Scene.onDrawFrame(Scene.java:365)
10-12 09:39:39.422: E/AndroidRuntime(1567):    at com.threed.jpct.ES2Test.HelloShader$MyRenderer.onDrawFrame(HelloShader.java:206)
10-12 09:39:39.422: E/AndroidRuntime(1567):    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1516)
10-12 09:39:39.422: E/AndroidRuntime(1567):    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)


Attached are the available functions in the Light class
..by typing sun.

[attachment deleted by admin]

35
Support / Re: Confirming 32bit color output via jPCT
« on: October 12, 2012, 10:42:13 am »
I can't seem to find setDistanceOverride in v1.26 beta, was it removed?

Also adding the below lines to the fragment shader causes a shader load error

   ambientColor.x += 0.3;
   ambientColor.y += 0.3;
   ambientColor.z += 0.3;

36
Support / Re: Fake volumetric lights
« on: October 11, 2012, 03:20:20 pm »
No probs. If you want a glow effect as well you could experiment with a simple transparent plane centered near the front-center of the pumpkin with a 32bit (RGBA) texture that fades out from the middle. Beyond that you would need to use shaders, i.e. if you wanted a fancy glow extruding out of the pumpkin.

37
Support / Re: Confirming 32bit color output via jPCT
« on: October 11, 2012, 02:58:59 pm »
Ok thanks, no rush.

38
Support / Re: Confirming 32bit color output via jPCT
« on: October 11, 2012, 02:49:12 pm »
I can also post a version that combines offset mapping for the first with normal gouraud shading for all other light sources, if that helps.

If you wouldn't mind posting that version I'll give it a try. As far as I can tell it looks like the problem may be related to shader lighting.

39
Support / Re: Fake volumetric lights
« on: October 11, 2012, 02:24:53 pm »
I must agree it was a battle learning even the basics of Blender.

jPCT doesn't support dual sided polygon textures (which is good in a way, keeps things simple) so you will need to solidify the object as mentioned. Rather than copy the outer texture co-ordinates to the inner faces, you would want to simply apply white to the inside to mimic the light volume. You do this by selecting all the inner faces and either apply a white material from the materials menu on the right, or hop into texture mode, load up your texture, select a portion of the texture that contains white, then wrap that portion to the polygons you have selected. It's not easy to do so I wont go into it in detail, but there are plenty of video guides on youtube that will get you started.

40
Support / Re: Fake volumetric lights
« on: October 11, 2012, 02:07:25 pm »
You wont need two pumpkins, 3D modelling programs like blender allow you to select all the vertices and extend them inwards, effectively creating a complete 3D object with both inner and outer walls. Once that is done, apply a white part of the texture to the inner faces.

OpenGL hardware typically have 8 hardware lights you can use. Refer to the "Light" class in jPCT, set it's position to the center of the pumpkin to light it up. You could use shaders but it can be a steep learning curve if you are just starting to use OpenGL.

...Edit: Well actually yes you could use two pumpkins and invert the faces of the inner one and apply a bright texture to it, but you may run into visible artifacts or 'jaggies' at the edges of the objects if they are too close in 3D space.

41
Projects / Re: my FPS game for Android
« on: October 11, 2012, 12:20:12 pm »
The newer Tegra3 chipset seems fine, I don't know if it's tile based deferred now but I'm getting 60fps frame rates compared to Tegra 2's ~25FPS. ES2.0 Rendering quality also looks quality.

42
Support / Re: Fake volumetric lights
« on: October 11, 2012, 11:52:44 am »
You could cheat and change the texture of the inside of that pumpkin, make the inside colors pure white so it appears lit up.

Additionally, you could separate the inside and outside of the 3D pumpkin object and setAdditionalLighting(200,200,200) to the inner Object3D. Or perhaps pop a small hardware Light in the center.

43
Support / Re: Confirming 32bit color output via jPCT
« on: October 11, 2012, 11:38:29 am »
Still the same on the Mali crapset minus the bolts.

44
Support / Re: Confirming 32bit color output via jPCT
« on: October 11, 2012, 11:33:09 am »
Are you still use calcTextureWrapXXX to apply the texture? The tangent vectors are calculated based on the u/v-mapping. Try to find and use a model with proper spherical uv-mapping.

Oops yes you are spot on. Looks perfect now on the Tegra3

45
Support / Re: Confirming 32bit color output via jPCT
« on: October 11, 2012, 11:29:13 am »
Just to confirm I'm adjusting the ambient light correctly in the fragment shader, I've added the below lines


   float specular = pow(clamp(dot(reflect(-lVec, bump), vVec), 0.0, 1.0), 0.85);
   vec4 vSpecular = vec4(specularColors[0],0) * specular;   
   
   vAmbient.x += 0.3; // ADDED
   vAmbient.y += 0.3; // ADDED
   vAmbient.z += 0.3; // ADDED
   
   gl_FragColor = (vAmbient*base + vDiffuse*base + vSpecular) * att*2.0;
}

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