Main Menu
Menu

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.

Show posts Menu

Topics - MichaelJPCT

#21
Support / a suggestion for the future of JPCT-AE
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?
#22
Support / RenderToTexture and alpha blending problem
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?

#23
Support / render thread question
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?
#24
i plan to use a renderhook and a shader to draw an object3D multiple times.
in repeatRendering, pseudo code:

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.
#25
Support / how to select uniform in renderhook
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.
#26
Support / about maxLights in Config
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.
#27
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?
#28
Support / gpu bug ?
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?
#29
Projects / my project - Vehicle Simulation
December 28, 2018, 06:28:35 PM
this project uses JPCT-AE.
so far i can only post screenshots.
#30
Support / about the strength of specular light
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.
#31
Support / about Light Discard Distance
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.
#32
Support / to delete an Object3D
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?
#33
Support / variable shadow bias ?
September 26, 2017, 11:43:16 AM
i think of a situation where a bias set for shadow helper doesn't fit - switching from a large scene to a small scene, etc.
so i wish the bias can be changed.
or i recreate the shadow helper, but will this affect the objects which have been receivers?
#34
i want to change some vertices in an object loaded from 3DS or OBJ file, and create another object from these vertex data.
can i do that?
#35
Support / question on shadow size
July 16, 2017, 08:28:31 AM
i used Shadowhelper to cast an object onto a wall, and noticed that when light is far away, the shadow was smaller than the object. is it normal? shouldn't the shadow be at least as large as the caster?
#36
Support / fog color problem on transparent object
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?
#37
Support / shared VBO ?
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?
#38
Support / does JPCT-AE support scissor test?
June 28, 2017, 11:56:51 AM
i didn't notice any related method.
#39
Support / render order of opaque objects?
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?
#40
Support / one Light for multiple World?
June 27, 2017, 10:14:28 AM
is it possible to use 1 Light for multiple World? since a Light is just some parameters.