6
\$\begingroup\$

I see a lot of skills in the games I play where they have a skill or a search area that projects a drawing on to a map, like a circle or something similar and I have no idea how that is done, and I don't think they use a texture to draw it. For the projection, I think, they use some kind of ray-cast to find the shape of the map and then go from there but I may be far off from truth.

example

In the linked image example you can see the circle is projected on the flat surface and the stairs. (And how is that glow effect around the circle achieved or is that part of a texture?)

Can someone tell me how is that done or point me to the right direction?

\$\endgroup\$
1
\$\begingroup\$

An option would be to render a cylinder. To fade it out, you could use the depth map of the scene, compare it to the current fragment's depth of the cylinder and fade out according to how far is the current depth from the scene depth.
Kind of like you would do with a soft particle renderer, but instead "softening" (fading out) the geometry when the two depths are close, fade it out when they become more far away.
Also, in your picture, it looks like the fade is non-linear.

An other approach for a simpler effect you could also use decals.

\$\endgroup\$
0
\$\begingroup\$

This effect can be achieved by layering two textures on top of one another. The map exists in 3D space and is drawn with its normal texture, then drawn again with the circular texture, potentially with some additional calculations to get the correct texture coordinates since the circle texture is larger than any of the polygons it's mapping to.

The glow can either be part of the texture or done dynamically in the shader.

\$\endgroup\$
-2
\$\begingroup\$

in most games it would most likely be an particle system drawn in a circle/sphere around the player to get that effect, i'd doubt a game would use ray casting to achieve such an effect

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.