- Home /
Can a simple viewshed analysis be done with a projector?
I am looking to do a simple viewshed analysis and I'm wondering if a projector can be used for this. I would like the projector to project a color or light on to the terrain and buildings. The problem is projectors do not occlude behind geometry but instead go straight through. Is there a shader that I can use that will take into account occlusion of objects and terrain?
Is this to be displayed in the editor or in-game? I'm assu$$anonymous$$g in the editor since, by definition, if you were seeing the object in game from the player's point-of-view, it will be included in he viewshed...
Hi Tanoshimi,
I am looking to do this in-game and not from a first person perspective. Say for example, in third-person, I click on a location the terrain and buildings would be painted yellow in the areas where I would have line of sight from that point. Area's that are behind terrains or buildings would not be painted yellow. This would create a simple viewshed type of view of what I can see from that location. The effect I'm trying to achieve is demonstrated in the attached image.
I tried just placing a projector where I click. The projector projects a material starting from that point but does not stop once it hits the first surface. It continues to pass through and places the material on every surface it hits. Is there a shader or a way to only have the projector project on the first surface and occlude everything behind it essentially creating a viewshed view.
I know this question is a little old, but did anyone ever figure a way to do viewshed analysis effectively?
I want to be able to place an object in my scene and show visibility for the surrounding area, as demonstrated in this Google Earth video.
I know the process is the same as shadow mapping, and while I understand the concept, I don't know how to implement it. Any suggestions would be helpful.
Answer by tanoshimi · Oct 06, 2013 at 07:48 AM
Ah, ok, I think we have different ideas of what a viewshed looks like :) What you're describing looks more like the effect in games such as Monaco. Does this help?: https://m.facebook.com/notes/monaco/line-of-sight-in-a-tile-based-world/411301481995
Your answer
Follow this Question
Related Questions
3d Text culled via occlusion culling? 0 Answers
How to make projector/light shader "alpha enabled"? 2 Answers
Revealing invisible objects with a projector 0 Answers
Occlusion culling at runtime 0 Answers