Closed malekcellier closed 7 years ago
You're using it right, it's probably a problem with the shader math. I never thought of testing it with an OrthographicCamera, so definitely some things are different. I'll check it out.
Hi, any news on this issue? Just because I also ran into the same problem when using the orthographic camera...
I think you have to tweak the lineWidth value, and check or uncheck sizeAttenuation. Try lowering lineWidth to .01 or something like that (it changes with your scene size)
Here's the graph example with an OrthographicCamera:
thank you very much, that works like a charm!
Is there a correlation between lineWidth
for a perspective camera and lineWidth
for an orthographic camera?
It is indeed the same issue - works with a lineWidth of 0.01. Thank you.
Hi. First of all, thank you for awesome THREE.MeshLine :)!
Could we please re-open this issue? Since using a value of 3 with PerspectiveCamera and 0.003 with OrthogonalCamera yields roughly the same results for me (lineWidth-wise), I suspect this could be fixed within THREE.MeshLine. Otherwise MeshLine consumer has to keep track of all the materials used and update them whenever camera type is toggled.
I completely don't mind waiting for a fix (I myself am not enough fluent with graphics and THREE to help out) and I just subscribed to this issue, but I'd really like this issue to stay in the issue pool than be closed, perhaps though with a more descriptive title, such as:
Orthographic camera requires different lineWidth values than PerspectiveCamera
Thanks and have a great day, @spite !
Hi. @spite thank you for awesome THREE.MeshLine. I need such a fix as well and would appreciate a lot if this issue could be re-opened.
I'm finding lineWidth: 0.158
is roughly equal to 100px in orthographic for those who need pixel accuracy (I haven't found any circumstances where this changes yet).
My PR is apparently rejected for the exact reason his workaround in example made out no line—actually very thin line when I fixed the shader math. I hope this changes but maybe I just have to add a new API for fixed version and leave the current version alone.
I'm now maintaining a version with your fork. https://github.com/ryanking1809/threejs-meshline
Hi!
I am using this piece of code to change the view from Perspective to Orthographic and back:
I obtain the following:
![orthographiccamera](https://cloud.githubusercontent.com/assets/3883114/20282462/09dcb06c-aab5-11e6-86b2-27f3599f612a.png)
where one can see that the orthographic has lines all around.
Is that a bug or me misusing the API?
BR M