Please use english language
It is currently 18 Feb 2018, 05:01

All times are UTC





Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
PostPosted: 16 Feb 2017, 17:48 
Offline
*blah-blah-blah maniac*

Joined: 05 Apr 2014, 10:29
Posts: 501
Location: Taiwan


This is a SKSE plugin that adds following papyrus functions for creation kit script compiler to modify enb values on game events:
Code:
int Function ENB_GetVersion() global native
int Function ENB_GetSDKVersion() global native

//file == "" (empty string) to access shader sections,  file == "enbseries.ini" to access enbseries sections.

//get values
float   Function ENB_GetFloat(      string file, string section, string keyname ) global native
int     Function ENB_GetInt(        string file, string section, string keyname ) global native
bool    Function ENB_GetBool(       string file, string section, string keyname ) global native
float[] Function ENB_GetColorRGB(   string file, string section, string keyname ) global native
float[] Function ENB_GetColorRGBA(  string file, string section, string keyname ) global native
float[] Function ENB_GetVector3(    string file, string section, string keyname ) global native

//set values
Function ENB_SetFloat( string file, string section, string keyname, float  value) global native
Function ENB_SetInt(   string file, string section, string keyname, int    value) global native
Function ENB_SetBool(  string file, string section, string keyname, bool   value) global native

Function ENB_SetColorRGB(  string file, string section, string keyname, float colorR, float colorG, float colorB)               global native
Function ENB_SetColorRGBA( string file, string section, string keyname, float colorR, float colorG, float colorB, float colorA) global native
Function ENB_SetVector3(   string file, string section, string keyname, float _x,     float _y,     float _z)                   global native

//set parameters in ini file under "\enbseries\profiles\filename.ini"
Function ENB_SetConfigFile( string filename) global native


demo script: (not included in the download)
Code:
Scriptname testscript extends ObjectReference 
{test}

import ENBscript

Message Property ENBtestMSG auto

Event OnActivate(ObjectReference akActionRef)

//set letterbox under [ENBEFFECT.FX] to 9.0 in shader window
    ENB_SetFloat("", "ENBEFFECT.FX", "letterbox", 9.0 )

//load settings in "/enbseries/profiles/test.ini"
    ENB_SetConfigFile("test.ini")
   
//get colorRGB  "DirectLightingColorFilterDawn" under [ENVIRONMENT] in enbseries.ini
    float[] color = new float[3]
    color = ENB_GetColorRGB("enbseries.ini", "ENVIRONMENT", "DirectLightingColorFilterDawn")

//get single float "GammaCurve" under [COLORCORRECTION] in enbseries.ini.
    float enbfloat = ENB_GetFloat("enbseries.ini", "COLORCORRECTION", "GammaCurve")


    ENBtestMSG.show(enbfloat, color[0], color[1], color[2])
endEvent


for the config files, it looks like this:
"test.ini"
Code:
[EFFECT.TXT]
CameraState=5
FOV=5.0
btest=true
[GLOBAL]
UseEffect=true
[ENBBLOOM.FX]
somecolor=0.77, 0.5, 0.3
somecolorRGBA=0.77, 0.5, 0.3, 0.0
somevector=0.34, 1.5, 2.2, v
someint=-4
somebool=false

Also, a log file is generated in /my games/skyrim/skse

Attachment:
File comment: ***BETA***
enb script extender.zip [83.37 KiB]
Downloaded 45 times


===============================================


Fallout 4 :
with two additional functions:
Code:
Function ENB_unSetConfigFile() global native ;revert back to the settings that are replaced by ENB_SetConfigFile
Function ENB_SetConfigFile_Interpolate( string file, float w) global native ;interpolate between current settings and config file by weight.

And a button to save current settings to .ini profile.


**Note
For config files to work properly, the UI widget names can not be start with space.

Add this line to enbeffectpostpass.fx for the profile saver to work.
Code:
bool SaveProfile  <string UIName="Save Current Profile"; > = {false};

Attachment:
File comment: for F4SE 0.3.0+
ENB script extender FO4 v2.zip [33.2 KiB]
Downloaded 15 times


example script for weather dependent profile
Code:
Scriptname ENBweatherTest extends Quest
import ENBscript

Weather Property CommonwealthRain auto

Event OnInit()
   StartTimer(0.02)
EndEvent

Event OnTimer(int aiTimerID)

   Weather Curr

   If aiTimerID == 0
      Curr  = Weather.GetCurrentWeather()
      float curTransition = Weather.GetCurrentWeatherTransition();

      if Curr == CommonwealthRain
            ENB_SetConfigFile_Interpolate("CommonwealthRain.ini", curTransition);
        else
            ENB_SetConfigFile_Interpolate("Default.ini", curTransition);
      endif

      StartTimer(0.02)
   EndIf
   
EndEvent



History version:
Attachment:
File comment: for F4SE 0.3.0
enb script extender FO4.zip [28.7 KiB]
Downloaded 22 times

_________________
Intel Xeon L5639 6C12T @3.96GHz // Gigabyte ga-x58a-ud3r// MSI GTX680 4G// 24G RAM
Flickr
YouTube


Last edited by kingeric1992 on 16 Jun 2017, 22:53, edited 3 times in total.

Top
 Profile  
 
Tomoko
PostPosted: 18 Feb 2017, 09:21 
Offline
*blah-blah-blah maniac*

Joined: 05 Apr 2014, 10:29
Posts: 501
Location: Taiwan
add FO4 version.

_________________
Intel Xeon L5639 6C12T @3.96GHz // Gigabyte ga-x58a-ud3r// MSI GTX680 4G// 24G RAM
Flickr
YouTube


Top
 Profile  
 
PostPosted: 16 Jun 2017, 22:55 
Offline
*blah-blah-blah maniac*

Joined: 05 Apr 2014, 10:29
Posts: 501
Location: Taiwan
update FO4 version with:

**profile saver
**function to interpolate to .ini

_________________
Intel Xeon L5639 6C12T @3.96GHz // Gigabyte ga-x58a-ud3r// MSI GTX680 4G// 24G RAM
Flickr
YouTube


Top
 Profile  
 
PostPosted: 17 Jun 2017, 13:31 
Offline
*sensei*
User avatar

Joined: 27 Dec 2011, 21:33
Posts: 328
Location: Poland, Gdańsk
That certainly looks amazing. Do you think it would be possible to create a HDR screen space motion blur shader by reading the mouse position or maybe camera rotation matrix and recreating velocity with it?

_________________
OS: Windows 10
CPU: Intel Core i7 3770 @4.2GHz
RAM: DDR3 24GB 1333 MHz
GPU: GeForce GTX 980TI MSI Gaming 6GB
Sound Card: X-FI Titanium HD
Mobo: Asrock Z77 EXTREME4
Monitor: M340CLZ 34" 3440x1440 100HZ AMD FREE Sync Curved Monitor


Top
 Profile  
 
PostPosted: 17 Jun 2017, 13:56 
Offline
*blah-blah-blah maniac*
User avatar

Joined: 27 Dec 2011, 08:53
Posts: 11766
Location: Voronezh
Isn't it simpler to request such feature from me? :?

_________________
AMD A6-3420M 1.5 GHz, 8 Gb ram, Radeon HD6520G 2 Gb, Win7
I am INFP, not the brutal, godamnit.


Top
 Profile  
 
PostPosted: 17 Jun 2017, 14:34 
Offline
*sensei*
User avatar

Joined: 27 Dec 2011, 21:33
Posts: 328
Location: Poland, Gdańsk
Cue the many, many times when you refused doing motion blur because object based is buggy and screen based is in your opinion ugly :P

I mean, don't get me wrong, I would love official Motion Blur from you but I thought that you're totally not interested in that after the Skyrim failure.

