JCPalmer Posted October 13, 2016 Share Posted October 13, 2016 I have been adding a temporary HighlightLayer when some meshes are displayed. There is also a very fast morph going on to expand mesh from origin to full size. The HighLightLayer stays on for an additional 100 millis. It really pops! I did not see any reason to dispose of the HighlightLayer. Another mesh could be instanced & display later also with that 'Entrance' type. The use case of a permanent HighlightLayer would probably be more common anyway. I began rebuilding a scene I had with a Dialog displayed using an ortho camera. When the character mesh is popping, you can briefly see part of the dialog where the mesh is. The rest of the time the area is black when the layer doesn't even have any meshes. I switched my entrance type to another with a different animation, and you get what I have below (still working on the eyes). I can probably get around this by either : nuking layer when done & delaying the dialog till done, not using that entrance type when there is a dialog. but the common use case of a permanent HighLightLayer could not. This area bordered in yellow is all black with the layer. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 13, 2016 Share Posted October 13, 2016 Hello, Is it possible to create a playground for it ? I have to admit I do not understand totally the issue :-) it is only 3 PM so still to early in the day for my brain to start. Thans Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted October 14, 2016 Author Share Posted October 14, 2016 I can, but setting up ortho camera, layermasks, & viewports is not something done by hand often. Will transcribe a simple example. Had another thought, 3D rigs could also have problems. They are a 1 line change to test. Was right they look weird, but in a different way. Probably be mid-day Eastern before I have one with ortho. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted October 14, 2016 Author Share Posted October 14, 2016 Ok done . Just un comment out the HighlightLayer. Did not get plane position perfect, which is tricky when using a viewport. But when there is erroneous glow, the mesh shows, but it is black elsewhere Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 15, 2016 Share Posted October 15, 2016 Ok got it, thx, I ll see what I can do, probably a layer or camera attached to the highlight layer to ensure it only renders when requested, it is currently part of the whole scene. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 15, 2016 Share Posted October 15, 2016 PR is in for the fix: https://github.com/BabylonJS/Babylon.js/pull/1413 It should work nicely if you precise on the highlightlayer the layermask of the non orthocamera. Quote Link to comment Share on other sites More sharing options...
meteoritool Posted October 15, 2016 Share Posted October 15, 2016 Off-topic question : Just curious to know, how long does it take for the javascript to be compiled from truescript on Github ? Can't wait to try the new function >_< Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 15, 2016 Share Posted October 15, 2016 Change the fix in a last PR to ensure I can add other features later. Basically precise the camera the highlights are attached to in the constructor: var hl1 = new BABYLON.HighlightLayer("hl1", scene, { camera: camera }); https://github.com/BabylonJS/Babylon.js/pull/1419 The changes should be allin and in the playground monday. @meteoritool The project is build each day by DK and pushed to the playground at the same time. CU, meteoritool 1 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 16, 2016 Share Posted October 16, 2016 Here it is: http://www.babylonjs-playground.com/#CDHKK#7 JCPalmer 1 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted October 17, 2016 Author Share Posted October 17, 2016 Thanks, still the problem with VR cameras, which I also highlighted earlier. Just for reference, A 3D camera is a camera with 2 sub-cameras. After each sub camera renders, the parent camera produces the final output using postprocesses & sometimes also viewports. I am not sure that you / HighlightLayer is the one that needs to do all the fixing though. I recently made it so you can also also run early post processes along with a 3D rig. Still problems with people who want to run very late post processes. These rigs can sort of break things, but as soon as someone thinks to try this in VR, it will get brought up again. Fortunately, you do not have to worry about orthographic cameras & 3D rigs at the same time. I thought about doing something for them to play together, but since I use the Dialog extension for my GUI, I can easily just put the dialog in the scene in billboard mode. Think it might be a good to add a setter for the camera, if it is simple. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 17, 2016 Share Posted October 17, 2016 Rhoooooooo, Missed this one, I ll try to look at it tonight. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 18, 2016 Share Posted October 18, 2016 I ll fix it this week end due to a busy work week... sorry for the delay, do not hesitate to shout if you need it earlier. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 25, 2016 Share Posted October 25, 2016 This PR should do it: https://github.com/BabylonJS/Babylon.js/pull/1462 This will be in the pg probably tomorrow evening. There is still a scale issue (taller than large for the highlight). This will be fixed by the resize issue, I kept the best for the end. CU, Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 25, 2016 Share Posted October 25, 2016 PG updated 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.