Skip to content
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

android ReflectionProbe bug #16003

Closed
whaqzhzd opened this issue Aug 17, 2023 · 12 comments
Closed

android ReflectionProbe bug #16003

whaqzhzd opened this issue Aug 17, 2023 · 12 comments
Assignees
Milestone

Comments

@whaqzhzd
Copy link

Cocos Creator version

3.8

System information

ANDROID

Issue description

In the Android environment, using the latest custom pipeline, a planar real-time reflection probe is placed in the scene and published to the Android platform. It can be seen that in the buildReflectionProbePass function, calling probe's renderArea will fail. On Android, the probe only has getRenderArea and does not have renderArea

Relevant error log output

runtime:
image

debug:
image

Steps to reproduce

Minimal reproduction project

No response

@whaqzhzd whaqzhzd added Bug Needs Triage Needs to be assigned by the team labels Aug 17, 2023
@whaqzhzd
Copy link
Author

whaqzhzd commented Aug 17, 2023

Similarly, the camera function of a similar reflection probe uses camera to acquire in web, while in Android it needs to use getCamera to acquire. The function call is also in buildReflectionProbePass

image

@whaqzhzd
Copy link
Author

And there are also several other bugs.

@whaqzhzd
Copy link
Author

It seems that planar reflection has never been tested on Android before

@whaqzhzd
Copy link
Author

To supplement, this seems to be native across platforms.

windows:
image

@xubing0906
Copy link
Contributor

There is indeed an issue with planar reflection under the custom pipeline, and we will fix it as soon as possible.

@jareguo jareguo removed the Needs Triage Needs to be assigned by the team label Aug 17, 2023
@whaqzhzd
Copy link
Author

whaqzhzd commented Aug 18, 2023

Let's discuss some other bugs related to planar reflection.

We know that after setting the camera for planar reflection in the editor, we can adjust the camera's Visibility to achieve the goal of which objects need to be reflected.
image

But the problem is that the implementation of planar reflection update will cause the parameters set in the editor to become meaningless.

reflection-probe-component The renderPlanarReflection call on line 738 will cause the Visibility set in the editor to be overridden.
The override implementation is on line 315. this._syncCameraParams(sourceCamera)

We should use the parameters of the reflection component itself, rather than the camera's. args

@jk20012001
Copy link
Contributor

ClearFlag and Visiblity should synchronous with Main Camera,these options should be removed from Refleciton Probe Component
#16115

@whaqzhzd
Copy link
Author

whaqzhzd commented Aug 28, 2023

ClearFlag and Visiblity should synchronous with Main Camera,these options should be removed from Refleciton Probe Component
#16115

Oh, really? Let me think about this scenario: What if the project requirement is to have partial reflection and partial non-reflection. If synchronizing the reflection camera with the main camera means we need a third camera to do this, then assuming Camera A is the main scene camera, and Camera B is the reflection camera created based on Camera A. Based on the early implementation, at this point we only need to modify the visibility etc to make it work. But with the new implementation, does it mean we need to create a camera with no actual meaning just to serve as the reflection main camera? This reflection main camera would need to maintain exactly the same transform as Camera A. And assign it for the reflection component to use. Isn't this a bit redundant?

@jk20012001
Copy link
Contributor

Synchronizing with the main camera is just to minimize settings, and this requirement you are talking about can be solved by removing bake to reflection probe from MeshRenderer. However, after discussion, it was decided to keep this visibility option, the default value is default, and it is no longer synchronized with the main camera

@whaqzhzd
Copy link
Author

Synchronizing with the main camera is just to minimize settings, and this requirement you are talking about can be solved by removing bake to reflection probe from MeshRenderer. However, after discussion, it was decided to keep this visibility option, the default value is default, and it is no longer synchronized with the main camera

OK, if it is implemented by modifying MeshRenderer, it seems much more troublesome than modifying the visibility of the reflection probe. For example, in the early stage of project production, prefabs were not used but copied and pasted directly in the scene, etc. or other lazy production methods.

@jk20012001
Copy link
Contributor

So the currently determined solution is to keep the visibility and take effect independently, no longer overridden by the main camera settings, which should be fixed in 3.8.1

@whaqzhzd
Copy link
Author

So the currently determined solution is to keep the visibility and take effect independently, no longer overridden by the main camera settings, which should be fixed in 3.8.1

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

5 participants