_________________
OS: Windows 10
CPU: Intel Core i7 3770 @4.2GHz
RAM: DDR3 24GB 1333 MHz
GPU: GeForce GTX 980TI MSI Gaming 6GB
Sound Card: X-FI Titanium HD
Mobo: Asrock Z77 EXTREME4
Monitor: M340CLZ 34" 3440x1440 100HZ AMD FREE Sync Curved Monitor


Top
 Profile  
 
PostPosted: 17 Jun 2017, 15:00 
Offline
*blah-blah-blah maniac*

Joined: 05 Apr 2014, 10:29
Posts: 501
Location: Taiwan
ENBSeries wrote:
Isn't it simpler to request such feature from me? :?

Not really... jk.

As for request, it would be nice if there is enbSet/GetParameter on texture objects, like retrieving/setting texture handles? if that's not too much of a non-sense.
And support for UI string in FO4 as always.

@MaxG3D
Wouldn't it look weird without per-object velocity?

FYI, you can achieve that with FO4 and SSE.
Use RenderTarget to store mouse pos from last frame.

_________________
Intel Xeon L5639 6C12T @3.96GHz // Gigabyte ga-x58a-ud3r// MSI GTX680 4G// 24G RAM
Flickr
YouTube


Top
 Profile  
 
PostPosted: 17 Jun 2017, 15:06 
Offline
*sensei*
User avatar

Joined: 27 Dec 2011, 21:33
Posts: 328
Location: Poland, Gdańsk
kingeric1992 wrote:
@MaxG3D
Wouldn't it look weird without per-object velocity?


I'm only asking for screen space motion blur, completely ignoring the object based. If you wouldn't mind writing such shader, that would be awesome, I'm not experienced in HLSL coding.

_________________
OS: Windows 10
CPU: Intel Core i7 3770 @4.2GHz
RAM: DDR3 24GB 1333 MHz
GPU: GeForce GTX 980TI MSI Gaming 6GB
Sound Card: X-FI Titanium HD
Mobo: Asrock Z77 EXTREME4
Monitor: M340CLZ 34" 3440x1440 100HZ AMD FREE Sync Curved Monitor


Top
 Profile  
 
PostPosted: 17 Jun 2017, 15:45 
Offline
*blah-blah-blah maniac*

Joined: 05 Apr 2014, 10:29
Posts: 501
Location: Taiwan
Just found out there are mod for Motion Blur on nexus. why not just go with it?

I've done some initial testing, and with shader alone, it will return false result when mouse hit the movement limit and get position reset.

So you either try to use the mod, or wait for boris's reply on if he's gonna implement that officially, if not, then I can do that through plugin.

also per-object motion blur is also a screenspace effect, with additional velocity map as input, and not just depth map.

_________________
Intel Xeon L5639 6C12T @3.96GHz // Gigabyte ga-x58a-ud3r// MSI GTX680 4G// 24G RAM
Flickr
YouTube


Top
 Profile  
 
PostPosted: 17 Jun 2017, 15:54 
Offline
*sensei*
User avatar

Joined: 27 Dec 2011, 21:33
Posts: 328
Location: Poland, Gdańsk
kingeric1992 wrote:
Just found out there are mod for Motion Blur on nexus. why not just go with it?


Vanilla game motion blur is:

A) Either LDR or simply ugly. I remember Boris commenting on it but I don't remember his exact words. It's just a cheap additive bullshit, not worth the time. It's definitely not like something you can see in Frostbite or Unreal Engine 4.
B) It's calculated only on the edges of the screen for some reason. There's no way to force it to be applied to the whole image.

_________________
OS: Windows 10
CPU: Intel Core i7 3770 @4.2GHz
RAM: DDR3 24GB 1333 MHz
GPU: GeForce GTX 980TI MSI Gaming 6GB
Sound Card: X-FI Titanium HD
Mobo: Asrock Z77 EXTREME4
Monitor: M340CLZ 34" 3440x1440 100HZ AMD FREE Sync Curved Monitor


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group