Closed chenleicrm closed 1 year ago
I wonna to know why the phone is oranged and how to disable
maldives_blue.zip the glb file is in the zip above
Hi, Can you confirm that you also don't see the screen with AMBIENT_INTENSITY? Can you send a screenshot of your model screen material within Blender?
If well defined, the phone screen should be emissive to work in real (AR) usage.
Hi, Can you confirm that you also don't see the screen with AMBIENT_INTENSITY? Can you send a screenshot of your model screen material within Blender?
here is the screenshot of the model screen and you can also see the glb file in maldives_blue.zip above
I can see the model screen but need to rotate the modal or put it on the desk not on the floor when i open the light estimate
If well defined, the phone screen should be emissive to work in real (AR) usage.
I just use the model view demo code and replace the model file
If well defined, the phone screen should be emissive to work in real (AR) usage.
I just use the model view demo code and replace the model file
I meant change the emissive from Blender. As we can see in your Blender screenshot, the phone screen doesn't seems to emit lights. So just like in real world, if your phone screen is "turned off" nothing will be "visible"
Is this model emiting light ?
If well defined, the phone screen should be emissive to work in real (AR) usage.
I just use the model view demo code and replace the model file
I meant change the emissive from Blender. As we can see in your Blender screenshot, the phone screen doesn't seems to emit lights. So just like in real world, if your phone screen is "turned off" nothing will be "visible"
but when i rotate the modal to the direction of light , i can see the phone screen...
Do you mean the phone screen is not emit light , so the screen is "turn off", when i rotate the model screen to the light . it can "turn on" ?
Is this model emiting light ?
Your model material is made of a single linear image texture so you have to modify it properties inside Blender if you want your screen to be lighter and emissive and keep the rest as a standard phone material.
This is your texture To explain you shortly what is happening, just imagine what would happen in real life if you printed the bellow image on a paper and paste it on something having the same shape as a phone. If your room is a even a little dark, you won't see it well because it won't have any reflections or the fake screen won't emit any light.
OK I will try this next week ,and I also want to know why the model is oranged when i disable the light estimate
Your model has a well defined material for the phone structure (metal) but not for the screen part:
Here you can see that you only have black Emission
Here you can see that you only have black
Emission
thanks for your patience
As you can see. Phone modal surface is black when I use REALISTIC or SPECTACULAR config And phone modal surface turns out to be oranged when I use DISABLED mode
Can you help to check the second picture. When i disable the light estimate. the phone model is oranged
This might be a FILMIC issue we solved on the today release 1.20.5. Please update your depency version, and post the same screenshot.
This might be a FILMIC issue we solved on the today release 1.20.5. Please update your depency version, and post the same screenshot.
here is the picture I update depency version to 1.20.5, It seems like no change, You can also use model above to check it
As you can see in the video above, phone surface turns to be black gradually. And the image is the normal state . I am curious about what happens in the video
I try many times, phone model surface is always show black only in the direction where i just place it on the plane. and show normal when i rotate the model to other direction
AMBIENT_INTENSITY
I can not see the screen in AMBIENT_INTENSITY
You have to modify a little bit your model.
Some properties in it may come from an .obj
or .fbx
import and has to be changed a little bit to make it completely glTF PBR 3D engine ready.
For exemple, here is how the metallic
and roughness
factors are made of inside your material:
Meaning roughness is extracted from the Green channel and Metalic from the Blue of the right image
You have 3 choices:
Image_1
image@grassydragon Do you remember how to disable lighting influence on an object?
Do you remember how to disable lighting influence on an object?
It can be done like that or using an RGB node as an input to Surface: https://docs.blender.org/manual/en/latest/addons/import_export/scene_gltf2.html?#exporting-a-shadeless-unlit-material
I was more thinking of a Filament way to do it.
yes I want to disable the lighting influence on model in code when I set light estimate DISABLED @ThomasGorisse @grassydragon
I change build dependencies to 1.18.10 , Both the phone surface and the DISABLE mode shows OK. Can this be any help.
any update now. cause our program is on emergency about the model effect @ThomasGorisse @grassydragon
Please consider sponsoring us if you need any urgent help. Because we already bring you precise answers and we also got our own "emergency" private remunerating things to do.
Hi I have become a sponsor via open collective whose name is lei. You can check it and now I wanna to know how to disable the lighting influence on model in code when I set light estimate DISABLED . Thanks to your genius work.
Thank you! We will devote some time to see how this can be done.
The yellow color comes from the default HDR environment as it is described in this issue: https://github.com/SceneView/sceneform-android/issues/322#issuecomment-1049192113
The solution is to find a more suitable environment or generate a pure white environment at runtime: https://github.com/google/filament/discussions/3483#discussion-2561539
Using an InderectLight
is the only way to set the ambient lighting in Filament.
@ThomasGorisse what is the best way to generate a pure white environment in your opinion?
Setting the environment indirect light to null and increasing the main light should do the job but you won't have any reflection and everything on the model should look a little flat:
sceneView.environment = sceneView.environement.apply {
indirectLight = null
skybox = null
}
Another solution would be to use a white standard studio HDR like this one: https://github.com/SceneView/sceneview-android/tree/main/samples/model-viewer/src/main/assets/environments
sceneView.environment.indirectLight = HDRLoader.loadEnvironment( context = requireContext(), hdrFileLocation = "environments/studio_small_09_2k.hdr", specularFilter = false ).indirectLight
https://user-images.githubusercontent.com/6597529/157545553-533cb4b2-d1d8-4e25-b557-403f8712bab0.mp4
Even if it should be possible to use the IndirectLight.Builder
to create a white environment with maybe some white texture reflection and irradiance, you could also simply open the previous .hdr with Gimp. Clear all to white and use it like mentioned before.
Once it looks ok for you, just generate the ktx and use the KTXLoader
instead of HDRLoader
and the final consumption result should not be so far from a programmatic way.
But one more time, this is not an environment issue but a wrong model material issue. A black phone metal material should not reflect its environment like this. It usually happens when trying to convert an fbx to Gltf without manually modifying the material nodes. A really better choice would be to use a Principled BSDF standard material model.
Thanks for your professional answer, Is there a java way to change the environment.indirectLight of the sceneView
Setting the environment indirect light to null and increasing the main light should do the job but you won't have any reflection and everything on the model should look a little flat
I've tried that and since the main light is a directional light the model is lit only from this direction and is black from the opposite direction since there is no ambient light.
Is there a java way to change the environment.indirectLight of the sceneView
Yes, the extension methods can be accessed from the [FileName]Kt
class and take the extended class instance as the first parameter.
Is there any demo code in java since I am new here @grassydragon @ThomasGorisse
Here are the required changes for the Java sample application to disable the light estimation and load the alternative environment. However, the model doesn't look good in this case, particularly, the reflections: https://photos.app.goo.gl/BckDnWogzjKwjmDz7
I'm not sure what is the problem because it neither appears with the default environment nor when I open the model and new environment in the glTF Sample Viewer:
sample-ar-model-viewer-java.txt
@chenleicrm Can you try opening the model in the Filament glTF sample viewer to see if the problem is related to the combination of Filament and your model?
I have try your demo code and phone surface shows OK in light estimate disable mode. genius work~ I will keep learning about this @grassydragon
I think its time to close this issue and thanks to your patience and professional explain @ThomasGorisse
Thanks for your financial contribution and the detailed issue report. Hope to see the SceneView logo inside your phone 3d model next time instead of "Spark" which may suggest that your app is using Spark AR 😄
I think SceneView logo will appear on our product surface if it pass our test in next one or two weeks 😄
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
As you can see. Phone modal surface is black when I use REALISTIC or SPECTACULAR config And phone modal surface turns out to be oranged when I use DISABLED mode