Fractal Softworks Forum
October 20, 2018, 09:19:29 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New blog post: Portrait Hegemonization (10/16/18); In-dev patch notes for Starsector 0.9a (06/01/18);Starsector 0.8.1a is out!
 
   Home   Help Search Login Register  
Pages: [1] 2 3 ... 5
  Print  
Author Topic: [0.8.1a] GraphicsLib 1.2.1  (Read 67210 times)
Dark.Revenant
Admiral
*****
Posts: 2408



View Profile WWW Email
« on: April 15, 2016, 12:10:21 AM »


Download GraphicsLib 1.2.1
Also known as ShaderLib.
Download Mirror
(Requires LazyLib 2.2)

Edit GRAPHICS_OPTIONS.ini to enable or disable GraphicsLib features!



We also recommend Version Checker to notify you when an update is ready.

Warning: Make sure Starsector is GPU-Accelerated!
Mobile or integrated chipsets are known to have serious graphical artifacts!

Having problems?  Visit the Mod Troubleshooting Guide!



What is this?
GraphicsLib is a mod package containing numerous graphical improvements, including a variety of effects plugins, a dynamic lighting engine, and a screen-space distortion shader.  This library can also be used by other modders to implement unique shaders and make use of the built-in lighting, distortion, and post-processing APIs.


Features
  • Dynamic Lighting
  • Distortion Shader
  • Post-Processing Shader
  • Graphics Enhancement Plugins:
    • Enhanced Ship Destruction
    • Ship Damage Smoke
    • Overload Arcs
    • Officer Insignias
    • Missile Self-Destrution
  • Modding API


Screenshots


















How to Use
For players: Just download and enable the mod.  You don't have to do anything else; it works right out of the box.  If your computer can't handle GraphicsLib, follow the Mod Troubleshooting Guide.

For modders: If you want to incorporate GraphicsLib into your mod, you should follow this setup procedure:
Use the following mod detection code in your ModPlugin class.  If you want to make calls to GraphicsLib functions or use GraphicsLib objects, you must first check to see that hasGraphicsLib is true before calling/referencing them!  Note that some scenarios may make this arrangement difficult, requiring GraphicsLib for resolving class links.  Note that "shaderLib" is intentional here; the mod ID has remained the same to ensure backwards-compatibility.
Code: (java)
public static boolean hasGraphicsLib;

@Override
public void onApplicationLoad() {
    hasGraphicsLib = Global.getSettings().getModManager().isModEnabled("shaderLib");

    if (hasGraphicsLib) {
        ShaderLib.init();
        LightData.readLightDataCSV("data/lights/your_light_data.csv");
        TextureData.readTextureDataCSV("data/lights/your_texture_data.csv");
    }
}


Material Map: This texture determines the reflectivity of the sprite.  Internally, the lighting engine uses a minimum function (i.e. reflectivity = the darker of the pixel on screen and the corresponding pixel on the material map), so there are limitations on what you can do with a material map.  In general, you want to begin with the original ship sprite and then darken areas that should not reflect as much light.  You can also darken individual color channels to allow interesting effects like having reflected shines being a different color than the hull.  Remember that the material map must have an alpha channel that matches the original sprite's alpha channel.  For implementation, see the example in GraphicsLib.  If a sprite lacks a material map, the default is the original sprite (i.e. identical to previous lighting versions).

Normal Map: This texture is difficult to make properly, but the results can be well worth it.  There are many tutorials for making normal maps elsewhere on the Internet, if you are interested in making them for vanilla sprites or your own ships.  However, if you want an easy way out, an adequate normal map can be generated automatically through Photoshop, Crazy Bump, or similar programs, which takes far less time than making a normal map from the ground up.  Remember that the normal map must have an alpha channel that matches the original sprite's alpha channel.  For implementation, see the example in GraphicsLib.  If a sprite lacks a normal map, the lighting engine will default to using the old lighting model for that sprite rather than the new Blinn-Phong model.

