Directional contrast (models and optionally the world)

Like feature suggestions, but you've actually written code to make it happen. More likely to make it into the game than some random request in feature suggestions.

Moderator: GZDoom Developers

Forum rules
Please see Code submission guidelines

GZDoom Status:
Image

Legacy Status:
Image Image

QZDoom Status:
Image

Re: Directional contrast (models and optionally the world)

Postby Major Cooke » Mon Aug 03, 2020 1:39 pm

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
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Directional contrast (models and optionally the world)

Postby Enjay » Mon Aug 03, 2020 1:51 pm

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.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Directional contrast (models and optionally the world)

Postby Talon1024 » Mon Aug 03, 2020 4:07 pm

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.
Talon1024
 
 
 
Joined: 28 Jun 2016
Github ID: Talon1024
Operating System: Debian-like Linux (Debian, Ubuntu, Kali, Mint, etc) 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Directional contrast (models and optionally the world)

Postby Major Cooke » Tue Aug 04, 2020 3:05 pm

Just a heads up I get warnings when compiling.

Code: Select allExpand view
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.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Directional contrast (models and optionally the world)

Postby dpJudas » Tue Aug 04, 2020 5:06 pm

Those warnings aren't part of the changes in this branch.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Directional contrast (models and optionally the world)

Postby Major Cooke » Tue Aug 04, 2020 5:57 pm

AH right, forgot to mention.

Code: Select allExpand view
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
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Directional contrast (models and optionally the world)

Postby Kizoky » Thu Aug 06, 2020 12:48 pm

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
Kizoky
I smell like gravity
 
Joined: 14 Nov 2011
Location: Around weirdos, I'm the biggest weirdo among them
Discord: Kizoky#0375
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Directional contrast (models and optionally the world)

Postby Nash » Thu Aug 06, 2020 5:12 pm

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
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Directional contrast (models and optionally the world)

Postby Nash » Thu Aug 06, 2020 7:18 pm

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
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Directional contrast (models and optionally the world)

Postby Major Cooke » Thu Aug 06, 2020 10:13 pm

It's already in QZDoom though.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Previous

Return to Code Submissions

Who is online

Users browsing this forum: No registered users and 0 guests