Page 2 of 2

Re: Horseneck too bright at night

Posted: Sun Jan 31, 2021 6:37 pm
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.

Re: Horseneck too bright at night

Posted: Mon Feb 01, 2021 2:44 am
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.

Re: Horseneck too bright at night

Posted: Mon Feb 01, 2021 11:51 am
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.

Re: Horseneck too bright at night

Posted: Mon Feb 01, 2021 6:53 pm
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. ... 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.