Jump to content

Backface lighting


CodingMadeEasy
 Share

Recommended Posts

I'm trying to get lighting to work on the backface of a mesh, but it doesn't work. After reading through the lighting tutorial, it seems like it's not possible due to the normals. I was wondering if there was any trick I could use in order to get light to reflect off the opposite sides of a mesh. 

Link to comment
Share on other sites

Hello
im no fully understand what you are trying to achieve. 
if i lean back for a secound and think about back and front faces,
backfaces are normaly (unseen, skipped) in graphic engines to get more resourceses for stuff that matters - what is visibel for the user, the frontfaces. 

If you want to do in the hard coding way you have to duplicate and flip the faces (from my logic point of view)
this can be done by babylon - easy, its made for this.

here is a link, i found using a popular search enige, for blender
http://www.katsbits.com/tutorials/blender/double-sided-faces-different-materials.php
unity code
http://answers.unity3d.com/questions/280741/how-make-visible-the-back-face-of-a-mesh.html
 

Link to comment
Share on other sites

In the the old days of fixed function OpenGL you could enable two sided lighting ( glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE) ).
If you want to have two sided lighting now, you have to duplicate your faces and change the face-winding and normal of the duplicates.

Link to comment
Share on other sites

You can do the tips that Nobroski linked, but i don't like this, due to overlapping faces. it's much more simple if you just model faces that you want.

If you want to set a thickness to a plane, in blender apply a solidify modifier, in 3dsmax apply a shell modifier.

Link to comment
Share on other sites

Thank you all for the help. It's greatly appreciated! :).

 

Edit:  One more question. I've attempted to apply the method of duplication then flipping the faces. I used the mesh.clone method to do so, but it seems as though the vertex data is shared and therefore when mesh.flipFaces is called, it flips the faces of the source mesh as well. Is there a way to do a deep copy of a mesh?

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