Jump to content

Lighting and OBJ


Sophie C
 Share

Recommended Posts

Sorry to revisit this topic again so soon, but I really wanted to clarify some things.

While perhaps the basic texture lightness is again, a possible issue, further testing has made me think that my files are not to blame here. Or at least, I'm turning to the forum to ask if that is indeed the case.

Below is a comparison of Blender's viewport (left) and Babylon sandbox (right) of the same model/texture. The blender version has a default hemi-light for better viewing purposes. We can ignore the specular highlight for now; I assume it's not part of the problem.

hey.png.deb4fd838e0977be1495d301e9b39fae.pngimg.png.95aff32b56900e3db32c70700df033a0.png

As is shown above, Babylon's lighting (I'm assuming what would be considered a normal intensity light) doesn't illuminate the object as well as blender. Compared to the default Babylon sphere, it's definitely at least the same shade whereas it should be pretty white, assuming the default Babylon sphere is grey. 

This results in a disparity between my expected Blender render and what happens in Babylon. Rather than brightening my lights accordingly (and rendering any Babylon generated objects into a white blob) I want to understand where the problem lies. This is just an example file; other models are showing the same result (even .babylon files).

Here are the model files:

4.obj

4.mtl

4.thumb.png.482769d1a61a6a55e880ace8514dda7c.png

Link to comment
Share on other sites

You don't have to compare Blender viewport and BabylonJS result, it's not the same 3D engine behind.

All you have to do here is either:

  • baking your scene if you want a beautiful static lighting and then tweak your materials inside BJS,
  • or, if you only want dynamic lighting, you can prepare your scene inside blender (scene ambienColor, material diffuceColor & ambientColor, etc) but you always have to tweak inside BJS so as to get desired result, like every 3D engine :)
Link to comment
Share on other sites

Thank you for replying! 

I am doing dynamic lighting, so unfortunately I can't do anything about baking the scene. Could I ask for some tips to brighten the texture up, then? Playing with the diffuseColor and parameters seem to have little effect on the problem at hand, so I am at a slight loss of what to tweak.

Ideally I had a scene that was lit quite well in three.js; I'd like to replicate that effect here. What are the differences between three.js and Babylon lighting/texture wise?

Link to comment
Share on other sites

Reporting back on the results for your ease of mind: I believe the problem is resolved! Thank you all for the guidance, it seems I needed to read up much more on lights than I previously thought. The main problem was a misunderstanding on what the material settings meant; I guess I've been spoiled by various presets. Nevertheless, the experience was very educational. 

Through various trial and error tweaking sessions my scene is finally lit well enough for my standards! Thank you so much for the help!! 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...