#143 closed enhancement (fixed)
[PATCH] Shadowing: Selectively disable/enable for actors through properties
Reported by: | Nicolai Hähnle | Owned by: | philip |
---|---|---|---|
Priority: | If Time Permits | Milestone: | Alpha 10 |
Component: | Core engine | Keywords: | simple |
Cc: | Patch: |
Description
Basically the default for actors would be that they would cast a shadow and they would recieve a shadow. Only need flags if they don't in either case. Something like:
<not_recieve_shadows /> <not_cast_shadow />
Attachments (4)
Change History (24)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Owner: | removed |
---|
comment:3 by , 14 years ago
Keywords: | simple added |
---|
Some of this is almost implemented already.
See source/graphics/ObjectBase.cpp
for loading the actor XML files - currently it detects <castshadow/>
elements, which most (all?) actors (in binaries/data/mods/public/art/actors
) set. Shadow-casting is enabled by default anyway, so it's never going to be disabled.
Maybe the best approach is:
- Change the
m_CastShadows
default to false. - Make sure all actors have
<castshadow/>
. - Verify that the property is pushed through to the renderer, and rendered correctly.
As a second stage:
- Add support for a
<noreceiveshadow/>
(or use<receiveshadow/>
and add it to all the current actors and to the Actor Editor tool), which will probably require renderer changes too.
by , 14 years ago
Attachment: | receiveshadows.diff added |
---|
Patch for ActorEditor, Model, ObjectBase and ObjectEntry to support receiving shadows
by , 14 years ago
Attachment: | actors.diff added |
---|
Changes in actors. Every actor now contains <castshadow/> and <receiveshadow/>
by , 14 years ago
Attachment: | changeActors.py added |
---|
Python script which walks the actors and adds the tags
comment:5 by , 14 years ago
Milestone: | → Backlog |
---|
comment:6 by , 14 years ago
Milestone: | Backlog → Alpha 3 |
---|
comment:7 by , 13 years ago
Milestone: | Alpha 3 → Alpha 4 |
---|
comment:8 by , 13 years ago
Keywords: | review added |
---|
comment:9 by , 13 years ago
Milestone: | Alpha 4 → Alpha 5 |
---|
comment:10 by , 13 years ago
Summary: | Shadowing: Selectively disable/enable for actors through properties → [PATCH] Shadowing: Selectively disable/enable for actors through properties |
---|
comment:11 by , 13 years ago
Milestone: | Alpha 5 → Alpha 6 |
---|
comment:12 by , 13 years ago
Milestone: | Alpha 6 → Alpha 7 |
---|
comment:13 by , 13 years ago
Owner: | set to |
---|
comment:14 by , 13 years ago
Priority: | Nice to Have → If Time Permits |
---|
comment:15 by , 13 years ago
Owner: | changed from | to
---|
comment:16 by , 13 years ago
Milestone: | Alpha 7 → Alpha 8 |
---|
comment:17 by , 12 years ago
Milestone: | Alpha 8 → Alpha 9 |
---|
by , 12 years ago
Attachment: | receiveshadows_r11037_02072012.patch added |
---|
updated version applied to r11037
comment:18 by , 12 years ago
Keywords: | review removed |
---|---|
Milestone: | Alpha 9 → Backlog |
This ticket can be unmarked for review and sent to backlog, because the patch lacks the renderer changes needed to make <receiveshadow/>
work.
comment:19 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Hmm, this got delayed a bit...
The renderer is finally capable of per-object disabling of shadow-receiving. I no longer think it makes sense as an actor flag, though - disabling shadow-receiving seems ugly and wrong and unnecessary except for objects with emissive materials (i.e. glowing, so it's lit by itself rather than by the shadowable sun), and in that case it's more appropriate to set a flag in the material XML files instead.
So, r11500 lets materials say <define name="DISABLE_RECEIVE_SHADOWS" value="1"/>
, though we don't have any that use that yet.
r11499 makes the engine respect the actor <castshadow/>
flag properly (as per the patches here), and r11497 and r11498 add that flag to all the current actors.
comment:20 by , 12 years ago
Milestone: | Backlog → Alpha 10 |
---|
Replying to nicolai:
This would be excellent if this is applicable to items such as grass sprites, because they cast ugly shadows, but I'd still like them to receive shadows.