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

Pages: 1 [2] 3 4 ... 10
Support / Re: fog color problem on transparent object
« on: July 12, 2017, 11:45:51 am »
yes, it's the beach that appears dark. but the beach is also from the png image, just the color is yellowish instead of white.
the beach and the white color part are both opaque part of the png image.

Support / Re: fog color problem on transparent object
« on: July 08, 2017, 05:25:42 am »
please look at the shore line of the island. it`s from a png image with 1bit transparency.
in the 2nd screenshot the shore line looks dark on the far side.

Support / fog color problem on transparent object
« on: July 06, 2017, 02:50:13 pm »
i have a transparent object with the same fog setting as other opaque objects, but when fog is dense ( close to farclip), the output color is not close to fog color. so the transparent object stands out when viewed far away.
 is there a problem with the blending method?

Support / Re: render order of opaque objects?
« on: July 06, 2017, 02:27:05 pm »
here's another question: in a World, are transparent objects rendered after (speaking of time) all opaque objects?

Support / Re: shared VBO ?
« on: June 30, 2017, 02:28:38 pm »
it's not very necessary. i just wanted to know.
sometimes, it can be used to save memory, such as different LODs of an object use the same VBO.

Support / Re: shared VBO ?
« on: June 30, 2017, 02:39:00 am »
i read the doc about shareCompiledData. it says the objects must have the same Mesh instance, then how can i define different primitives for the objects?

Support / Re: does JPCT-AE support scissor test?
« on: June 30, 2017, 02:33:41 am »
now i have another question, how can i use multiple shaders on an Object3D. i think i have read somewhere that an object can have several vertex shaders and fragment shaders in a row.
the reason i want this is that i don't like to modify the default shaders.

Support / shared VBO ?
« on: June 29, 2017, 09:43:30 am »
say i have several objects which have the same vertex positions and normals and UVs, but the primitives are different. in GL or DX, these objects can use the same VBO.
in JPCT, is it possible?

another question, if in a vertex list, some vertices are not pointed by any primitive, does JPCT remove these vertices?

Support / does JPCT-AE support scissor test?
« on: June 28, 2017, 11:56:51 am »
i didn't notice any related method.

Support / render order of opaque objects?
« on: June 27, 2017, 10:16:56 am »
if several opaque object3d are added to a world in particular order, can i assume they are rendered in that order?

Support / one Light for multiple World?
« on: June 27, 2017, 10:14:28 am »
is it possible to use 1 Light for multiple World? since a Light is just some parameters.

Support / about multi-texture, different stages inside an object?
« on: June 24, 2017, 06:38:08 am »
the TextureInfo/PolygonManager method gives me an impression that polygons in an object3D can have different tex stages, such as polygon A has 3 stages while polygon B has 2 stages. is it correct?

Support / how to identify the version of the engine jar file
« on: June 14, 2017, 07:23:17 am »
when i have multiple copies of the jar file in different places, i want to know which file is newest or most suitable.
currently i can only check the size or time of the file. but these are both unreliable.

Support / Re: is result of setboundingbox permanent?
« on: June 14, 2017, 05:22:50 am »
in my actual app, the shape is a quad -- 2 triangles, same problem.
do you mean the new version would slow down particle rendering? if so , i would prefer the old version. there is other way to solve the culling problem - make the shape larger and modify the shader.
since you don't keep branches of the engine, i like the one with faster performance. you just need to tell (in javadoc) people why setBoundingBox doesn't work in some case.

Support / Re: is result of setboundingbox permanent?
« on: June 13, 2017, 07:22:34 am »
see below. in the sample, you can see a triangle suddenly disappears when fov changes, while it shouldn't.
i found if the shape is created by Primitives.getBox, setBoundingBox works correctly.

Code: [Select]
import com.threed.jpct.*;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLDisplay;
import javax.microedition.khronos.opengles.GL10;
import android.opengl.GLSurfaceView;
import android.os.Bundle;

public class Sim extends Activity {
static GLSurfaceView GLview;
static MyRenderer rend;
static FrameBuffer frmBuf;
static World world=new World();
static Camera cam=world.getCamera();
static float fov=1f;
static Object3D shape;
static String glslV="uniform mat4 modelViewProjectionMatrix;"+
"attribute vec4 position; void main(){ vec4 p=position;"+
"p.y*=2.0; gl_Position=modelViewProjectionMatrix*p; }";
static String glslF="void main(){gl_FragColor=vec4(1,1,1,1);}";
static GLSLShader glsl=new GLSLShader(glslV,glslF);

protected void onCreate(Bundle a) {
rend=new MyRenderer();
GLview=new GLSurfaceView(getApplication());
setContentView(GLview); }

class MyRenderer implements GLSurfaceView.Renderer {
public void onSurfaceCreated(GL10 g,EGLConfig c) {
shape=new Object3D(new float[]{5,0,0,0,-5,0,-5,0,0},null,new int[]{0,1,2},-1);;
cam.setFOVLimits(0.001f,1); }
public void onSurfaceChanged(GL10 g,int w,int h) {
if (frmBuf!=null) frmBuf.dispose(); frmBuf=new FrameBuffer(w,h); }
public void onDrawFrame(GL10 g) {
if (fov<0.1) fov=1f;
frmBuf.display(); } }


Pages: 1 [2] 3 4 ... 10