Jump to content

Culling pixels


Recommended Posts

When they say they are using an ellipsoid to cull pixels, what they mean is they are giving the shader an equation for that shape and discarding pixels in a mathematic test that checks if their position is inside the volume. So it's perfectly possible without interfering with the rest of the rendering pipeline.

 

The gore in L4D2 is pretty extreme, although I love the game. ;)

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

When they say they are using an ellipsoid to cull pixels, what they mean is they are giving the shader an equation for that shape and discarding pixels in a mathematic test that checks if their position is inside the volume.

 

So to accomplish this, modify a shader, then update a material object, applied to a mesh object?

 

The gore in L4D2 is pretty extreme...

 

Haha, yes. It's an awesome game.

Link to comment
Share on other sites

Okay, I think what they are doing, is they have wounds that are modeled on the character specially. This is a lot of work, and the wounds always end up looking the same, but it can work. Their problem was they didn't want the wounds to just sit on top of the character like a bad make-up job. They wanted the characters to actually have gaping holes. So they modeled the wound to go inside the character mesh, with a lip around the edge to meet the character mesh. But if they didn't do anything else, the wound would be inside the model, and you would not be able to see it.

 

So, they gave the shader an equation for the position of the wound mesh, and said "if the pixel occurs within this shape, discard it". This let them make those pixels invisible, which allows you to see through the character mesh and see the wound mesh they specially modeled.

 

So a special shader could handle the discard part, but it will take a lot of trial and error to get right.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

I can't imagine actually having the job to do that stuff. That would be strange to tell your spouse what you did at work all day. That was a very interesting article though, thanks for sharing.

 

If you listen to the L4D2 developer commentary, there was a shared folder that was full of complete gore (purely for texturing models). After several artists loosing their lunch, they decided to use potato skins and other references that weren't made of people.

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.

 Share

×
×
  • Create New...