New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
integrating the aframe multi camera with 3DStreet #2
Comments
The specific error appears to be related to the cubemap for the sky; for short-term testing you could try removing the sky cubemap texture and see if that works |
It's not obvious to me what the problem his here. Following @kfarr's suggestion about the cubemap, I tried adding that to one of the examples, and it seems to work OK without errors: For multi-camera to work, we override the A-Frame render() call. From the stack trace, my guess is that the A-Frame render call is being used to prepare CubeMap textures in some way, that's invoking the multi-camera override verson of render() and somehow that's causing recursion, leading to the "Maximum call stack exceeded" error. But from my test it looks like something more than just adding a cubemap is needed to create this problem, and I'm not sure yet what. I'm going to try cloning your 3dstreet repo and see if I can see what's going on there by running that locally. As an aside, if you are't using the specific functions (and I don't think you are), there's no need to include the viewpoint-selector.js and mirror.js files in your HTML. |
OK, I'm not sure how to reproduce the problem with 3dstreet. I cloned the repo, switched to the new-coat-of-paint2.0 branch, and viewed index.html. The multi-camera function seems to work. I checked the console logs and there are a few errors, but not the specific error you mentioned above (and the errors that do exist don't look to be related to multi-camera). Can you help me understand how you reproduce this? Based on the stack trace, I have some idea what might be going on (I'll add another comment), but it will be hard to progres without a way to reproduce the problem. |
In terms of what is going on (based on the stack trace).
There's probably a fairly simple fix. In the add-render-call system, we should check the scene and camera, and only invoke the configured additional render calls if the scene and camera values match the values we expect (a little care needed to define "the values we expect" appropriately for all the use cases of multi-camera, but I'm sure that's a tractable problem). I'm happy to try to code a fix for this, but it would be extremely useful to have a repro scenario to test out a fix with. Do you have any idea what in 3dstreet is triggering the generation of the PMREM, and why that's not happening in the latest code on the new-coat-of-paint2.0 branch? |
Based on the above understanding, the following fix should hopefully work: ("the values we expect" turned out to be simple. aframe-multi-camera doesn't use recursion in its rendering - the sub-renders always directly invoke the original WebGLRenderer render function. "Infinite tunnel" effects aren't generated through recursion, but in fact build up frame over frame. Net of that is that the add-render-call system should only act when rendering the main scene with the main camera). |
@srothst1 if you can confirm the fix worked for you I'll merge it into Or if it doesn't work, I'm happy to take another look. |
I merged this fix, so I believe this should be solved now. |
Hi @diarmidmackenzie!
I have had a lot of fun experimenting with your
aframe-multi-camera
tool. I'm currently working to integrate this tool into the next version of our 3DStreet viewer. I am working out of thenew-coat-of-paint-2.0
branch in the 3DStreet repository:Here are a few important parts of my implementation so far:
I am importing your code via. CDN in the
head
of myHTML
file.I am also adding divs with ids
viewport1
,viewport2
, etc. to a toolbar that is located in the top part of the page.Finally, I am adding a set of second cameras to my
a-scene
While I think that I am heading in the right direction, I am getting an error that crashes my application
Any suggestions on how to resolve this issue?
cc @kfarr for context
The text was updated successfully, but these errors were encountered: