if one vertex is out of screen the entire triangle is culled out - irrlicht

this is a noobish Irrlicht question because I just started working with it, but my problem is this: all the triangles of the mesh I'm rendering that have even one vertex out of screen, gets entirely culled out. this caused parts of the mesh that are partly out of the screen be completely invisible.
here's an image to illustrate the problem:
any ideas? (my camera is an FPS camera).
thanks!

ok apparently this only happens in software rendering, with OpenGL it's ok.

Related

Why we start seeing the disc on the double render geometry (when we do culling both from front and back) in three.js sample?

I have done the doubleSide rendering with depthTest off. This generate the rounded disc into my geometry I am curious to know the math behind this and why this happen.
My object is not transparent as you can see in the image Please explain about this.to me.
http://threejs.org/docs/#Reference/Materials/MeshDepthMaterial
In this example when you turn material doubleSide and turn of the depthTest you will get to know what I mean.
If you turn off depth testing then anything that is drawn later is on top of anything drawn before. Therefore if your object has parts that should be behind another part and you draw them later they will show incorrectly on top.

Barycentric wireframes with full disclosure of back faces

I've implemented a barycentric coordinates wireframe shader something like this, and in general it is working nicely.
But like Florian Boesch's WebGL demo, some of the wire faces on the far side of the mesh are obscured (maybe has to do with the order in which the GPU is constructing faces).
I've set the following in the hopes that they would clear things up:
glCullFace(GL_NONE);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
...but no go so far. Is this possible in OpenGL ES 2.0?
I had forgotten to discard on a transparent output, so the depth buffer was being written in spite of the apparently transparent geometry, thus the mesh was self-obscuring due to depth tests failing.
This would be the problem in Florian's demo too, though it may be that he explicitly avoids discard for mobile performance reasons.

three.js randomly flickers in red and brightly lit

I'm working with three.js (r67) and I'm having werid color flickering issues.
it looks like every few frames, for a single frame, some of the objects will be painted fully red. if I have a light in my scene, they will flicker randomly either red or very strongly lit.
it looks like its related to the camera position - at positions it will flicker like crazy, and some positions won't flicker at all.
have anyone experienced problems like that and can point me out things to check?
added screenshot below, photoshoped to illustrate how the flickering looks.
thanks!
OK it looks like a bug in three.js - if I switch all the materials to either phong or lambert the flickering stops. the problem appears only when having both material types.

Why is the texture image upside down in this example Dart ThreeJS?

In the example program given here in Dart, why is the image texture initially upside down? It seems to be flipped upside down, not rotated. Why is that?
Here is the example running, I am talking about the cube texture on the first frame when you view it, before it rotates. I made an example based upon this but I am upset to find the texture flipped upside down.
In the example program given here in Dart, why is the image texture initially upside down?
For me, the example shows the texture upside down not only in the first frame but in all frames (by comparing the texture and the running example). I am not sure why you and I are seeing different things.
In any case, this seems to be an old bug in CubeGeometry in three.js, which was fixed in July 2012 but has not been fixed in three.dart.

WebGL: missing triangles when moving camera

I am rendering a complex scene in WebGL (180 meshes) corresponding to a car model (Nissan GTX) . However when I move the camera around , it seems as if triangles were missing ,
These 'missing triangles' seem to jump randomly over the surface. Can this be a depth buffer problem or a normal calculation problem? I have no idea.
Nevertheless, if I zoom-in near the surface of the model, all triangles are there .
Does anyone have had this problem? any tips?!
I guess, you have a wireframe mesh directly on top of (or very near) a solid mesh and this is just a depth buffer problem. It works when zooming in, because the depth buffer precision is higher in the near area of the viewing frustum.
Try adjusting the screen space depth by working with the polygon offset (or a similar fragment shader modifying gl_FragDepth) when rendering a wireframe overlay directly on top of the solid mesh. Or just move them farther away in object space.
You might be right when you suspect a depth-buffer problem - the fact that the distance to the camera affects things suggests it could be a buffer precision problem. Check out the answer to this question for a possible solution.

Resources