So when I cast a "light" spell, the light produced casts shadows all around including the world geometry (like walls) and I like that.
When I equip my torch, the light casts shadows from sprites, but not from world geometry.
Is it possible to change that?
It could be either a option in the game (Torch casts geometry shadows ON/OFF)
OR
A mod script ppl can use. Id like to include such script in my DREAM mod, it would be great!
Also, a detail. When you cast "light" the light source is kind of moving and that makes the shadows jump around.
This effect is too strong. But if it was reduced to 50 or 25% it could produce realistic torch light, because that light is not 100% static in real life neither.
Thanks a lot for consideration
(REALIZED IDEA) Equipped torch casts shadows same as the spell "Light"
- King of Worms
- Posts: 4754
- Joined: Mon Oct 17, 2016 11:18 pm
- Location: Scourg Barrow (CZ)
- Contact:
(REALIZED IDEA) Equipped torch casts shadows same as the spell "Light"
Last edited by King of Worms on Sun May 02, 2021 6:12 pm, edited 1 time in total.
DREAM Nexus https://www.nexusmods.com/users/73250038?tab=user+files
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
- Hazelnut
- Posts: 3016
- Joined: Sat Aug 26, 2017 2:46 pm
- Contact:
Re: IDEA: Equipped torch casts shadows same as the spell "Light"
Hmm, I can't believe I never noticed that!
Not sure how to enable this, but i will try.
Not sure how to enable this, but i will try.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods
- King of Worms
- Posts: 4754
- Joined: Mon Oct 17, 2016 11:18 pm
- Location: Scourg Barrow (CZ)
- Contact:
Re: IDEA: Equipped torch casts shadows same as the spell "Light"
Great
DREAM Nexus https://www.nexusmods.com/users/73250038?tab=user+files
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
- Ralzar
- Posts: 2211
- Joined: Mon Oct 07, 2019 4:11 pm
- Location: Norway
Re: IDEA: Equipped torch casts shadows same as the spell "Light"
Oh wow, I always felt that the light spell was more atmospheric, but I never knew quite WHY until now
- Hazelnut
- Posts: 3016
- Joined: Sat Aug 26, 2017 2:46 pm
- Contact:
Re: IDEA: Equipped torch casts shadows same as the spell "Light"
So having taken a look into this, I actually did notice this at the time but after reading your post didn't put 2 & 2 together until looking inside unity tonight.
The player torch does cast shadows off the static geometry, but due to it's position relative to the player camera you don't really see them. Basically the relative positions of the torch light and the camera ensure they are rarely visible.
The magic candle on the other hand floats in front of the player so it's much easier to get cast shadows like in your picture.
What I've done is to offset the player torch light source game object if item based player torch is active - I don't want to affect the normal player light at all. It's slightly forward and to the left as well as a bit higher.
This simulates holding torch in left hand, slightly to left and forward, as well as above the eyeline. Lets not get into how this would work for 2h weapons, bows and shields etc.
So now you'd see shadows but only from left/above. See example:
The player torch does cast shadows off the static geometry, but due to it's position relative to the player camera you don't really see them. Basically the relative positions of the torch light and the camera ensure they are rarely visible.
The magic candle on the other hand floats in front of the player so it's much easier to get cast shadows like in your picture.
What I've done is to offset the player torch light source game object if item based player torch is active - I don't want to affect the normal player light at all. It's slightly forward and to the left as well as a bit higher.
Code: Select all
torchLight.transform.position = new Vector3(-0.3f, 1.2f, 0.2f);
So now you'd see shadows but only from left/above. See example:
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods
-
- Posts: 1410
- Joined: Mon Aug 12, 2019 4:32 pm
- Contact:
Re: IDEA: Equipped torch casts shadows same as the spell "Light"
Beautiful job. Looks more realistic. Technically, if someone wants to give me a good enough sprite set for a animated torch being held, I could add it into the FPS render system in ambidexterity so torches show being held.
As for two handed weapons, I thought about this some. I plan on hitting this after first release of my ambidexterity mod. It wouldn't be hard to shift the idle sprite offsets for two-handed weapons, so they are positioned more center or center left to signal visually two-handed stances. Add a quick pull down/back animation (or not), and then run normal attacks. Same with small blades; I plan on resizing them to reflect blade size better.
As for two handed weapons, I thought about this some. I plan on hitting this after first release of my ambidexterity mod. It wouldn't be hard to shift the idle sprite offsets for two-handed weapons, so they are positioned more center or center left to signal visually two-handed stances. Add a quick pull down/back animation (or not), and then run normal attacks. Same with small blades; I plan on resizing them to reflect blade size better.
My Daggerfall Mod Github: l3lessed DFU Mod Github
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
- King of Worms
- Posts: 4754
- Joined: Mon Oct 17, 2016 11:18 pm
- Location: Scourg Barrow (CZ)
- Contact:
Re: IDEA: Equipped torch casts shadows same as the spell "Light"
Great job Hazelnut in my mind I always imagined holding the torch in my right hand, eventho it makes no sense as there is usually a weapon (but with 2h it doesnt make sense in either hand and its no problem as well) I just hope this change will not trigger my ocd about it I think I will test it and hope for the best indeed. Will report back asap. Left/right switch in options would be nice, but the options are already full basically..
I can try to provide the animated sprites based on ingame art 3lessed... question is, in which hand it will be held
I can try to provide the animated sprites based on ingame art 3lessed... question is, in which hand it will be held
DREAM Nexus https://www.nexusmods.com/users/73250038?tab=user+files
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
-
- Posts: 1410
- Joined: Mon Aug 12, 2019 4:32 pm
- Contact:
Re: IDEA: Equipped torch casts shadows same as the spell "Light"
Ha king. If I had art for each hand, I could possibly add it as an option to the mod to have torch switch hands or disappear on duel wield. Or I can code flip the art myself, as I have done for weapons and animation smoothing. It is just harder than loading a new sprite.
Still plan on dream patches in near future. Once wrap up this final test release of smooth animations to ambidexterity module, I will work on patching it for Dream weapons, and the dream shields you gave me.
Still plan on dream patches in near future. Once wrap up this final test release of smooth animations to ambidexterity module, I will work on patching it for Dream weapons, and the dream shields you gave me.
My Daggerfall Mod Github: l3lessed DFU Mod Github
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
- King of Worms
- Posts: 4754
- Joined: Mon Oct 17, 2016 11:18 pm
- Location: Scourg Barrow (CZ)
- Contact:
Re: IDEA: Equipped torch casts shadows same as the spell "Light"
Completely forgot about the 1st person handheld torch - will add it to my notes.
DREAM Nexus https://www.nexusmods.com/users/73250038?tab=user+files
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz