-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lines disappear prematurely when they clip the bottom center of the camera #7
Comments
update: although i didn't zoom in far enough to see it this has the same effect on the part's lines (since they are smaller i need to zoom in more to intersect them with the camera) |
forgot to add one critical detail, I'm fairly certain this is all going through the canvas renderer - the browser is Chrome 5.0.375.70 (48679) Ubuntu. |
I can't seem to be able to open imgur images today... But I think I know what you mean. This is because one of the points of the segment is outside the frustrum. That doesn't happen with the WebGLRenderer, but with the CanvasRenderer/SVGRenderer it needs a feature that I haven't had time to implement. Frustrum Clipping Feeling like tackling this one? :) PS: Overdraw extends the screen space positions of the vertices to avoid the antialias gaps between polygons that (unfortunately) all the browsers show. Each vertex is separated from the other 2 (or 3) by 0.5 pixels. It would be great if had a antialias = false option, but they decided not to put it. Actually. overdrawn shouldn't be an option on the StrokeMaterials as it's not an issue there. Will fix. |
Specifically, the feature needed is FrustumClipping.NEAR. Which, may be a good idea to include by default on CanvasRenderer and SVGRenderer. |
Thinking about it again, the Renderer class should be the one that does that. So it would split a polygon if needed, letting the CanvasRenderer and SVGRenderer just draw. If that's in place maybe CanvasRenderer/SVGRenderer wouldn't need to do 2d clipping... |
ok, good to know I'm not crazy, I'll take a look at FrustrumClipping.near later on and see if i'm up to it. Thanks again :) |
I believe this would also fix the issue with intersecting planes? |
You mean when 2 objects "collide"? I think that's a different issue. Also hard to nail. There is some good "reading" here: |
Lines are now clipped. |
add falloff for diffuse, opacity, map and alpha.
…ano into skybox (fixes mrdoob#3)
Rename fogExp parameter to fogExp2
Merge with main repo
When I zoom into a object (which I do by incrementing the z vector of the camera position in three.js) I find that once I get to close lines start disappearing while they should still be in the viewing area. Perhaps this is a problem with my near clip (0.000001) or far clip (1000000) being set poorly (those values were based on no real 3d programming experience) but it could also be a bug so I'm posting it here in hopes of some help with the issue.
The lines in the screenshots bellow use THREE.ColorStrokeMaterial and have overdraw set to true (btw. what does overdraw do?). I've drawn a 2d grid with a part on it (this is part of some CNC software I'm working on) but as you can see the grid lines that intersect the bottom of the camera are disappearing as i zoom into them.
A few screen shots of the problem (zooming into the object by incrementing camera.position.z): http://imgur.com/a/JA9ET/threejs_lines_disappearing_due_to_camera_clip_issue
Any advice on how to solve this problem would be greatly appreciated!
The text was updated successfully, but these errors were encountered: