Statics Posted October 16, 2015 Share Posted October 16, 2015 Hi, I was wondering if there was anyway to adjust the thickness of a line. I'm trying to make some lines stand out more than others. I've been told to use a cylinder by some people in another post, but cylinders have issues when working with paths and when cameras are close to them. right now the way I'm doing it is by putting several lines close to each other, but that looks messy and isn't quite perfect. Thanks for any help!! Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted October 16, 2015 Share Posted October 16, 2015 I saw that there was a line vertex shader today. If you look at it, it certainly looks like at the GPU level, width is passed/considered.https://github.com/BabylonJS/Babylon.js/blob/master/src/Shaders/line.vertex.fx It is an open source system. Start digging in the .TS or .JS files, and you can probably answer your own question. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 16, 2015 Share Posted October 16, 2015 You can also consider creating tubes depending on the number of lines you want Quote Link to comment Share on other sites More sharing options...
Wingnut Posted October 16, 2015 Share Posted October 16, 2015 We are thinking alike, DK... so, you might want to see a doctor. http://playground.babylonjs.com/#Z1SIC#1 But there could be ANOTHER way to make fat lines. Drum roll please... http://playground.babylonjs.com/#1IYSYD ta-da! errr... something. Here's some more mad fun. Vousk-prod., Nesh108 and GameMonetize 3 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted October 17, 2015 Share Posted October 17, 2015 Hmm, the tube demo (previous post) is suddenly failing... for me... today... at these temperatures. Ok, WHO broke the magic etch-o-sketch? Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted October 17, 2015 Share Posted October 17, 2015 Ah ah, nice tweak Wingnut, as always !!Really strange this "only some lines" problem... Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 18, 2015 Share Posted October 18, 2015 Oups..My bad, while moving code to MeshBuilder, I forgot some default values..Fix in progress Statics 1 Quote Link to comment Share on other sites More sharing options...
Statics Posted October 21, 2015 Author Share Posted October 21, 2015 Thanks for all the responses. I have been away for awhile, but I will definitely go through them all. It also looks like Babylon has had some updates recently Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 21, 2015 Share Posted October 21, 2015 We are always updating babylon.js Quote Link to comment Share on other sites More sharing options...
captainleighwalker Posted June 27, 2018 Share Posted June 27, 2018 @Deltakosh this still seems to miss half of the lines in my tests? and in the pg above the one line. Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 27, 2018 Share Posted June 27, 2018 @captainleighwalker huh? Please explain, and I could prolly help. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 27, 2018 Share Posted June 27, 2018 @captainleighwalker Sorry do not understand Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 27, 2018 Share Posted June 27, 2018 I will try to write up a new lineRibbon function today, should fix this whole topic really good like, mmmhmmm... Quote Link to comment Share on other sites More sharing options...
captainleighwalker Posted June 27, 2018 Share Posted June 27, 2018 Sorry I was referring to this method http://playground.babylonjs.com/#1IYSYD#1 I have a big smooth radius line so I thought a tube was a bit over the top. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 27, 2018 Share Posted June 27, 2018 I am going to put an end to this conversation today, stand by. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted June 27, 2018 Share Posted June 27, 2018 Hey, what do you dislike about conversations? Ohhhh, you are going to provide the ultimate solution? Ohhh. [Wingnut ushers P8 thru an airport metal detector, just in case] heh Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 27, 2018 Share Posted June 27, 2018 Maybe... at least a good solution for thick lines that are on a singular plane. hmmm I just actually realized this is being overthought... and I was about to do some fancy ribbon method that was going to be overkill... http://playground.babylonjs.com/#Z1SIC#10 the tube solution with a custom shader set should do it. http://playground.babylonjs.com/#Z1SIC#12 Quote Link to comment Share on other sites More sharing options...
JohnK Posted June 27, 2018 Share Posted June 27, 2018 How about this line2D function https://www.babylonjs-playground.com/#FA2H7X https://www.babylonjs-playground.com/#FA2H7X#1 from Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 27, 2018 Share Posted June 27, 2018 He did exactly what I was about to do with: http://playground.babylonjs.com/#Z1SIC#10 rabble rabble rabble... I hate it when people beat me to solutions... jk it saves work! JohnK 1 Quote Link to comment Share on other sites More sharing options...
JohnK Posted June 27, 2018 Share Posted June 27, 2018 It is also available in the docs http://doc.babylonjs.com/snippets/line2d Pryme8 1 Quote Link to comment Share on other sites More sharing options...
dbawel Posted June 28, 2018 Share Posted June 28, 2018 @Statics Good point... Why can't I change the line width in the scene below. I understand your frustration; although the babylon devs and contributors are doing their best to maintain a cohesive framework.. http://www.babylonjs-playground.com/#H7VAZR#1 DB Quote Link to comment Share on other sites More sharing options...
TimT77 Posted October 17, 2019 Share Posted October 17, 2019 (edited) On 6/27/2018 at 6:56 PM, JohnK said: How about this line2D function https://www.babylonjs-playground.com/#FA2H7X https://www.babylonjs-playground.com/#FA2H7X#1 from Hi all! I use the "line2d" function too to display line segments with the same thickness. A very awesome and useful function ?!!! In some situation, when the current line segment and previous line segment nearly overlap, the lines (better: the corners) will get "oversized". In my screenshots i move the red point in the arrow direction and the lines/corners will get "oversized". How can i avoid this? Best regards, Tim Edited October 17, 2019 by TimT77 Change second image to better display the problem Quote Link to comment Share on other sites More sharing options...
JohnK Posted October 18, 2019 Share Posted October 18, 2019 Hi You need to head over to the new forum https://forum.babylonjs.com/. This one is retained for reference purposes only. Quote Link to comment Share on other sites More sharing options...
TimT77 Posted October 22, 2019 Share Posted October 22, 2019 Hi all! I've fixed my problem (previous post) with setting the angle to "3.141". This creates always "rounded" corners. Greetings! Tim 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.