lesterhaus Posted April 23, 2016 Share Posted April 23, 2016 Hey everyone! Apparently I didn't quite understand how ribbons work, even after reading the extensive tutorials. I've set up a playground with a very basic ribbon made from 2 Vector3 arrays (base and heights) gave the whole thing a material and set a box next to it to further illustrate my problem. http://www.babylonjs-playground.com/#1HLWTQ#4 Since I'm not a 3D programming crack, could any of you explain what causes that weird lighting? Is this be a face- or vertex-normal problem? Does it happen because I build the ribbon the wrong way? Where did I go wrong? Cheers, Lesterhaus p.s.: Please forgive the weird xyz-coordinates used - I'm working on a demo where I send batches of drawcommands to babylon js for extrusion and just copy/pasted it into the playground for tests Quote Link to comment Share on other sites More sharing options...
iiceman Posted April 23, 2016 Share Posted April 23, 2016 Well, not sure if that's explanation enough, but if you convert your mesh to flat shaded, it looks like the cube: http://www.babylonjs-playground.com/#1HLWTQ#5 I think ribbons are basically intended for rounded surfaces so it starts of as ..well.. not flat shaded But as you can see, you can easily convert it. Does that help? lesterhaus 1 Quote Link to comment Share on other sites More sharing options...
lesterhaus Posted April 23, 2016 Author Share Posted April 23, 2016 Ah I see. Thanks a lot for the quick answer! So basically if I know that my ribbon will end up with a cubic or curve-less polygon shape I convert to flat shading. Well that's what you get if you put powerful tools like babylon js into 3D rendering newbie hands like mine iiceman and GameMonetize 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.