Giter VIP home page Giter VIP logo

Comments (9)

D1plo1d avatar D1plo1d commented on May 3, 2024

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)

from three.js.

D1plo1d avatar D1plo1d commented on May 3, 2024

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.

from three.js.

mrdoob avatar mrdoob commented on May 3, 2024

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
http://blog.zupko.info/?p=170

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.

from three.js.

mrdoob avatar mrdoob commented on May 3, 2024

Specifically, the feature needed is FrustumClipping.NEAR. Which, may be a good idea to include by default on CanvasRenderer and SVGRenderer.

from three.js.

mrdoob avatar mrdoob commented on May 3, 2024

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

from three.js.

D1plo1d avatar D1plo1d commented on May 3, 2024

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 :)

from three.js.

jurjen avatar jurjen commented on May 3, 2024

I believe this would also fix the issue with intersecting planes?
I've modified the cube demo to spin in both the x and y axes, and when it intersects with the plane underneath, you get interesting rendering, where I think the foremost triangle is drawn over the top, and isn't clipped on the intersection line... If you change the number of segments used for the plane, the effect changes as well (more triangles, more intersections).

from three.js.

mrdoob avatar mrdoob commented on May 3, 2024

You mean when 2 objects "collide"? I think that's a different issue. Also hard to nail. There is some good "reading" here:

http://away.kiev.ua/away3d/techdemos/zorder/

from three.js.

mrdoob avatar mrdoob commented on May 3, 2024

Lines are now clipped.
http://mrdoob.github.com/three.js/examples/lines_test.html

from three.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.