Jump to content

Broken Lines

Joe Luong

Recommended Posts


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.



Link to comment
Share on other sites

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.


Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...