Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.98a is out! (03/27/25)

Author Topic: [0.98/0.97] Box Util 1.3.5  (Read 10362 times)

Mycophobia

  • Commander
  • ***
  • Posts: 118
    • View Profile
[0.98/0.97] Box Util 1.3.5
« on: March 31, 2025, 12:05:45 AM »

BoxUtil
Made by Shiozakana

Safe to add mid game, NOT safe to remove from a save IF YOU HAVE MADE A SAVE with it on.

0.98 Ver Download Link
https://github.com/MycophobiaSC/BoxUtill_Temp/releases/download/0.98-1.3.5/BoxUtil.-1.3.5.zip
0.97 Version Download Link
https://github.com/MycophobiaSC/BoxUtill_Temp/releases/tag/0.97

BoxUtil is developed based on OpenGL 4.2 and uses various core functions of OpenGL 4.2-4.3

CN sector user manual (In Chinese)
https://www.fossic.org/thread-15746-1-1.html

Based around Instantiated rendering and GPU calculation, it allows for more efficient rendering option of higher quality, while still being usable on most player's setups.

For Modders - This mod provide various method for static and instance class, and provides parent API class where possible. It provides various simple to use rendering setting and further customization or rewrite methods. Together with several management class to allow for centralized data processing and rendering.

For players- Currently BoxUtil provide two types FXAA anti-aliasing option with different quality and spec requirement, this allows fairly good graphic experience when the base game anti-alising is turned off after using GraphicsLib.

Main Functions

Primary Rendering:   org.boxutil.units.standard.entity
Main class of BoxUtil, contains main rendering methods of the mod. See org.boxutil.base.api.RenderDataAPI

CommonEntity   Mostly allows rendering of 3D Objects in the WaveFrontOBJ format; haves a built in light source but does not include shadows. supports Texture settings.
SpriteEntity   Mostly allows flat texture rendering; similar to Sprite API, support Tiles and Texture settings.
CurveEntity   Mostly allows for rendering of curved beam effects; supports texture settings.
SegmentEntity   Branched version of CurveEntity, with different render and setting methods.
TrailEntity Renders a series of trails or straight lines; supports texture settings.
FlareEntity   Renders flash effects; similar to MagicLibs MagicLensFlare.
TextFieldEntity   Renders textfield, similar to LazyLibs LazyFont, supports italic, underline, crossout and inversion setings, and supports up to four textfields being rendered together.
DistortionEntity   Renders distortions; similar to GraphicsLibs DistortionAPI.


Simple Rendering:  org.boxutil.units.standard.misc
Functions similar to the base game, the rendering classes that require VAO supports require OpenGL 3.1, rest requires only OpenGL 2.0; Helper functions for VAOs can be found under org.boxutil.base.api.SimpleVAOAPI

ArcObject   Renders curves/fans/elipses at any location.
AtlasSprite   SpriteAPI that saves Vram, implements vanilla SpriteAPI class. Usually used to replaced default ship sprites.
CurveObject Curve rendering that is compatible with lower OpenGL versions, supports basic texture/color settings.
TexArcObject   Renders textured curves/fans/elipses at any location.
NumberObject   Renders integer/float numbers at any location.
UIBorderObject   Renders vanilla style UI at any location.
PointObject   Renders a point object (requires VAO support).
PublicFBO a public FBO that is not used by BoxUtil, used to prevent duplicate FBOs by various mods; can call ShaderCore to obtain an instance. A null check should be ran first before advance.
LineObject    Renders a line object (requires VAO support).
QuadObject    Renders a quad object (requires VAO support).

Resource Manager: org.boxutil.manager
Manages various resources for centralized rendering.

CampaignRenderingManager: Manage campaign map rendering.
CombatRenderingManager: Manage combat rendering.
ModelManager: Load WaveFrontOBJ 3D model and save them.
ShaderCore: Save BoxUtil shader programs and other similar OpenGL objects.

Utility Tools: org.boxutil.util
Provides easy ways to implement specific OpenGL related functionalities.

CalculateUtil: Functions to easily calculate data, such as vectors.
CommonUtil: Common rendering methods and other ungrouped methods.
CurveUtil: Methods for curve related math and simple curved beam generation.
RenderingUtil: Helper functions for creation of render entities.
ShaderUtil: Methods for cration of shader programs and other OpenGL related operations.
TransformUtil: Matrix creation and calculation, mostly used for position/facing/resizing of main render entities.
TrigUtil: Some trig calculation methods.


Notes
To use most of the functionalitises ofBoxUtil, you must have a graphics card that support OpenGL 4.2 . Calculating data of Instantiated rendering on GPU will require at least OpenGL 4.3 support.

You can check the support of your graphics card using softwares like GPU-Z. For MacOS, you most likely cant use OpenGL functionalities of higher versions.

If you want to change games UI zoom, please try to change them in increments of 50%.


Notes
For most function of BoxUtil, you must have a graphic card that support OpenGL 4.2 calculating data of Instantiated rendering on GPU will require at least OpenGL 4.3 support.

You can check your graphic cards using softwares like GPU-Z. For MacOS, most likely they would not be able to use OpenGL function of higher version.

If you would need to change game UI zoom, please try to change them in increments of 50%.

Settings
The mod comes its own config panel on the bottom left, which include two icons, the left one governs basic functions and the right one governs OpenGL4.3 functions.

