Search code examples
arkit3d-modelling

Problems rendering a ceiling light with ARKit


I've been trying to render this model in ARKit: https://free3d.com/3d-model/traditional-ceiling-light-485.html. I have OBJ/MTL files for both the on and off version of the light. When I render them in Blender, they look like this:

Blender rendering

When I drop them into my ARKit test app, however, they look like this:

ARKit rendering

In Blender, you can clearly see that the "on" version of the light is kind of glowing whereas in ARKit both models look exactly the same. I'm guessing that the MTL file contains something that ARKit does not support. The MTL on the "on" version is as follows:

# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 19.03.2018 16:33:20

newmtl Traditional_Ceiling_Light_Metal
    Ns 100.000000
    Ni 15.000000
    d 1.000000
    Tr 0.000000
    Tf 1.000000 1.000000 1.000000 
    illum 2
    Ka 0.588000 0.588000 0.588000
    Kd 0.500000 0.500000 0.500000
    Ks 0.000000 0.000000 0.000000
    Ke 0.000000 0.000000 0.000000
    map_Ka Traditional_Ceiling_Light_Visual_Diffuse.png
    map_Kd Traditional_Ceiling_Light_Visual_Diffuse.png
    map_Ks Traditional_Ceiling_Light_Visual_Specular.png
    map_bump Traditional_Ceiling_Light_Visual_Normal.png
    bump Traditional_Ceiling_Light_Visual_Normal.png

newmtl Traditional_Ceiling_Light_Glass
    Ns 100.000000
    Ni 1.600000
    d 1.000000
    Tr 0.000000
    Tf 1.000000 1.000000 1.000000 
    illum 2
    Ka 0.588000 0.588000 0.588000
    Kd 0.500000 0.500000 0.500000
    Ks 0.000000 0.000000 0.000000
    Ke 7.500000 7.500000 7.500000
    map_Ka Traditional_Ceiling_Light_Visual_Diffuse.png
    map_Kd Traditional_Ceiling_Light_Visual_Diffuse.png
    map_Ks Traditional_Ceiling_Light_Visual_Specular.png
    map_Ke Traditional_Ceiling_Light_Visual_Emissive.png
    map_bump Traditional_Ceiling_Light_Visual_Normal.png
    bump Traditional_Ceiling_Light_Visual_Normal.png

newmtl Traditional_Ceiling_Light
    Ns 100.000000
    Ni 1.600000
    d 1.000000
    Tr 0.000000
    Tf 1.000000 1.000000 1.000000 
    illum 2
    Ka 0.588000 0.588000 0.588000
    Kd 0.500000 0.500000 0.500000
    Ks 0.000000 0.000000 0.000000
    Ke 7.500000 7.500000 7.500000
    map_Ka Traditional_Ceiling_Light_Visual_Diffuse.png
    map_Kd Traditional_Ceiling_Light_Visual_Diffuse.png
    map_Ks Traditional_Ceiling_Light_Visual_Specular.png
    map_Ke Traditional_Ceiling_Light_Visual_Emissive.png
    map_bump Traditional_Ceiling_Light_Visual_Normal.png
    bump Traditional_Ceiling_Light_Visual_Normal.png

Is it simply the case that ARKit can't render this model properly?


Solution

  • Looks like there is no light in your scene (or lighting environment) but it's hard to tell from your picture.

    Make sure both assets have PBR materials and to get the best results, go through every single one of them. Pay close attention to the emission property, as obj files usually have them on white/clear grey. this is what will make the difference between the 2 objects. In fact, you only need to change the emissive property for 1 material to go from OFF to ON.

    physically based rendering materials