viromedia / virocore

ViroCore cross-platform AR/VR renderer
MIT License
364 stars 108 forks source link

Rendering issue in ViroView Scene #274

Open Sweenall opened 5 years ago

Sweenall commented 5 years ago

Environment

  1. OS: Mac 10.14.4
  2. Version: ViroCore version 1.13.0
  3. Device(s): Samsung Galaxy S7, Honor 8X
  4. Android studio 3.3.1

Description

Our 3D rendered models appear to have holes and we are unable to render semi-transparent textures in ViroScene. This issue is not happening in virocore AR Scene. Please refer to sceenshots below. Are we missing something in our code?

Sample code

final Object3D obj3D = new Object3D(); ViroContext con = mViroView.getViroContext(); obj3D.setRenderingOrder(0); obj3D.loadModel(con, Uri.parse("file:///android_asset/Body/body.obj"),Object3D.Type.OBJ,new AsyncObject3DListener() { @Override public void onObject3DLoaded(Object3D object3D, Object3D.Type type) {

            List<Material> materials = object3D.getMaterials();
            for (Material mat:materials) {
                mat.getDiffuseTexture().setWrapS(Texture.WrapMode.REPEAT);
                mat.getDiffuseTexture().setWrapT(Texture.WrapMode.REPEAT);
                mat.setLightingModel(Material.LightingModel.PHYSICALLY_BASED);
            }

            mViroView.getScene().getRootNode().addChildNode(object3D);

        }

        @Override
        public void onObject3DFailed(String s) {

        }
    });

img1 img2 img3

Sweenall commented 5 years ago

Please note, above screenshots were taken from Honor 8X phone (Android version 9)

dthian commented 5 years ago

Hi @Sweenall, thanks for reaching out, apologies for the delay.

Can you try the following below and see if the issue still persists:

  1. Turning off just Bloom (if enabled)
  2. Turning off HDR.

Much thanks!