x


Fade out faces in a mesh?

I'm making a game where the player character may in some cases end up behind a mesh, what I"d like to do is create a sort of spotlight which fades out the faces blocking the view to the player.

Is this possible and if so how can I go about doing it?

more ▼

asked May 24 '12 at 02:33 PM

chillypacman gravatar image

chillypacman
201 50 64 75

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Depends on what that mesh is. A couple of ideas:

  • Subdivide your mesh into parts and then set transparent shader to the parts that you want to fade-out
  • Write a special shader which sets alpha for each pixel based on a player distace from that pixel
more ▼

answered May 25 '12 at 08:21 AM

Paulius Liekis gravatar image

Paulius Liekis
7.3k 16 24 46

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Topics:

x330
x246

asked: May 24 '12 at 02:33 PM

Seen: 446 times

Last Updated: May 25 '12 at 08:21 AM