Jump to content

lighting colour and orientation problems in 3d shapes


zmahomedy
 Share

Recommended Posts

Hi Guys,

I am working with a custom model and I am attaching child meshes to it.

I am trying to rectify a problem that I am having when I add colour to the model.

I lose the 3d shape, the child meshes look flat and you cant differentiate between them

When I remove the colour in the material, in greyscale it looks fine.

see attached pictures for comparison.  Also Multi Material doesnt seem to be working as expected. 

The next issue I am having is the orientation of the "base modal". When I init the script

its rendering the base in an angle vs being upright, as per picture.  If I apply a transformation

to it, it does something funky to the rest of the world co-ord mapping and everything else breaks afterwards.

I am new to this and in 3d programming in general. Any insights to help me solve these 2 issues would be helpful.

My code can be found on

http://www.babylonjs-playground.com/#15O3MB#1

 

 

grey.jpg

colour.jpg

Link to comment
Share on other sites

Hi Z!

Well, I converted those 3 mesh to flat shaded.  Smooth shaded washes-out the facets, doesn't it?  *nod*.  I also turned on edges renderer for all 3.  Umm... I got the pivot point re-centered somewhat... sorta guessed at how far to translate it before I did the vertices bake.

http://www.babylonjs-playground.com/#15O3MB#4  

As far as the transform and multi-material issues... hopefully smarter people than I will comment soon.  Maybe you could better describe what you are trying to do with subMesh and subMaterials.

Oh yeah, and I turned-on a rotation for the 3 mesh.  Why?  I dunno.  :)  Maybe so I could watch the specular flashes coming from the mesh facets. 

I really didn't help with anything, but I had a good time with your playground, so far.  For some reason, the playground shows an error... on alternate RUN's.  Run once, error.  Run again, no error.  Rinse, repeat.  Not sure why that is happening.  hmm.

Link to comment
Share on other sites

  • 3 weeks later...

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...