Jump to content

No colors and light in editor


Recommended Posts

Hi Guys!

    Myjestic... in the editor, try adding a hemispheric light to the scene.  Then the scene will light-up. 

But, tops are dark, and bottoms are bright.  So we need to re-direction the new hemi light.

SO... if you want to set your newly-added Hemispheric Light direction in a better way...

1.  Choose "new Hemispheric Light" from Scene -> alaman_scene list... at bottom of long list on right side of editor.

2.  Now choose "Light" tab on left panel area.

3.  Set Direction x = 0, y = 1, z = 0  (aim light towards sky, so it can reflect-back properly)

4.  Optional:  Set Ground Color to r: 0.5  g: 0.5  b: 0.5;       (A nice gray... if wanted - to light-up the bottoms a bit.  )

untitled-scene.babylon has no lights within it. 

Other types of lights could be added, too... but require a bit more work.  Point lights must be positioned properly, directional lights must be more-accurately direction-set, and and spot lights need precise positioning and direction-setting.  The hemispheric light is somewhat easier, although we still needed to set its direction and ground color.  It would be nice if the editor set hemi light direction to 0, 1, 0, and ground color to 0.5, 0.5, 0.5 ... automatically, when hemi light is added.   At least the hemi light intensity was NOT set to 0, by default, in the editor.  :)

Luaacro, I hope I didn't ruin your question-answering fun.  :)

Hope this helps.  Talk soon. 

Link to comment
Share on other sites

Oops, I forgot about the colors issue. 

Here's some data from the .babylon file... which I viewed via loading it into an online JSON viewer.

Default.003 might be a tiny bit green, but generally, things look a little gray... and black. I think you need to "power-up" those colors a bit.  For green... 0, 1, 0... or if you want to get crazy...  0, 4, 0  (but that's over-saturating a bit... still fun). 

materials: [
        name: "untitled_scene.02___Default.004",
        diffuse: [ 0.251, 0.1686, 0.0314 ],
        name: "untitled_scene.02___Default.003",
        diffuse: [ 0.2275, 0.502, 0.1765 ],
        name: "untitled_scene.02___Default.002",
        diffuse: [ 0.9059, 0.9059, 0.9059 ],
        name: "untitled_scene.02___Default.001",
        diffuse: [ 0.2157, 0.2157, 0.2157 ],
        name: "untitled_scene.02___Default",
        diffuse: [ 0.2392, 0.6902, 0.5804 ],
        name: "untitled_scene.02___Default_Slot__6",
        name: "untitled_scene.02___Default_Slot__7",
        name: "untitled_scene.02___Default_Slot__8",
        name: "untitled_scene.02___Default_Slot__9",
        name: "untitled_scene.02___Default_Slot__10",
           (6-10 are all set diffuseColor black)
Link to comment
Share on other sites

Hey Wingnut,

thanks for your help. I tried with the data you wrote and what I see in the debug layer. The only difference between sandbox and editor is the light.

If I add the light in the editor I see the shape of my mesh, but colors are still missing. In sandbox everything is colored. I will insert the mesh in my game and add a light source, hopefully the colors are there.


Link to comment
Share on other sites

Yep, adding (or including) a light... in the editor... seems to be required. 

The sandbox apparently adds a light FOR us.

I added a pointlight on your scene (with the editor)... it worked.  But, no colors.

I chose alaman -> Sub-Meshes -> untitled_scene.02___Default.003...  in the right-side list.  Then I chose Std Material tab on left side... and Diffuse Color showed 1, 1, 1.  (it's not supposed to be that value).   

ALL of the materials... are set 1, 1, 1, in the editor... for your scene.  Strange.

SO, yes, I think the editor has broken material diffuse colors.  Good catch, Myjestic! 

Luaacro will probably visit soon.  I should have checked this before I sent my last email... sorry.  It was my first time using the editor.

Link to comment
Share on other sites

Ok found the issue!

The issue came from a conflict (as information for @Deltakosh):

- In materials, all "diffuseColor" members were serialized as "diffuse".

- In the custom material builder of the editor, the "diffuseColor" member was serialized as "diffuseColor" which created a conflict

I'm updating the editor right now!

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.

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.


  • Recently Browsing   0 members

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