Joe Luong Posted October 19, 2017 Share Posted October 19, 2017 Hello, I used BABYLON.Mesh.CreateLines() to create the blue rectangle and BABYLON.Mesh.CreateTube() to create the black lines outside. But all my lines and tubes are not smooth at all, looks like they are broken. I'm new to BabylonJS so I will really appreciate if you guys can give me some advices and suggestions. Thanks. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 19, 2017 Share Posted October 19, 2017 Hello can you try to call engine.setHardwareScalingLevel(0.5) This could help a lot with aliasing If this is not enough, do you mind reproducing the issue in the Playground? Quote Link to comment Share on other sites More sharing options...
Joe Luong Posted October 19, 2017 Author Share Posted October 19, 2017 Thank you for your quick response @Deltakosh. I created a sample on playground: https://playground.babylonjs.com/#JBIBJ6 I used CreateLine() for the green rectangle and CreateTube() for the white rectangle. It looks worst when I rotate it to some camera's position like this picture below. I already added engine.setHardwareScalingLevel(0.5) but it seems like the same. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted October 19, 2017 Share Posted October 19, 2017 There is only so many pixels available to make them look smooth depending on the thickness of the line and the distance to it. That is just how pixels render its the same thing for any program its just how screens display. If your screen had a stupid amount of DPI you would not see it so much. do an anti-aliasing pass Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 20, 2017 Share Posted October 20, 2017 Seems better with fxaa: https://playground.babylonjs.com/#JBIBJ6#1 But as @Pryme8 mentioned you should increase the thickness Quote Link to comment Share on other sites More sharing options...
Nabroski Posted October 22, 2017 Share Posted October 22, 2017 I think also becourse the tube Mesh is affected by shading https://playground.babylonjs.com/#JBIBJ6#2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.