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 ... 15 16 [17] 18
241
Support / Re: Near plane clipping (was: techniques for displaying text)
« on: January 06, 2016, 04:13:47 am »
it would be better if texture blitting as well as 3D objects has tree-like hierachy which pass translations including move, scale, rotation and show/hide states. so everything can be managed in groups.

242
Support / Re: problem with texture tile
« on: January 05, 2016, 10:29:50 am »
problem solved. i found the scale parameter should not be power of 2, but should be (20 * n)
this works correctly now: ExtendedPrimitives.transformUVCoords(plane,0,0,240,240,0,0);

243
Support / problem with texture tile
« on: January 05, 2016, 10:18:44 am »
i found texture tile to be not precisely repeating:
i have a plane created by

plane=ExtendedPrimitives.createPlane(4096,20); ExtendedPrimitives.transformUVCoords(plane,0,0,256,256,0,0);
tex.setClamping(0); plane.setTexture(tex); plane.compileAndStrip(); plane.build();

texture image size is 256x256.
say i look at position (0,0,0) of the plane, i see some part of the texture. then i translate the plane to (4096,0,0), in theory i should see the same texture, but i saw the texture changed. no matter what parameter i put into the transformUVCoords call. i don't know why.

244
Support / Re: Near plane clipping (was: techniques for displaying text)
« on: January 05, 2016, 10:06:44 am »
no need for sorry. i found this to be useful - i can scale the whole 2D blitted image by setting the nearclip of the world before blitting. don't need to recalculate the size and position of every blit call.

245
Support / Re: Near plane clipping (was: techniques for displaying text)
« on: January 05, 2016, 06:22:33 am »
that works , thanks.
but beware, this also affects texture blitting. i added an empty world and set the nearclip to 1, in order to reset the matrix for 2D blitting.

246
Support / Re: Near plane clipping (was: techniques for displaying text)
« on: January 04, 2016, 03:45:07 pm »
i have a doubt that in JPCT RenderScene method there is a glFrustum call.
the parameters for glFrustum are (left,right,bottom,top,zNear,zFar), where (left,right,bottom,top) should all be multiplied by zNear. but JPCT assumes zNear to be 1 and (left,right,bottom,top) are not multiplied. so the resulting projection matrix is wrong.

for me, using hardware processing power to increase accuracy is a much easier solution than optimizing the scene, so i chose multipass rendering.

247
Support / Re: Near plane clipping (was: techniques for displaying text)
« on: January 03, 2016, 05:09:10 pm »
Which renderer are you using for that?
lwjgl hardware opengl renderer

248
Support / Re: Near plane clipping (was: techniques for displaying text)
« on: January 03, 2016, 04:08:14 pm »
i tried glIgnoreNearPlane to false, but still not right. all scene are messed up.
that multipass thing is to increase the accuracy of Z-buffer, 20000.0 to 0.1 is a very large ratio, the Z-buffer can't distinguish 2 polygons at 10000.0 and 10000.01 for example.
i thought JPCT renderer has a multi-thread nature so something is messed, but i don't know details about the renderer.

249
Support / Near plane clipping (was: techniques for displaying text)
« on: January 03, 2016, 02:12:42 pm »
i am trying to do multipass rendering of a single world, dividing a world into near/middle/far parts. render far parts before rendering near parts,  like this:

world.setClippingPlanes(250.0 , 20000.0); world.renderScene(framebuffer); world.draw(framebuffer); framebuffer.clearZBufferOnly(); world.setClippingPlanes(5.0 , 250.0); world.renderScene(framebuffer); world.draw(framebuffer); framebuffer.clearZBufferOnly();
world.setClippingPlanes(0.1 , 5.0); world.renderScene(framebuffer); world.draw(framebuffer)

but the end result is not what i expect. is my method wrong? how can i achieve the multipass effect i described?

250
Support / naming the vertex attributes
« on: January 03, 2016, 10:29:06 am »
say i created a plane with ExtendedPrimitives.createPlane,
in the object3d there is a mesh, and the mesh has vertex positions, uv coords, etc.
they are like vertex attributes, but they are not in VertexAttribute objects.

if i want to use shader with this plane and i need to access vertex position, normal, uv coords... how can i access them?

251
Support / can i change min max fov?
« on: January 02, 2016, 02:08:59 pm »
i get 0.5 and 1.5 for minfov and maxfov, those are about 30 and 75 degree in horizontal direction. but i want larger range.

252
Bugs / Re: cant use softward n hardware renderer on the same framebuffer
« on: January 01, 2016, 05:09:34 pm »
i guess dividing a large quad into smaller quads will not give smooth color if fog is calculated per-vertex. i want the color look smooth. and one quad can be rendered much faster than hundreds or thousands of quads.

253
Bugs / Re: cant use softward n hardware renderer on the same framebuffer
« on: January 01, 2016, 04:14:04 pm »
And honestly, I don't think that your GPU doesn't support per pixel fogging. That's a feature almost as old as GPUs. What makes you think that it doesn't support it?

say my camera is placed at (0,0,0) and there is a large quad of size 20000x20000 at (0,10,0), with each vertex at the same distance to camera (at 45,135,-45,-135 degree). fog ends at 5000.
when the quad is rendered, its color is totally fog color. because all vertices have the color of fog, they make all pixels have the same color. this is the behavior of per-vertex fog.
if the 2 vertices which were behind the camera are moved forward so that they are a little bit in front of the camera, then the fog effect looks correct.
right now i am using Intel Atom Z3740D with onboard GPU.
anyway i'll try to use shader to render the quad, i did it once with other engine. i was just curious how software renderer would do in this case.

254
Bugs / cant use softward n hardware renderer on the same framebuffer
« on: January 01, 2016, 02:47:09 pm »
javadoc says "It is possible to use the software renderer as well as the OpenGL renderer on a single framebuffer at the same time"

i tried this:

buffer.disableRenderer(2); buffer.enableRenderer(1)
buffer.clear()
buffer.disableRenderer(1); buffer.enableRenderer(2)

then "array index out of bound exception" was reported at buffer.clear().

i was trying to use software renderer to render a large model with per-pixel fog, since my GPU can't do per-pixel fog.

255
Feedback / Re: new way to develop with JPCT - Jython
« on: December 30, 2015, 07:38:33 pm »
ok. i have never done wiki before. :D

Pages: 1 ... 15 16 [17] 18