chicagobob123 Posted February 5, 2018 Share Posted February 5, 2018 Can I get the bounding box of a mesh and create a mesh from it apply material and colorize it with a semi transparent color? I have googled it and the information is a bit sparse. Quote Link to comment Share on other sites More sharing options...
JohnK Posted February 5, 2018 Share Posted February 5, 2018 Something like this? https://www.babylonjs-playground.com/#TZSWRR Wingnut and Arte 2 Quote Link to comment Share on other sites More sharing options...
chicagobob123 Posted February 5, 2018 Author Share Posted February 5, 2018 Thanks so much. I didn't know there was width height and depth that you could pass in. I just did something similar except I used scaling to make the box. https://www.babylonjs-playground.com/#QVIDL9#21 Wingnut 1 Quote Link to comment Share on other sites More sharing options...
chicagobob123 Posted February 5, 2018 Author Share Posted February 5, 2018 Just loose thoughts, this might be useful to a game.. You can use it to mark damage or even call it a shield or cloak of sometime. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted February 7, 2018 Share Posted February 7, 2018 Yep, that's right, CB. It is also a way of indicating that a mesh has been "selected" (chosen). All in all... a powerful/handy little feature. https://www.babylonjs-playground.com/#TZSWRR#2 We can keep talking, but you might want to mark thread as 'solved', cb. (thx) This new glowLayer stuff looks like an interesting post-process thing.... too. A way to show something is selected or has a force field. HighlightLayer works pretty good, too. I don't think either does "alpha blending" real well, though. Watch out for issues with using it on semi-transparent mesh. But other than that little thing, both of those "layers" things... work great. I like 'em. I have also used .emissiveColor to suddenly make a mesh "get bright", or start flashing on/off. Mesh "state" changing... mesh.isEngulfedInFlames = true; If you have a dark scene... just light-up the mesh in a bright spotlight... when it gets selected/chosen. Lots of possibilities. It sure is nice having an easy language like JS... be connected to a powerful 3D rendering engine, eh? What a playground! Etch-A-Sketch... eat your heart out. We got WAY MORE than two knobs... NOW. heh! We got us a Super-Sonic Etch-A-Sketch-from-hell, now. But still, nobody has "grown" a Fibonacci-infested JS-generated pine cone. What the heck, eh? Hardly anybody dynamically-generates pine cone and cauliflower stuff... with Fibonacci/Golden Mean/Phi numbers. Really, Fibonacci numbers (often called PHI - a ratio) show-up in a crapload of nature-things. SO MUCH SO, that some have claimed that it is the key to the secret of life on Earth... and consciousness. It is also very music-related (harmonies) (ours ears have Fibonacci shape, including the cochlea)... and "Fib" is the basis for heterodyning and other fun stuff. Ya see, there's an "energy vortex" just south of Minneapolis... and if I can get enough singers, with a high-powered PA system, to sing "the right harmony"... while standing at the center of that vortex... then... ...probably nothing will happen. But... Fibonacci numbers will be VERY involved... in that "nothing happened", definitely. (What a waste of a perfectly good comment, eh? *nod*) heh Quote Link to comment Share on other sites More sharing options...
chicagobob123 Posted February 7, 2018 Author Share Posted February 7, 2018 On 2/5/2018 at 11:02 AM, chicagobob123 said: I would mark solved but i dont know how to mark it complete Quote Link to comment Share on other sites More sharing options...
Vorion Posted February 7, 2018 Share Posted February 7, 2018 Just edit your first post in this thread, and add a solved tag, like the link @Wingnut posted suggests chicagobob123 1 Quote Link to comment Share on other sites More sharing options...
chicagobob123 Posted February 7, 2018 Author Share Posted February 7, 2018 Sorry eyes at night not as good as they once were. 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.