#144 closed task (fixed)
Visualize player controlled units that are hidden behind other objects
Reported by: | Nicolai Hähnle | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 5 |
Component: | Core engine | Keywords: | |
Cc: | Patch: |
Description
We need a way to render player controled/obstructed (by trees, walls, terrain) units (player color/filled sillohettes), and some nifty effects to render enemy units hiding in 'trees' (some sort of transparency).
Change History (7)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Milestone: | Advanced Playability Demo |
---|
Milestone Advanced Playability Demo deleted
comment:3 by , 14 years ago
Milestone: | → Backlog |
---|
comment:4 by , 13 years ago
Hmm, I haven't been able to easily find any documentation of how people usually render unit silhouettes. The only way I can think to do it is:
- Render all objects which block units (i.e. buildings and terrain and maybe trees) as normal.
- Render all objects which have silhouettes (i.e. units) as a solid colour, with an inverted Z test (i.e. only draw when they're behind an already-rendered object).
- Render all objects which have silhouettes as normal, plus any objects we haven't rendered yet.
That means we need to render all unit vertexes twice, but hopefully that won't be too expensive (and it's just a single batch per player colour) and it should be fairly straightforward.
comment:5 by , 13 years ago
That won't work, because of alpha blending. Something like this should work better.
comment:6 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:7 by , 13 years ago
Milestone: | Backlog → Alpha 5 |
---|
I think the easiest way to do this would be to have a key that toggles building visibility down to just the base of the building (i.e. you'd see the outline of the building on the ground, but not the walls/roof of the building). This would fix not only the issue of seeing units, but also selecting things like animals behind buildings.