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

Messages - MichaelJPCT

#76
i am not sure about iRenderHook solution, but custom shader can work. custom shader can do a lot of things, but it is like last resort for me - i am not into graphics.
i think this problem can be solved easier from engine level. and i think relating Object3D and Light is a good thing, it gives more choices to the engine users. i can think of other cases where it is useful.
for example, a scene is divided into rooms, a light in a room should not affect objects in another room, even if the light is near to the other room. with Object3D list for Light, this scene can be setup easier.
#77
right, turning off all lighting for an object is not what i want.
in my case , there is sun light as a base, then i add a light below an object, to simulate reflected light from the ground, and it's different from ambient lighting. and i want this only for the main character - for performance reason.
there can be other lights in the scene, so setMaxLights(1) for other objects is not a solution either.
this is not important though.
#78
Support / relationship between Object3D and Light
May 29, 2020, 08:27:51 PM
Hi,
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.
#79
Projects / Re: my project - Vehicle Simulation
May 11, 2020, 06:28:16 AM
#80
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.
#81
Support / Re: is point sprite supported?
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.
#82
Support / Re: Minor blitshader bug
April 23, 2020, 05:10:17 AM
what about flush() or sync() ?
#83
Support / Re: is point sprite supported?
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.
#84
Support / Re: a suggestion for the future of JPCT-AE
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?
#85
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.
#86
Support / is point sprite supported?
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?
#87
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?
#88
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.
#89
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).
#90
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.