iamnick 2 Report post Posted December 4, 2018 I've been trying to combine two cameras together using a scissor rect function for Unity that I tried to repurpose for Babylon, but I can't seem to get it working. Could someone look at it and tell me what I'm doing wrong? Perhaps there's a better way of doing this inside of Babylon that I'm unaware of? The working Unity script: https://answers.unity.com/questions/1112309/screen-is-2-cameras-with-each-different-properties.html#answer-1112586 The not working playground: https://playground.babylonjs.com/#JJYFI8 The implementation inside of Unity. The cameras both have different clear colors. Quote Share this post Link to post Share on other sites
JohnK 991 Report post Posted December 4, 2018 In this PG https://www.babylonjs-playground.com/#MXCRPS#4 there are two different scenes in two different viewports. If you need to share some meshes with different properties in each scene there is still plenty of work to do. Not entirely clear about your use case. Multi-scenes documentation Quote Share this post Link to post Share on other sites
iamnick 2 Report post Posted December 4, 2018 @JohnK I still want to use the same scene between both cameras. What i need is have 2 cameras that basically halve the view frustrum. So when using a viewport rect, it resizes the camera view to fill the rect whereas i need to use a scissor rect to instead crop the viewport so that it's like im still seeing it in the regular viewport size but only the area I defined in the rect. The scissor rect is jist cropping the viewport. The included screenshot is a working version of a scissor rect that I'd like to port to Babylon. Quote Share this post Link to post Share on other sites
JohnK 991 Report post Posted December 4, 2018 Sorry I still do not understand need to wait until someone more skilled or experienced comes along. Quote Share this post Link to post Share on other sites
Deltakosh 4315 Report post Posted December 4, 2018 Let me show you how to use scissor testing for that 1 NasimiAsl reacted to this Quote Share this post Link to post Share on other sites
Deltakosh 4315 Report post Posted December 4, 2018 Here we are: https://playground.babylonjs.com/#JJYFI8#1 3 1 JohnK, NasimiAsl, jerome and 1 other reacted to this Quote Share this post Link to post Share on other sites
NasimiAsl 1131 Report post Posted December 4, 2018 sorry for ask i don't understand where that used Quote Share this post Link to post Share on other sites
JohnK 991 Report post Posted December 4, 2018 13 minutes ago, NasimiAsl said: sorry for ask i don't understand where that used Nor do I ! Well done to @Deltakosh for doing what was wanted but other than two different colors where would you use it? Quote Share this post Link to post Share on other sites
iamnick 2 Report post Posted December 4, 2018 @Deltakosh I love it!!! With scissor tests implemented, I think we can officially say Babylon is finally complete? 1 Deltakosh reacted to this Quote Share this post Link to post Share on other sites
iamnick 2 Report post Posted December 4, 2018 @Deltakosh Would you happen to know why shadows appear broken when using this feature? https://playground.babylonjs.com/#JJYFI8#2 Just noticed that if you change the shadowGenerator texture size to 256, the black box goes away completely. Quote Share this post Link to post Share on other sites
Deltakosh 4315 Report post Posted December 5, 2018 Here is your fix: https://playground.babylonjs.com/#JJYFI8#3 Quote Share this post Link to post Share on other sites