Directional contrast (models and optionally the world)

Moderator: GZDoom Developers

User avatar
Major Cooke
Posts: 8205
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town

Re: Directional contrast (models and optionally the world)

Post by Major Cooke »

Alright, I just merged this submission so the next QZDoom devbuild can have additional people test this.

I will say though, MD3s have sometimes had weird normal behaviors when exporting from Blender.
User avatar
Enjay
 
 
Posts: 26910
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Directional contrast (models and optionally the world)

Post by Enjay »

Major Cooke wrote:I will say though, MD3s have sometimes had weird normal behaviors when exporting from Blender.
Misfit Model 3D also can produce broken normals. Its continuation Maveric Model 3D improves on this. And there is always the old program Npherno's MD3 compiler which does a very good job of fixing normals too.
Talon1024
 
 
Posts: 376
Joined: Mon Jun 27, 2016 7:26 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support

Re: Directional contrast (models and optionally the world)

Post by Talon1024 »

Enjay wrote:
Major Cooke wrote:I will say though, MD3s have sometimes had weird normal behaviors when exporting from Blender.
Misfit Model 3D also can produce broken normals. Its continuation Maveric Model 3D improves on this. And there is always the old program Npherno's MD3 compiler which does a very good job of fixing normals too.
I hope to have fixed those sorts of issues with my rewritten Blender MD3 exporter plugin.
User avatar
Major Cooke
Posts: 8205
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town

Re: Directional contrast (models and optionally the world)

Post by Major Cooke »

Just a heads up I get warnings when compiling.

Code: Select all

2>c:\games\doom 2\qzsource\src\scripting\vmthunks.cpp(2671): warning C4244: 'argument': conversion from 'double' to 'vec_t', possible loss of data
2>        with
2>        [
2>            vec_t=float
2>        ]
2>c:\games\doom 2\qzsource\src\scripting\vmthunks.cpp(2671): warning C4244: 'argument': conversion from 'vec_t' to 'vec_t', possible loss of data
2>        with
2>        [
2>            vec_t=double
2>        ]
2>        and
2>        [
2>            vec_t=float
2>        ]
Just in case you wanted to know.
dpJudas
 
 
Posts: 3160
Joined: Sat May 28, 2016 1:01 pm

Re: Directional contrast (models and optionally the world)

Post by dpJudas »

Those warnings aren't part of the changes in this branch.
User avatar
Major Cooke
Posts: 8205
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town

Re: Directional contrast (models and optionally the world)

Post by Major Cooke »

AH right, forgot to mention.

Code: Select all

static void SetDirectionalContrast(FLevelLocals* self, double x, double y, double z, double w)
{
	// normalize the vector
	DVector3 dlv = DVector3(x, y, z);
	dlv.MakeUnit();
	self->directionalContrast = FVector4(dlv.X, dlv.Y, dlv.Z, w); //<------------------------------------
}
But then again it might be because I'm using VS2017.
User avatar
Kizoky
Posts: 291
Joined: Mon Nov 14, 2011 9:59 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: Around weirdos, I'm the biggest weirdo among them

Re: Directional contrast (models and optionally the world)

Post by Kizoky »

I absolutely love this, however it seems it doesn't work under OpenGL
I also have some problems regarding the Skybox (Skybox actor is in a different sector, I don't know if it's instead user error) where it will be darker when combined with line horizon: https://media.discordapp.net/attachment ... height=376

Would it be somehow possible to specify some textures to not get affected by the contrast?
User avatar
Nash
 
 
Posts: 17484
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Directional contrast (models and optionally the world)

Post by Nash »

For the skybox, tag the sector as a skybox sector.

I will take a look at OpenGL and compile warnings this weekend.

Per texture setting, I have no promises. Will see how complicated it is at a later date.
User avatar
Nash
 
 
Posts: 17484
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Directional contrast (models and optionally the world)

Post by Nash »

I simply do not have time for this in the short term, therefore I'm requesting this to be closed for the time being, to prevent people from prematurely using this feature.
User avatar
Major Cooke
Posts: 8205
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town

Re: Directional contrast (models and optionally the world)

Post by Major Cooke »

It's already in QZDoom though.

Return to “Closed Feature Suggestions [GZDoom]”