Surface Map: This texture is completely optional (even more so than the other two).  Surface maps enhance the normal map of the object by influencing how the specularity looks.  The red channel corresponds to luminosity and will cause the ship to appear to glow wherever the red channel is nonzero.  The green channel determines the specular intensity of the object; a value of zero is totally matte while a high value will be very shiny.  The blue channel determines specular hardness, so a value of zero is cartoonishly shiny while a high value is very glossy; a value of 0.2 (or 51 on the integer scale) corresponds to the default behavior.  Remember that the surface map must have an alpha channel that matches the original sprite's alpha channel.  If a sprite lacks a surface map, the lighting engine will substitute red = 0, green = (derived from material map), blue = 0.2.


Warnings
You generally need a card made in 2008 or later to have a reasonable expectation of supporting GraphicsLib.  Performance may vary, but a GTX 460 or better should be sufficient to run without any performance hit on the default settings, and with settings tweaks virtually any compatible card will work fine.  Mobile and integrated chipset drivers are known to have problems with GraphicsLib.  If you are using an integrated graphics chipset, disable distortions and post-processing!





Change Log
Version 1.2.1 (June 10, 2017)
- Improved various effects for certain edge cases with sprites that are significantly smaller than the collision radius

Version 1.2.0 (June 4, 2017)
- Now works on Starsector 0.8.1a
- Additional LazyLib check
- Fixed some misc. bugs that nobody noticed
- Tweaked ship destruction effects for ship pieces to avoid fx spam
- Updated even more sprites

Version 1.1.0 (April 23, 2017)
- Now works on Starsector 0.8a
- Supports lighting on destroyed ship pieces
- New maps for the new ships/weapons, and updated maps for a large number of existing ships/weapons

Version 1.0.4 (March 26, 2017)
- Adjusted ripple intensity for ship deaths
- Disable bloom automatically on Intel IGPs

Version 1.0.3 (January 8, 2017)
- Nvidia post processing bug is fixed

Version 1.0.2 (May 21, 2016)
- General compatibility update

Version 1.0.1 (April 22, 2016)
- Added sun/hyperspace lighting from SS+

Version 1.0.0 (April 15, 2016)
- Renamed GraphicsLib
- shaderSettings.json renamed to GRAPHICS_OPTIONS.ini
- Added graphical effects plugins previously in Starsector+
- Added data/config/no_self_destruct.csv in case you want your mod-added missiles to not explode automatically
« Last Edit: June 10, 2017, 04:50:09 PM by Dark.Revenant » Logged

Dark.Revenant
Admiral
*****
Posts: 2408



View Profile WWW Email
« Reply #1 on: April 15, 2016, 12:14:35 AM »

FYI: This mod will NOT work with Starsector+.  If you use Starsector+, continue to use ShaderLib.
Logged

xenoargh
Admiral
*****
Posts: 4314

Not a super-villain in real life.


View Profile
« Reply #2 on: April 15, 2016, 01:13:40 PM »

If we previously worked with ShaderLib, what are the primary differences / improvements vs. ShaderLib? 
Logged

Check out my SS projects Smiley
Dark.Revenant
Admiral
*****
Posts: 2408



View Profile WWW Email
« Reply #3 on: April 15, 2016, 02:22:30 PM »

It's essentially ShaderLib plus some more plugins.
Logged

samsaq
Ensign
*
Posts: 40


View Profile Email
« Reply #4 on: April 21, 2016, 07:56:58 PM »

I'm posting this here as I cannot anymore on the shaderlib page: I have an issue.
I use this mod(shaderlib) as I use starsector plus, but I simply couldn't figure out why my game always crashed on start up until I noticed that shader lib was not on my mods list, so I checked the mods folder for starsector, and indeed it is there, I also re-installed the mod, but that hasn't fixed the issue, anyone have any idea as to why a mod wouldn't be displayed in the launcher?
Logged
Dark.Revenant
Admiral
*****
Posts: 2408



View Profile WWW Email
« Reply #5 on: April 21, 2016, 10:41:04 PM »

it's listed as "ZZ ShaderLib"
Logged

Orikson
Captain
****
Posts: 280

Always Seen on Discord


