Cobalt Posted October 21, 2016 Share Posted October 21, 2016 Hi everyone. Developing for few month on babylon now, I'm currently facing an issue. I wish i could display edges of a mesh through an other one. For example, i'm a super hooman and wanna see meshes through a wall, just by their edges. I don't want to make a transparent wall by the way, this is not the purpose for multiple reasons. It appears to me that the edges rendering is done by the mesh (by its AbstractMesh inheritance) itself and block the way i want to simulate this behavior. I'm a little bit confused, even on my method and the way to do it, have you ever facing this behavior and how did you make it ? Thanks. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted October 22, 2016 Share Posted October 22, 2016 Hi Cobalt, welcome to the forum. What you ask... is a strong challenge. First, let me show you mesh.showBoundingBox http://www.babylonjs-playground.com/#14VWOV#6 You can see these bounding boxes through a wall (somewhat "x-ray vision"), but this is probably not sufficient for your needs. Another idea. BJS has a feature called a RenderTargetTexture (rtt)... and it can be used to display the image from any camera... upon the material of any mesh in the scene. http://www.babylonjs-playground.com/#1WROZH#6 That scene uses 4 cameras and 4 renderTargetTextures (rtt)... displayed (via material textures) on 4 planes that are parented to the camera. Let's try our first scene... with ONE rtt... displayed on a plane... positioned against a wall. http://www.babylonjs-playground.com/#14VWOV#8 Now we can see-through the wall... sort-of. Note: RTT's have limited/no anti-aliasing available. These are some ideas. Not very good ideas... but still ideas. Possibly, a custom shader could do this, too... but I am not a shader expert. Hopefully, smarter people than I... will comment soon. X-ray vision is advanced tech. Cobalt 1 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 22, 2016 Share Posted October 22, 2016 http://www.babylonjs-playground.com/#JB4YW#15 Cobalt and Wingnut 2 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted October 22, 2016 Share Posted October 22, 2016 NICE, Naz! You're a God! Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 22, 2016 Share Posted October 22, 2016 actually your god in here Quote Link to comment Share on other sites More sharing options...
Cobalt Posted October 24, 2016 Author Share Posted October 24, 2016 Thank you both for your answer, I'm currently trying to implement NasimiAsl's one and i'm facing issues. My meshes are animated and even when i try to animate the one on your playground it does not work anymore. So i've looked a bit deeper in the source code of babylonX.ShaderBuilder extension and saw those IMap options. I've tried few things on it but nothing succeed. The code is a bit complex to me. Have you ever try that before ? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted October 24, 2016 Share Posted October 24, 2016 Hi again, C. Do you know how to "ping" people inside a post? We need to ping NasimiAsl... see if he knows how to activate his idea... but still be ok for animated mesh. First, type @ ... then we follow it with a 'n' (@n) At this point, a panel should open, showing a list of forum-user names. Keep typing... @nas Now you should see NasimiAsl's name in the list. Choose it, and his name will be added to the post... colored. This also triggers the forum's notification system... if NasimiAsl has it turned-on for himself. He will know that you are requesting him to read your post. Now I will ping my good aquaintance far away... "Naz" Hey @NasimiAsl, do you have a moment to tell us about using animated mesh with your x-ray vision method? Thanks! I will ping you, too, Cobalt... so you can experience a notification. Hi @Cobalt! You probably got one when I replied to your thread, too... so you know them already. Sorry for teaching if you already know how to do pings. Quote Link to comment Share on other sites More sharing options...
Cobalt Posted October 24, 2016 Author Share Posted October 24, 2016 Hey @Wingnut !! I wasn't aware about it !! Thanks for the tip, awesome feature indeed !! Wingnut 1 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 24, 2016 Share Posted October 24, 2016 hi i think if i have one PG with animated in the room(or box) i can make it and explain what i do too. so @Cobalt , ( @Wingnut you can help for load obj in PG for him ) make it for me i do my best for that thanks again Quote Link to comment Share on other sites More sharing options...
Cobalt Posted October 24, 2016 Author Share Posted October 24, 2016 @NasimiAsl @Wingnut I made it work, i will send you a demo soon ! Edit: As promised ... http://www.babylonjs-playground.com/#1HT5NJ#1 NasimiAsl, Quadear and Wingnut 3 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.