Question about light illumination of meshes imported from blender by blender exporter plugin

Hello,

I’m trying to create a simple scene where there’s a light simulating a sun (it’s not hemispheric since I want certain objects to cast shadows), along with some point lights created in the place of meshes with emissive materials. Everything looks somewhat ok, however I’ve noticed that the house I’ve made in blender reacts very weakly with lighting compared to simple spheres with standard materials. The example what I mean below:

Playground link here: Babylon.js Playground

My blender file is under this link: Dropbox - pagoda01.blend - Simplify your life

I’m fairly sure I did something wrong with materials or lightning setup. I checked my normals and they all are correct. I tried to find some more information about this issue but I could not find any information either in documentation or on the forum.

Hi sarpt0,

I asked @PatrickRyan to take a look, and he said the reason it looks inconsistent is because your pagoda materials have their specular and diffuse colors set to gray while your ground’s colors are set to white. Take a look at this (modified on lines 28 and 29): https://playground.babylonjs.com/#EYT71U#1.

If you can, Patrick recommends moving toward using PBR materials; they’ll let you do all the things you’re currently doing, but will also allow other cool effects like IBL. He also mentioned that, if you want to be able to control how your ground looks from within your modeling software, one useful trick is to just create a small mesh in a place that can’t be seen which contains the material you want on the ground–sort of like a carpet patch. Then, when you load the model into your scene, you can just grab the material off that patch and be already set up for success. :slight_smile:

1 Like

Hi, Thank you for quick and comprehensive reply.

Seems like your proposed changes indeed make lights less jarring on the ground. It clears up the behavior of lights and speculars for me, as I’m fairly new to all the concepts.

I have one more question - I tried setting black specular and grey diffuse to spheres (my logic being they should be less susceptible to light that way as it did to the ground) to further make them less lit. I also tried to decrease intensity of the point lights. However, they still seem to be lit quite more than pagoda despite the relative distance of them from the point lights. Screen and playground below:

https://playground.babylonjs.com/#EYT71U#3

I’m not sure if it’s the correct behavior (maybe to me it looks just a bit weird ;)) or is there another property of material that can influence this? I see there is a property FALLOFF for light and by default it uses standardMaterial fall off. My guess is that pagoda material imported from .babylon has different fall off specified, but is that possible to check?

The 6.0 exporter for Blender 2.80 has a toggle to either export as PBR or STD materials at the world level. Also, if exporting as PBR, there is also custom export intensity property for lights:
pbr_lighting

There are other properties which are mapped from the std Blender light properties, but there are no docs for this version of exporter yet. Check this topic, or change log for now.

1 Like

Hi JCPalmer,

I did not use blender 2.80 and exporter 6.0 so I will try that when creating and exporting lights, right after I will get the basic understanding of PBR since right now I still struggle with normal materials.

Seems like my issue is not a real issue - the angle of lights and and material diffuse and specular play a huge role in how everything is lit - basically the angle was to blame and it’s not an issue with lights intensity. A simple debug when giving the same parameters to submaterials of pagoda’s multimaterial and moving the lights on x axis reveal that model and materials are correctly handled.

I think that I now have firmer grasp of how the lightning system works. Thanks for help.

Forgot to say, blender 2.80 works poor for older version Blend files. Create a new scene, & File->Append the objects from old scene, but do not copy old lights. Recreate with new ones.