View Profile Email
« Reply #6 on: April 22, 2016, 05:44:27 AM »

I'm posting this here as I cannot anymore on the shaderlib page: I have an issue.
I use this mod(shaderlib) as I use starsector plus, but I simply couldn't figure out why my game always crashed on start up until I noticed that shader lib was not on my mods list, so I checked the mods folder for starsector, and indeed it is there, I also re-installed the mod, but that hasn't fixed the issue, anyone have any idea as to why a mod wouldn't be displayed in the launcher?

If you have both the old ShderLib and the new GraphicsLib mod in the 'Mods' folder, GraphicsLib will be prioritise by the system over ShaderLib, thus, you'll only see ZZGraphicsLib. Remove GraphicsLib from the folder to ensure the system pick ShaderLib.
Logged

"A story teller and a trader. Tell me your tales and I'll tell you no lies."

Come join the Starsector Fan Chat! It's decently active.

Link: https://discord.gg/eb5UC
Dark.Revenant
Admiral
*****
Posts: 2408



View Profile WWW Email
« Reply #7 on: April 22, 2016, 06:44:47 PM »

Adding in some last few features from SS+...


Download GraphicsLib 1.0.1
Also known as ShaderLib.
Download Mirror
(Requires LazyLib 2.1)

Edit GRAPHICS_OPTIONS.ini to enable or disable GraphicsLib features!



We also recommend Version Checker to notify you when an update is ready.

Warning: Make sure Starsector is GPU-Accelerated!
Mobile or integrated chipsets are known to have serious graphical artifacts!

Having problems?  Visit the Mod Troubleshooting Guide!



Change Log
1.0.1
- Added sun/hyperspace lighting from SS+
Logged

HuoShengdi
Ensign
*
Posts: 6


View Profile Email
« Reply #8 on: April 25, 2016, 12:33:38 PM »

Encountered a crash relating to lighting effects. Occurred when I entered battle with the IBB fleet with custom Cerberus frigates, so I'm not sure if it belongs here or in the Ship/Weapons Pack.

Code:
7905446 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at com.fs.starfarer.settings.B.getTextureId(Unknown Source)
at org.dark.shaders.util.ShaderLib.renderForeground(ShaderLib.java:1098)
at org.dark.shaders.util.ShaderLib.isForegroundEmpty(ShaderLib.java:634)
at org.dark.shaders.light.LightShader.drawLights(LightShader.java:948)
at org.dark.shaders.light.LightShader.renderInWorldCoords(LightShader.java:943)
at org.dark.shaders.util.ShaderHook.renderInWorldCoords(ShaderHook.java:135)
at com.fs.starfarer.title.C.o0oO$Oo.?00000(Unknown Source)
at com.fs.starfarer.combat.A.new.?00000(Unknown Source)
at com.fs.starfarer.combat.CombatState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Logged
Dark.Revenant
Admiral
*****
Posts: 2408



View Profile WWW Email
« Reply #9 on: April 25, 2016, 02:44:12 PM »

Update Starsector.
Logged

Dark.Revenant
Admiral
*****
Posts: 2408



View Profile WWW Email
« Reply #10 on: May 21, 2016, 01:39:00 PM »

Routine update.


Download GraphicsLib 1.0.2
Also known as ShaderLib.
Download Mirror
(Requires LazyLib 2.1)

Edit GRAPHICS_OPTIONS.ini to enable or disable GraphicsLib features!



We also recommend Version Checker to notify you when an update is ready.

Warning: Make sure Starsector is GPU-Accelerated!
Mobile or integrated chipsets are known to have serious graphical artifacts!

Having problems?  Visit the Mod Troubleshooting Guide!



Change Log
1.0.2
- General compatibility update
Logged

ApetureUnicorn
Ensign
*
Posts: 25


View Profile Email
« Reply #11 on: July 13, 2016, 08:29:43 PM »

