Spankied Posted November 27, 2017 Share Posted November 27, 2017 Right now im creating a bunch of lines to imitate the shape of a box. Id rather use that vertex data to create an actual box. Any suggestions? Heres playground I'm working with.. http://www.babylonjs-playground.com/#XBGEQ#5 Quote Link to comment Share on other sites More sharing options...
Arte Posted November 27, 2017 Share Posted November 27, 2017 @Spankied This should help you Quote Link to comment Share on other sites More sharing options...
adam Posted November 27, 2017 Share Posted November 27, 2017 You could use the bounding box feature: https://www.babylonjs-playground.com/#BFM7EX edit: I think I misunderstood the question. Spankied 1 Quote Link to comment Share on other sites More sharing options...
Arte Posted November 27, 2017 Share Posted November 27, 2017 Just for fun: http://www.babylonjs-playground.com/#XBGEQ#8 All credit goes to @adam Spankied 1 Quote Link to comment Share on other sites More sharing options...
Spankied Posted November 27, 2017 Author Share Posted November 27, 2017 4 hours ago, Arte said: Just for fun: http://www.babylonjs-playground.com/#XBGEQ#8 All credit goes to @adam Interesting solution. Not really what I'm looking for. I'm hoping to feed vertex positions to something like extrudePolygon or box.vertexData, to create the box from that. Quote Link to comment Share on other sites More sharing options...
adam Posted November 27, 2017 Share Posted November 27, 2017 How about something like this? https://www.babylonjs-playground.com/#MD6I7G Sebavan 1 Quote Link to comment Share on other sites More sharing options...
Gijs Posted November 27, 2017 Share Posted November 27, 2017 38 minutes ago, Spankied said: Interesting solution. Not really what I'm looking for. I'm hoping to feed vertex positions to something like extrudePolygon or box.vertexData, to create the box from that. Extruding the bottom: http://www.babylonjs-playground.com/#XBGEQ#9 It's a bit hacky Spankied 1 Quote Link to comment Share on other sites More sharing options...
Spankied Posted November 27, 2017 Author Share Posted November 27, 2017 @Gijs @adam Ty both. Gijs 1 Quote Link to comment Share on other sites More sharing options...
Spankied Posted November 28, 2017 Author Share Posted November 28, 2017 does anyone know how indices work with vertex data. Playground to refer to http://www.babylonjs-playground.com/#1UHFAP I also considered using createRibbon. Anyone familiar with using this.. http://www.babylonjs-playground.com/#1UHFAP JackFalcon 1 Quote Link to comment Share on other sites More sharing options...
brianzinn Posted November 28, 2017 Share Posted November 28, 2017 33 minutes ago, Spankied said: does anyone know how indices work with vertex data. I figured out how the indices work on my own and then stumbled across this doc recently...https://doc.babylonjs.com/how_to/custom JackFalcon 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 28, 2017 Share Posted November 28, 2017 Why not just make a box and use the edge render? http://www.babylonjs-playground.com/#TYAHX#107 Arte 1 Quote Link to comment Share on other sites More sharing options...
jerome Posted November 28, 2017 Share Posted November 28, 2017 same with a simple LineSystem : https://www.babylonjs-playground.com/#TYAHX#108 Pryme8 1 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.