Fallout New Vegas 0.156

Forum rules
new topics are not allowed in this subsection, only replies.
  • Author
  • Message
Offline
User avatar
*blah-blah-blah maniac*
Posts: 17524
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: Fallout New Vegas 0.156

i don't understand what you mean by set up an object as Night-Eye, cause Night-Eye is a ISM with HDR parameters, you cannot set up an object with an ISM attached to it, ISM is only for main camera.
If scripting system have function like IsNightEyeActive f.e., then object may change it's state (size, color, etc).
Can you acces global variables or gamesettings from the game, or do you really need light or color values for DirectX ?
I can't touch process memory, only dx data from game, any kind.
Also, i checked the Night-Eye ISM and it only has brightness upped from 1.000 to 1.300.
If i where to change the values of that ISM to an extreme value, would you be able to detect that ?
With image space modifiers you can do night-eye detection without my help, but it's not compatible with other weather mods, unless you explain why i'm wrong. Also parameters from weather mixed with night-eye, so if weather set some value to very low (brightness f.e.), then multiplied by night-eye will be small too. I never saw it in fallout, but in skyrim khadjiit vision desaturate colors together with increasing brightness, so it's not that simple one variable.
You have any good websites on DirectX to start learning for me ?
Don't bother with it, it's just another api and useless for most programmers.

I advise to create visualisation test of shader variables to see how they work in different weather and could you make night-eye only for them. This code in enbeffect.fx have all of them listed

Code: Select all

#ifdef APPLYGAMECOLORCORRECTION
	//apply original

//   float3 BlurScale;
//   float4 Cinematic;
//   sampler2D DestBlend;
//   float4 Fade;
//   float4 HDRParam;
//   sampler2D Src0;
//   float4 Tint;
// Registers:
//   Name         Reg   Size
//   ------------ ----- ----
//   HDRParam     c1       1
//   BlurScale    c2       1
//   Cinematic    c19      1
//   Tint         c20      1
//   Fade         c22      1
//   Src0         s0       1
//   DestBlend    s1       1
	//todo apply uv offsets to coordinates
	r0=tex2D(_s0, IN.txcoord0.xy);//r0=tex2D(_s0, IN.txcoord1.xy);
	r1=tex2D(_s1, IN.txcoord0.xy);
	r0.w=max(r1.w, _c1.x);
	r0.w=1.0/r0.w;
	r1.w=r0.w * 0.5;
	r0.w=r0.w * _c1.x;
	r1.xyz=r1 * r1.w;
	r2.xyz=max(r1, 0.0);
	r0.xyz=r0.w * r0 + r2.xyz;
	r0.w=dot(r0.xyz, float3(0.298999995, 0.587000012, 0.114));
	r1.xyz=lerp(r0.w, r0, _c19.x);
	r0.xyz=_c20 * r0.w - r1;
	r0.xyz=_c20.w * r0 + r1;
	r0.xyz=_c19.w * r0 - _c19.y;
	r0.xyz=_c19.z * r0 + _c19.y;
	r1.xyz=lerp(r0, _c22, _c22.w);
	r1.w=_c2.z;
	_oC0=r1;

#endif //APPLYGAMECOLORCORRECTION
Which of these have minimal impact from weather setup and maximal from night-eye, that's what you need to find:

Code: Select all

//   HDRParam     c1       1
//   Cinematic    c19      1
//   Tint         c20      1
//   Fade         c22      1
And to see them in action, find code:

Code: Select all

	_oC0.w=1.0;
	_oC0.xyz=color.xyz;
	return _oC0;
and insert before it this line:
color.xyz=_c22.w*pow(tempF1.y,4);
If value is too big or too small, then use temporary variable 2 to increase or decrease constant. Of course _c22.w is only one, use any from vectors _c1, _c19, _c20, _c22. If you will find proper combination relatively independent from weather, then night-eye will be just a "if" condition or lerp function with clamped and scaled input.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
*sensei*
Posts: 397
Joined: 16 Mar 2013, 16:28

Re: Fallout New Vegas 0.156

Allright, i can work with this information, this is nice !