Normally, if the icon is green, it is usable, if it is red, it is not operational. Clicking them opens a setting panel.

Global setting option requires a full restart of the game to function, rest should work after saving the changes. If a setting is red, it is not functional given your current spec.


TL Note
Unfortunately for a dedicated lib like this, most of the more complex function are too complicated for me to understand, let alone translate, so most detailed function explanation may have some mistakes. I have tried my best to outline the main points of the original post, and an english Java doc is enclosed that could help. However, if anyone can provide a better overview, I'd greatly appreciate it.

Updates
Spoiler
Ver 1.3.5
See github for log

Ver 1.3.4
See Github for log

Ver 1.3.3
Incorpated earlier CN update 1.3.0-1.3.3, see github for log

Ver 1.2.3
Adjusted AtlasSprite for 0.98a_RC7

Added Public FBO ShaderCore
Added following new methods:
PublicFBO getPublicFBO();   
boolean isPublicFBOValid();   
void refreshPublicFBO();
[close]
« Last Edit: June 05, 2025, 10:05:03 PM by Mycophobia »
Logged

Broeckelmann

  • Ensign
  • *
  • Posts: 4
    • View Profile
Re: [0.98/0.97] Box Util 1.2.2
« Reply #1 on: April 03, 2025, 02:34:45 AM »

As nice as it is  ;D

It smashes my fps too hard (I just have to many factions and stuff to calculate, so I am CPU bottlenecked).

Might have wanted to mention that you can't remove it from a save XD.
Logged

Kesh

  • Ensign
  • *
  • Posts: 28
    • View Profile
Re: [0.98/0.97] Box Util 1.2.2
« Reply #2 on: April 04, 2025, 07:23:31 AM »

As nice as it is  ;D

It smashes my fps too hard (I just have to many factions and stuff to calculate, so I am CPU bottlenecked).

Might have wanted to mention that you can't remove it from a save XD.

you can disable it in settings.
Logged

SSchorik0101

  • Ensign
  • *
  • Posts: 40
    • View Profile
Re: [0.98/0.97] Box Util 1.2.3
« Reply #3 on: April 10, 2025, 01:04:49 PM »

Is the intended effect to give the game and sprites an almost oil paint look? (it looks nice)
Also I have to re-apply the settings periodically because the settings don't stay applied and the game reverts back to the default appearance.
Logged

Aegir86

  • Ensign
  • *
  • Posts: 20
    • View Profile
Re: [0.98/0.97] Box Util 1.2.3
« Reply #4 on: April 10, 2025, 01:23:06 PM »

this is magical btw. I can zoom in on my ships and they don't look like smashed up pixels anymore.

Major props for the work here.
Logged

Mycophobia

  • Commander
  • ***
  • Posts: 118
    • View Profile
Re: [0.98/0.97] Box Util 1.2.3
« Reply #5 on: May 13, 2025, 02:58:53 AM »

New ver 1.3.3 updated
Logged

Mycophobia

  • Commander
  • ***
  • Posts: 118
    • View Profile
Re: [0.98/0.97] Box Util 1.3.4
« Reply #6 on: May 30, 2025, 02:55:44 AM »

New Version 1.3.4 updated, a user manual added (In chinese, too technical for me to really understand to translate properly, if anyone wants to help feel free to let me know)
Logged

MakeTheFuture

  • Lieutenant
  • **
  • Posts: 82
    • View Profile
Re: [0.98/0.97] Box Util 1.3.4
« Reply #7 on: May 30, 2025, 11:15:15 PM »

Just to clarify, once this mod is installed, it doesn't override or overload the inbuilt game render to add better rendering when AA is disabled? So, users who run without AA enabled should run this for better visuals and frame rate?

Or only extends the render to add functionality for other mod authors to use? So, no point for any players to install this until it becomes a dependency for other mods?

Do you have the link to the Chinese user manual? Even if its the link to the Chinese forum.
Logged

ShioZakana

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: [0.98/0.97] Box Util 1.3.4
« Reply #8 on: June 01, 2025, 03:49:46 AM »

Just to clarify, once this mod is installed, it doesn't override or overload the inbuilt game render to add better rendering when AA is disabled? So, users who run without AA enabled should run this for better visuals and frame rate?

Or only extends the render to add functionality for other mod authors to use? So, no point for any players to install this until it becomes a dependency for other mods?

Do you have the link to the Chinese user manual? Even if its the link to the Chinese forum.

BoxUtil at current version more like a graphics engine / image processing or math lib to serve mod author; the mod built-in FXAA is a post-processing AA, will not override or overload any render, only cost a bit GPU performance then fix some aliasing when AA is enabled.

A link of Chinese modding manual is in this topic, the topic in Chinese forum(FOSSIC) link is here https://www.fossic.org/thread-11886-1-1.html
Logged

Mycophobia

  • Commander
  • ***
  • Posts: 118
    • View Profile
Re: [0.98/0.97] Box Util 1.3.5
« Reply #9 on: June 05, 2025, 10:05:36 PM »

Bump for 1.35 Update

Fixed some rendering display and adjusted rendering method:

New Methods for MaterialData :
boolean isIgnoreIllumination();
void setIgnoreIllumination(boolean);

Discontinued methods for MaterialRenderAPI :
byte getDrawMode();
void setDrawMode(byte);

Discontinued methods for MaterialData:
SpriteAPI getAO();
int getAOID();
void setAO(SpriteAPI);
void setAO(int);
Logged