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.

Topics - MichaelJPCT

Pages: [1] 2 3 ... 5
Hi Egon,
when i want to move some vertices of an object, the 1st method that comes to mind is using a shader.
but sometimes i dont like to write a new shader.
Animation and IVertexController seem to be my options.
but i worry about the performance.
among the 3 methods, is shader potentially the fastest one?
the movements are simple maths.
i need to deform the object in every frame.
the quantity of moving vertices is below 100.

Support / relationship between Object3D and Light
« on: May 29, 2020, 08:27:51 pm »
today i thought of a situation that within several object3d's i want a light to affect only one of them(or several of them).
so i wish there is Light list for Object3D or Object3D list for Light.
setMaxLights() and setDistanceOverride() methods are not enough in this case, because a light is far away from the object3d if i need parallel, directional light, a light can affect any object in range.
moving Object3D to another World also creates more trouble.
using light can't be substitude by additional color, because light has direction.

Support / is point sprite supported?
« on: April 15, 2020, 11:10:57 am »
i read that point sprite can make high performance particle system, and gl es 2.0 has point sprite too. can jpct-ae support it?

Support / a suggestion for the future of JPCT-AE
« on: April 14, 2020, 05:26:21 pm »
Hi Egon,
i've used jpct engine for several years, i have the feeling that jpct is easy to use but with limited freedom for engine users.
for example, jpct doesn't deal with depth test/write, but they are very important in some cases. i have to call gl api directly outside the scope of jpct. luckily there is no bad influence.
another example, i wish to have single channel textures to save memory. nowadays gpu's are getting better, they might support more features. but jpct can't support every new feature of new gpu. at the same time, the management functionality of jpct is good. so what if jpct can interface with a texture created with gl api calls? then the user can have more freedom while still have the convenience of jpct.
so what i'm really suggesting is the ability to interface with objects created by gl calls outside jpct, because it's too much work to make the engine support every thing.
i read about defered rendering, and i believe a lot of developers would choose new techs like that. can jpct support the new techs? if jpct doesn't support them directly, can you make interfaces to let the users have the possibility to do them?

Support / RenderToTexture and alpha blending problem
« on: March 28, 2020, 02:37:44 pm »
hi Egon,
i encounter a strange problem.
i want to render some clouds into textures and put them into rectangle meshes then put them back to the scene. the replaced method is putting the clouds directly into the scene.
there is a far scene where nothing but clouds are in, and the far scene is rendered without depth test/depth write.
i believe the environment for rtt is the same as the non rtt one - same shader, same depth test setting.
but the rtt texture doesnt look the same.
without rtt, the overlapping particles blend, the result looks thick. but with rtt it seems only one layer remains, which indicates a replace method rather than blending.
and even if the rtt texture has opaque background, the particles make the texture look-through. the below screenshots are comparison of 2 methods .
 the large white area is because i clear the rtt fb with color 0xffffffff, which is not necessary, but it indicates the opaque background was lost because of the particles. i also tried to use an opaque mesh as background, same result.
turning depth test on, doesnt change the result either.
the texture for rtt is created with Texture(x,y) method.
more strangely, the main scene is also rendered into a texture(npot) then blit into the true fb, but the clouds directly in main scene doesnt change the npot texture to transparent.

why would the rtt result be different from directly rendering into the main scene?

Support / render thread question
« on: March 15, 2020, 09:50:38 am »
hi Egon,
when World.draw() returns, has GL finished drawing? or is it still working when my program does other work?
does framebuffer.display() finish all render work before return?

Support / is this the right way to use repeatRendering?
« on: March 04, 2020, 03:10:37 pm »
i plan to use a renderhook and a shader to draw an object3D multiple times.
in repeatRendering, pseudo code:
Code: [Select]
if id>0 { id-=1; myobject.setOrigin(positionArray[id]); myshader.setUniform(uniformArray[id]); return true; }
return false;

if this doesnt work, i would use a shader and a renderhook on multiple Object3D`s with the same Mesh.

Support / how to select uniform in renderhook
« on: January 13, 2020, 07:39:23 am »
Hi Egon,
if multiple objects share a shader, i must set a renderhook to apply a uniform to an object. the question is ,how to select the correct uniform to an object?
i have an array of objects and an array of uniforms.
i need an ID for each object right?
currently i use object3d.set/get transparency like an id to select uniforms. it works, but i dont think this is the formal way.
i see object3d.getid, but this id is different from the id in my array. should i map these 2 types of id's? is it the formal way to select uniforms?

thanks for your support.

Support / about maxLights in Config
« on: February 13, 2019, 02:28:30 pm »
i wonder , can maxLights be non power of two, like 33 ?
and can maxLights be different for different Worlds ? some Worlds don't need many lights but some other do.
does it affect performance or memory usage much ? if it doesn't affect much , i would just set it to a large number.

Support / is there such a thing as single channel texture in vram?
« on: January 12, 2019, 07:57:21 am »
i think all textures have 3 or 4 color channels. but sometimes a texture has no color , only greyscale info is needed.
if the texture in vram is stored as single channel, then it occupies 1/4 of memory. isn't it great?

another question, can RTT texture be ETC compressed in vram?

Support / gpu bug ?
« on: January 11, 2019, 04:36:14 am »
my project sometimes has 2 transparent objects(shadows) overlapping but at the same height.
on Powervr 6250 gpu , the objects flicker, like the behavior of Z-fighting. on maliT720, it doesn't happen.
it shouldn't happen because they are transparent, they should co-exist.
what might be the cause of Z-fighting and can it be fixed?

Projects / my project - Vehicle Simulation
« on: December 28, 2018, 06:28:35 pm »
this project uses JPCT-AE.
so far i can only post screenshots.

Support / about the strength of specular light
« on: November 11, 2018, 07:00:01 pm »
Hi Egon,
i found the reflected light color is related to texture color - the light on white object is whiter than that on dark color  objects.
but in reality, some dark colored object can reflect very bright light, such as dark colored glass.
i don't aim for complex graphics so that's not very important by now.
in some engines, there is concept of " material " - not just texture, but how strong do ambient light, diffuse light, specular light affect an object.
would you consider having this in JPCT? or people need to write new shaders if necessary.

Support / about Light Discard Distance
« on: November 06, 2018, 03:28:16 am »
Hi again.
i recently found that discard distance of Light means the distance between Light and origin of an Object3D.
if an object3D(such as a ball) has radius of 10, placed 15 from light, discard distance is 10, then the object is not lit. but in reality the light should lit a part of the object at that distance.
when the light move closer to the object , down to 9.9 unit away, the object is suddenly lit.
would it be better if discard distance takes into account the radius of object3d?
that's just a thought, there may be downside too.

Support / to delete an Object3D
« on: October 28, 2018, 09:03:18 am »
Hi Egon, long time no see. i am still using JPCT for my hobby project , and i'm happy with it so far.
now i need to add/delete Object3D , like a lot. i see dispose() of Light , but no such thing of Object3D. does it mean it's safe to just remove it from World and set the field to null and let JVM do garbage collection?
and for other object types, are they all safe if there is no dispose() method?

Pages: [1] 2 3 ... 5