is there a way of installing this or using this on a mac?
all the other mods that work are folders but when i download this it just comes up with a page.
i cant find a way to make it work, constant crashes
eg. Blackrockdrive is a blue folder with data and stuff inside it while graphicslib is a page and when opened with console it comes up with an alien language
(i2Àn¦\tÄÖ?]?W[Øvåÿ¨?4ÏÑ@IßÓÜ»>JÓ?e?Æ¿Z×E&mj5ÃIƬûì?P(gc³bì9Õ5÷àô_^Æ)
?PLZ HELP
 Huh Huh Huh
Logged
Soren
Admiral
*****
Posts: 506


Totally Not Omega


View Profile
« Reply #12 on: July 13, 2016, 10:12:29 PM »

is there a way of installing this or using this on a mac?
all the other mods that work are folders but when i download this it just comes up with a page.
i cant find a way to make it work, constant crashes
eg. Blackrockdrive is a blue folder with data and stuff inside it while graphicslib is a page and when opened with console it comes up with an alien language
(i2Àn¦\tÄÖ?]?W[Øvåÿ¨?4ÏÑ@IßÓÜ»>JÓ?e?Æ¿Z×E&mj5ÃIƬûì?P(gc³bì9Õ5÷àô_^Æ)
?PLZ HELP
 Huh Huh Huh

Other Mac user here - you probably don't have a utility that opens .7z files. I recommend this one - worked just fine for precisely this file.
Logged

"The law, in its majestic equality, forbids the rich as well as the poor to sleep under bridges, to beg in the streets, and to steal bread."
facc00
Lieutenant
**
Posts: 83



View Profile Email
« Reply #13 on: August 03, 2016, 08:09:37 PM »

Sorry if this has already been answered but some faction mods require shaderlib and on the mod index it states [0.7.2a] ShaderLib by Dark.Revenant (outdated, use GraphicsLib instead unless you're still running Starsector+)

So I have graphicslib installed do all mods that need shaderlib now need to say use graphicslib?


Thanks


In example going down the list getting my game modded

http://fractalsoftworks.com/forum/index.php?topic=4018.0
Topic: [0.7.2a] Blackrock Drive Yards v0.8.5 (04.04.2016)

DOWNLOAD BLACKROCK FOR STARSECTOR 0.7.2a!
Mod version 0.8.5
Changelog
NOTE: Requires ShaderLib by DarkRevenant. Download here.
Also requires LazyLib
Compatible with Starsector+

Thanks for the clarification.
Logged
Orikson
Captain
****
Posts: 280

Always Seen on Discord


View Profile Email
« Reply #14 on: August 03, 2016, 08:23:44 PM »

Sorry if this has already been answered but some faction mods require shaderlib and on the mod index it states [0.7.2a] ShaderLib by Dark.Revenant (outdated, use GraphicsLib instead unless you're still running Starsector+)

So I have graphicslib installed do all mods that need shaderlib now need to say use graphicslib?


Thanks


In example going down the list getting my game modded

http://fractalsoftworks.com/forum/index.php?topic=4018.0
Topic: [0.7.2a] Blackrock Drive Yards v0.8.5 (04.04.2016)

DOWNLOAD BLACKROCK FOR STARSECTOR 0.7.2a!
Mod version 0.8.5
Changelog
NOTE: Requires ShaderLib by DarkRevenant. Download here.
Also requires LazyLib
Compatible with Starsector+

Thanks for the clarification.

GraphicsLib is the new successor of ShaderLib. All mods that previously used ShaderLib should still be compatible with GraphicsLib (due to the intentional backwards compatibility Dark.Revenant has kindly included) or has made adjustments to fit (if any).

The description on the main page that says "Requires ShaderLib" is not wrong, but it isn't right either. Why those requirements hasn't been updated? Well, you know what I'm implying. (No offence intended, please don't blow my ship up!)
« Last Edit: August 03, 2016, 08:28:06 PM by Mr. K » Logged

"A story teller and a trader. Tell me your tales and I'll tell you no lies."

Come join the Starsector Fan Chat! It's decently active.

Link: https://discord.gg/eb5UC
Pages: [1] 2 3 ... 5
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2006-2011, Simple Machines
Simple Audio Video Embedder
Valid XHTML 1.0! Valid CSS!