I can indeed ask "if IsImageSpaceActive NightEyeFXISM" and i can also remove it and apply another one with higher values.
However, it is not possible to alter values of the ISM itself by scripting.
But just switching it for another ISM should do the trick as well i think.
So you don't need a object, i can just replace the ISM for another ISM with high values that can be automatically used by the code once it becomes active.
But from what i see it probably means that ApplyGameColorCorrection needs to be set active.
In that case the enbseries.ini values will also need to be tweaked.
I don't like the original color processing of the game, your DirectX color processing is much better.
--------------

I understand that it would not be compatible with other weather mods, but other guys who have made a weather
mod are perfectly capable to alter the ISM values themselves, i'll explain it to them.

I myself have made special ISM's with standard values for all weathers, Cloudy day ISM, Sunny day ISM and so on.
So that not every weather has very different values, infact all the settings that do not influence ENB with ApplyGameColorCorrection Disabled are set to 1, i only changed the (non imagespace) settings for the sun dimmer.
This works best with ENB and i myself have no problems at all with night and day routines, everything works perfect.
But since Tapioks asked me to look into the Night-Eye i thought let's see if i can help him out.
And i just started to use ENB and i like it a lot, and usually i want to know everything about mods when i work with them.

But the pointer to the code is very welcome, now that you mention ApplyGameColorCorrection i should have known that
i could find it there, i feel a bit dumb that i havent found that out already myself..
But i'm like you, i'm lazy..hehe..

Thanks a million Boris, i'm going to toy with this.
_________________
Intel I9-9900k, RTX 3070, 1TB Samsung EVO 970, 1TB Crucial SSD, 1TB Kingston SSD , Realtek HD Audio, 16GB 3400MHZ System RAM, W10 Pro x64.

Offline
User avatar
*blah-blah-blah maniac*
Posts: 17524
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: Fallout New Vegas 0.156

But from what i see it probably means that ApplyGameColorCorrection needs to be set active.
No, instead of it new code must be written in enbeffect.fx and it's output must be interpolated. Like this scheme:

Code: Select all

input=read input data()
result=compute color correction(input)
nighteye=compute night eye color correction(input)
result=lerp(result, nighteye, is active night eye)
output=write output(result)
or this:

Code: Select all

input=read input data()
result=compute color correction(input)
nighteye=compute night eye color correction(result)
result=lerp(result, nighteye, is active night eye)
output=write output(result)
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
*sensei*
Posts: 397
Joined: 16 Mar 2013, 16:28

Re: Fallout New Vegas 0.156

right on, thanks !

i'm on it..
_________________
Intel I9-9900k, RTX 3070, 1TB Samsung EVO 970, 1TB Crucial SSD, 1TB Kingston SSD , Realtek HD Audio, 16GB 3400MHZ System RAM, W10 Pro x64.

Offline
*sensei*
Posts: 397
Joined: 16 Mar 2013, 16:28

Re: Fallout New Vegas 0.156

Turned out i had the right idea al along..
i made a fix for the NightEye and Cateye in FNV in 5 minutes.
I just upped the skin dimmer, grass dimmer, sunlight dimmer, and tree dimmer on the ISM's by a significant amount,
and you can see very well at night, so there is no need for extra code in the shaderfile.

i don't know if you use the stuff in that game, if you even play the game, but you can find it here.
https://www.dropbox.com/sh/d8txclvp9r1gs2u/NaDDXVpgw1

i myself don't use nightvision and all that stuff..

But i do have more understanding about the code in the shaderfiles now so i can adjust some stuff for my own use.

Thanks again Boris, you're the best !
_________________
Intel I9-9900k, RTX 3070, 1TB Samsung EVO 970, 1TB Crucial SSD, 1TB Kingston SSD , Realtek HD Audio, 16GB 3400MHZ System RAM, W10 Pro x64.

Offline
User avatar
*blah-blah-blah maniac*
Posts: 17524
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: Fallout New Vegas 0.156

Sorry, i don't have time to play games and open world scary me (about 7 years ago on the contrary). Better post it on nexus and give me the link, i'll post it on the news page.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
*sensei*
Posts: 397
Joined: 16 Mar 2013, 16:28

Re: Fallout New Vegas 0.156

haha, i thought so, you are a busy man..

I gave the mod to Tapioks, once he posted it on the nexus he'll send you the link.
_________________
Intel I9-9900k, RTX 3070, 1TB Samsung EVO 970, 1TB Crucial SSD, 1TB Kingston SSD , Realtek HD Audio, 16GB 3400MHZ System RAM, W10 Pro x64.
Post Reply