Horseneck too bright at night

Discuss modding questions and implementation details.
User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Horseneck too bright at night

Post by Hazelnut »

I was hoping that someday someone might create a 3d horse model that was in the world and that would be reactive to light then.. but that's a load of work.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

l3lessed
Posts: 1400
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: Horseneck too bright at night

Post by l3lessed »

There is no easy way, if any of doing this, without getting 3d model hands into the game and same with the horse.

Conceptually there may be a hard way of pulling this off.
  • Create code to grab lighting values around the player at set intervals or lighting value changes.
  • *This is the hard part* Create a method to shift the texture darkness. Off my head this would be done using a hidden black texture of all weapons, overlaying them in the gui with the original, and then shifting their transparency to lighten/darken the original weapon's texture.
  • Tie the texture color/transperency shift to the lighting value shifts.
There is no direct way to easily change texture color through code that I have found online, but there could be a work around using a second overlay texture and transparency layer values.

One way I can see doing this, maybe in ambidexterity module, is by overlaying a transparent black texture that is a replica of the weapon textures. Just take them, shift their rgb to black, and then enable a transparency layer for the texture, and then shift the transparency based on lighting values. As it gets brighter, the black layer gets more transparent. As it gets darker, the transparent layer gets less transparent. This could mimic something like light changes for a gui based texture.

I'm ready for 3d weapons/hands, if anyone ever makes, textures, and animates them for us. I think I could get them working in ambidexterity module if I could import the models and animations as prefabs.
Last edited by l3lessed on Mon Feb 01, 2021 9:37 pm, edited 1 time in total.
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.

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Horseneck too bright at night

Post by King of Worms »

From my POV its ridiculous the hands in Hexen or Doom can do that, and we cant do that in 2021 unity port.
Its something I cant wrap my head around (or how you say it)
Im not saying ppl here lack the skill, dont get me wrong, but its hard to believe situation, thats what I mean. ;)

Yea Im noob 8-) I hope you guys can come up with some hack.

l3lessed
Posts: 1400
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: Horseneck too bright at night

Post by l3lessed »

Well, there is a gui.color object that says it shifts the tint of the texture. I'll see what I can do with it. The issue I'm concerned about is if it shifts the whole rect object color, which if so it won't work. if it only shifts the none transparent texture (Aka only the seen weapon), then this would be easy to use to shift texture color to mimic lighting changes on the 2d sprite. If it can do the latter, this would make it easy to then affect GUI element colors to mimic lighting shifts.

https://docs.unity3d.com/2017.3/Documen ... xture.html

By the way, the original doom didn't have this that I can see of in videos. Hexen does, but I think Hexen was not super ambitious and is using a single weapon sprite that has no cut-offs, which simplifies some of this.
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.

Post Reply