Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to render back faces only?

I am trying to build a material that will render only the back faces of an object.

I've turned on "Two sided" to make sure that back faces are rendered, "masked" blend mode so that I can selectively choose which parts of the object to render. Finally I've took the "twoSidedSign" node, inverted it, and clamped between 0 and 1. My thought was since "twosidedsign" outputs -1 whenever a back face is rendering, and 1 whichever a front face is rendering, this would mask only front faces.

Instead, the entire object doesn't render. I've attached a screenshot of the rendering. Any ideas>

alt text

Product Version: Not Selected
more ▼

asked Apr 04 '14 at 03:30 PM in Rendering

avatar image

48 9 14 15

avatar image natemartinsf Apr 05 '14 at 10:43 PM

Perhaps I'm misunderstanding how the TwoSidedSign node works? Is there any way to visualize what the output of each node is for a particular pixel?

Is there a better way to render only the back faces of an object rather than making a custom material?

avatar image GraphicsMode May 18 '14 at 05:14 AM

What happens if you turn two sided off in the main node?

If everything is two sided and you only want to render the inverse of the visible faces then it will render nothing? Though you may be right about it not being how that node works.

Out of curiosity, why is this being done dynamically? Normally I'd just flip faces in the modelling program to get shells around things.

avatar image natemartinsf May 22 '14 at 05:06 PM

I'm working on implementing a way to move 3d objects around using the mouse pointer (for assembling machines, etc, in-game).

I'm trying to implement the algorithm in this paper: http://pdf.aminer.org/000/236/040/moving_objects_with_d_input_devices_in_cad_systems_and.pdf

The algorithm finds the closest occluded point behind the object the user is trying to move. The method they suggest is to render the depth map of all objects except the target object, then render the depth map of the back faces of the target object. If you compare the two depth maps, you can find the closest occluded point.

There very well might be better ways to achieve this, but I wanted to see if I could do the method in the paper.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey natemartinsf -

Try doing a LERP between 0 and 1 (A = 0 and B = 1) while using the Two Sided Sign node as your Alpha.

-Eric Ketchum

more ▼

answered May 18 '14 at 07:13 PM

avatar image

Lovecraft_K ♦♦ STAFF
36.7k 702 260 735

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question