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 ... 4 5 [6] 7 8 ... 18
76
Projects / Re: my project - Vehicle Simulation
« on: May 11, 2020, 06:28:16 am »

77
phone rotates or resumes causes framebuffer change, gl context lost...
in that situation, framebuffer must be re-created, and any render-to-texture must be rendered again.
and if texel of a texture is not kept in system ram, you need to reload the texture from file.
in Config class and Texture class , there are some setting you must know about - you are new to the engine, it will take time for you to get familiar with the engine. i used jpct a few years and there are something i still don't know.

78
Support / Re: is point sprite supported?
« on: April 23, 2020, 11:52:58 pm »
i have tried using an object3d to hold 100 particles (my cloud effect) , using shader/uniform to locate every particle.
in this method, jpct doesn't need to sort all particles, only sort the object3d in a World. when particles within an object3d are close to each other, and the scene is not too complex, this method doesn't often cause sorting error, and it  saves sorting time, 1 vs 100(or 20 vs 2000) candidates to sort in my case, that should be quite some time.
imagine i want a particle emitter with varying quantity of particles, sometimes a few, sometimes 500 particles, adding/removing them as individual object3d, or only setting visibility while keeping them in a World,  not something i would prefer to do.
if they are only 1 object3d, i can use shader to easily make some of them disappear.
and 500 draw calls cost much more time than 1 drawcall.
so these are the benefits of using object3d like an emitter. not always good, but in some case, it's very good.
in my scene, there are often 20 clouds (2000 particles) on screen , my app runs 30fps without problem if they all look small on screen. test device has quadcore A53 which is low-end device now.
using quads can do it, but point sprites can save calculation.

79
Support / Re: Minor blitshader bug
« on: April 23, 2020, 05:10:17 am »
what about flush() or sync() ?

80
Support / Re: is point sprite supported?
« on: April 23, 2020, 05:06:26 am »
what about the point mode in drawWireframe() ?
the object is still made of polygons, but only points are rendered.

81
Support / Re: a suggestion for the future of JPCT-AE
« on: April 22, 2020, 06:01:11 pm »
i think i haven't learned enough about the engine - i have only used the simpler portion of the engine.
i just read the java doc and i saw the setExternalId() method.
since you say you have added options for people who want more direct control, i think all i would need are already in the engine.
i think JPCT misses some showcase of advanced effects. i used to use Panda3d, in its community there are showcase of advanced rendering techniques, such as physics based rendering , which looks modern.
i am not graphics enthusiast so i don't do advanced graphics effects. i use JPCT-AE because it's convevient and i don't aim for pretty graphics.
in Projects page of the website, there are screenshots of many projects, but there are no highlights of graphics effects, it's hard for me (or some other people) to find out the best effects JPCT can do. some people, such as me , at the beginning, would think JPCT is an engine which can do simple graphics. but that is not the whole truth.
perhaps more efforts in showcasing would help people know better about the engine?

82
Support / Re: Rotate object according to forward and downward vectors
« on: April 17, 2020, 07:09:54 pm »
i always use object3d.setOrientation(forward vec, up vec) .
up vec is negative of downward vec.
only 6 float values (two vec3) are needed.
you need vectors in world space.

83
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?

84
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?

85
Support / Re: RenderToTexture and alpha blending problem
« on: March 30, 2020, 12:04:28 pm »
hi Egon,
don't worry about this, i just figured out this method can't get me the same visual effect at all, it's wrong method.
setAlphaWrites(false) can let me get a texture of the same look, just that it can't be transparent so it can't be put back to the main scene.
the blending is always correct, i didn't understand it, now i understand.

86
Support / Re: RenderToTexture and alpha blending problem
« on: March 29, 2020, 09:56:25 am »
i just tried, it doesnt change. i think the first time the texture is used, alpha channel is automatically created.
if i remove the channel after the first time, i get a total black texture after render.
but to the npot texture of screen size, i cant call removeAlpha, or the app crashes.
i tried creating npot texture (but with pot size) for this case, but the result doesnt differ from Texture(x,y).

87
Support / Re: RenderToTexture and alpha blending problem
« on: March 28, 2020, 02:55:35 pm »
i tested on 2 different gpu , same result.
the rectangle holding the rtt texture uses a shader which just copies texture color to gl_fragcolor.

88
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?


89
Projects / Re: my project - Vehicle Simulation
« on: March 19, 2020, 08:24:44 pm »
you are mostly right.
but there is no filter, the location of particles are random and they are transparent, somewhere it's thicker or thinner so the blended color varies even with just white color. the bottom is set to grey, yes.
the theory is quite simple.
the good side is, little texture is needed, and it has 3D shape. the bad side is, slower, and does not look very real.


90
Projects / Re: my project - Vehicle Simulation
« on: March 16, 2020, 06:07:38 pm »
clouds , made of groups of randomly placed particles , rendered using a shader.

Pages: 1 ... 4 5 [6] 7 8 ... 18