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 ... 5 6 [7] 8 9 ... 18
91
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.


92
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.

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

94
Support / Re: is this the right way to use repeatRendering?
« on: March 10, 2020, 05:50:20 pm »
what a pity.
thanks anyway.

95
Support / Re: is this the right way to use repeatRendering?
« on: March 10, 2020, 02:02:26 pm »
i tested repeatRendering. it seems that setOrigin doesn't work at that moment. setFloatArrayUniform works though.
so if i still want to use repeatRendering, i have to change the shader to take object position into account.
i prefer using multiple object3d's, as adding 3 floats on each vertex seems less efficient.

96
Support / Re: is this the right way to use repeatRendering?
« on: March 04, 2020, 07:25:07 pm »
also there is another question: can a shader be applied to Object3D's in multiple World's ?

Thanks in advance.

97
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.

98
Projects / Re: my project - Vehicle Simulation
« on: March 04, 2020, 08:02:16 am »
particles , eye candy

99
Support / Re: how to select uniform in renderhook
« on: January 15, 2020, 06:31:57 am »
thanks, i think these ways can all work.

100
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.

101
Feedback / Re: jPCT Still Going
« on: December 07, 2019, 08:06:09 pm »
i am still using jpct-ae for my personal project, and i don't intend to switch to other engines. because it's convenient to use - i write code and test run on an android device, no need for PC most of the time.

102
Support / Re: Scale X and Y axis
« on: July 21, 2019, 06:04:24 pm »
i tested it on jpct-ae only,  openglES 2.0

103
Support / Re: Scale X and Y axis
« on: July 19, 2019, 06:57:34 pm »
Apart from that: We are talking about Android/jPCT-AE here? In that case, you can't do it this way unless some more setup work which might not be worth it. There's another way, though. You can tweak the rotation matrix directly. This has some drawbacks as well, in particular it might increase a light source's brightness on the scaled object when it shouldn't and it doesn't work well together with the build-in scale methods. Anyway, this is how it works:

Code: [Select]
Matrix scale=new Matrix();
scale.set(0, 0, 2); // 0,0 for x-axis scaling, 1,1 for y, 2,2 for z
obj.getRotationMatrix().matMul(scale);

If you otherwise don't change the rotation matrix, you only have to apply this once. If you set it to a new anyway in each frame (or even sometimes), you have to apply this afterwards. Also keep in mind that scaling is cumulative. That means that doing this by 2 and then by 3 will result in a scaling of 6.

hi Egon, i read this thread and remember that i used to tried lengthening the normal vector to change lighting effect (over bright effect ? :) ) , i did that when meshes were created from vertex info, such as multiplying the normal by 5. but the lighting didnt change at all, seems like the normal vector is normalized when rendering.
can this behavior of normalizing the normal vector be canceled?
i was just exploring possibilities.

104
Support / Re: about the strength of specular light
« on: February 16, 2019, 07:22:07 pm »
yes , it works

105
Support / Re: about the strength of specular light
« on: February 15, 2019, 06:37:43 pm »
i will try it, thanks

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