Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - SleepKiller

Pages: [1] 2 3 ... 129
SWBF2 Modding / Re: Where can I find the BattlefrontII.exe file
« on: January 17, 2018, 01:20:50 PM »
If you need the executable you'll probably need the whole game as well, so buy it on GoG https://www.gog.com/game/star_wars_battlefront_ii?

But I'm pretty sure I've already said this but for porting maps to the PS2 you don't need the PC version of the game. You can munge maps just fine without it.

Star Wars Battlefront II / Re: Where do I get a map editor?
« on: January 06, 2018, 09:11:56 PM »
From your original message I gather you tried to run 'BF2_Modtools.exe'? That executable is a special build of the PC version of the game for debugging mods. It needs to go beside the game's normal executable to work.

It sounds like you've managed to install the modtools. But it sounds like you still need to read the documentation that comes with them. (I can't check now but I'm pretty sure what I wrote above is explained in Getting Started or something like that.) You should be able to do what you want without owning the game on PC, you just need to study how the modtools and game works a bit more. Reading through the modtools documentation would be a good place to start.

My swbf-unmunge tool can 'explode' an .lvl file into it's discrete chunks, it can then reassemble them into a working lvl file again. It will obviously take care of things like chunk size tags for you, if you want to edit .lvl files directly then that is the best way.

But as Phantom was saying using the modtools themselves is a far better option, with the right configuration they can create custom content for the console version of the game just fine. (I think on Gametoast you can find preconfigured PS2 munge scripts.)

SWBF2 Modding / Re: SleepKiller's SWBFII Shader Patch - WIP
« on: December 27, 2017, 04:32:27 PM »
Maybe just maybe someone...in the future...relef shder for models or atleast terrain texture? :D
Relief mapping requires a depth map as well as a normal map to work. And since any change I make to the normal mapping shader will affect everything in the game it would lead to everything that didn't also have a depth map attached looking not quite as good as regular normal mapping.

However that said there are some ways to potentially hack in custom material types so I will keep adding relief mapping in mind!

SWBF2 Modding / SleepKiller's SWBFII Shader Patch - WIP
« on: December 27, 2017, 06:38:41 AM »
So I've been making thing for SWBFII. This time it is using the shader toolkit I previously and a bit of cheeky DLL hijacking (like ENB or ENB esque mods) to hook into the Direct3D 9 run time. By injecting some metadata into the compiled shaders using a modified version of the compiler I made for the toolkit I can identify and make sense of the game's rendering pipeline in code. All without ever touching the game's executable or any of the ones it shipped with. (Which means as best I can tell this is not in violation of the EULA.)

So what does it do? Well currently it does some basic things that may seem dull but still provide notable improvements to visual fidelity without (hopefully) affecting the game's or any mods art style/direction. 

Borderless Fullscreen Windowed Operation   
Per-Pixel Lighting for Most Things
Per-Pixel Fog for Most Things
Derpy Proof-of-Concept Soft Shadows

Let's go through what some of those do and look like. Ideally I would just have side by side before and after pictures but there is only so much time in a day.

If you go here you can see the soft shadows. The idea here is quite simple, soft shadows usually look nicer than hard edged stencil shadows. (Hard edged stencil shadows could of course be used to great artistic effect in a game's art style and that is a very interesting topic for another time.) In this case I am simply blurring the shadow map before it's sampled this is in no way physically correct and does cause artifacting in certain places. But more importantly than those in most cases in looks nice. Eventually I would like to see about using different techniques like depth aware blurring to boost the quality and remove some of the artifacting. (And maybe even though in some form of Ambient Occlusion as well.)

Next here we have a poor example of the per-pixel lighting. You can see how the lighting more accurately and smoothly interacts with the storm troopers armour by fading at more correct angles. A better example would be on meshes that have low-tessellation (triangle count) over a large area. In those circumstances you can clearly see individual point lights interact correctly with the surface by fading out correctly and smoothly. Shoot a bunch of lasers down a hallway or a sniper bolt at a flat wall to see this effect.

Finally for now here you can see the per-pixel fog. Now I'll level with you, this was implemented primarily out of need. I had to ditch Shader Model 2 in order to get per-pixel lighting globally enabled. This killed the fixed function fog the game used which meant I had to re-implement it in shaders myself.

While doing this I made a couple improvements because A. Why not? and B. It is was easier to. The fog is now range based which means that objects will fade based of their world position not their perspective position, which creates less visual anomalies and is also closer to how fog works. The second is that fog is calculated per-pixel which is more expensive but gives a much nicer result as individual pixels have their fog coverage determined individually based of their distance. You can see this in action in the screenshot.

Some features I would like to look at adding are...

Soft Particles (maybe hard to integrate well into the game, but it would be really nice if they could be)
Improved Water and (maybe) Ocean Effects
Improved Refraction and Blur Quality
Improved HDR Rendering (currently normal maps can have their detail washed out before they're blended with their diffuse maps, some form of improved HDR rendering could fix this)
Order Independent Transparency (fixes things like command posts appearing behind glass)
(maybe) Depth-of-Field
(maybe) Other things I'm forgetting right now...

Be sure to give me your thoughts and say if you're interested in this! Or even better test it out, you'll obviously need an adequately capable GPU to run it. (If you have a DirectX 10/11 Feature Level GPU you are probably fine to give this a go.)

To install the current (early, likely unstable, don't be surprised if it crashes on you) version of it download and extract the contents of the folder below to your GameData folder. You should see dinput8.dll in the same directory as battlefrontII.exe.

Current Version (Backup your core.lvl before installing!)

The source code is of course coming soon. (That is as soon as I clean up the projects structure and write a readme.)

As a heads up, I can imagine some anti-viruses flagging this because of how it works (DLL Hijacking). It isn't, or at least it shouldn't be (if someone hijacked the web page they could trick you into downloading a version that was a virus, although that probably won't happen (but it could (although it probably won't, but still, it could))). Anyway the point is it is (probably) no more likely to be a virus than anything else you download from this site. But since it is a DLL if you're not comfortable installing that beside your game then that is highly understandable and I don't blame you for potentially giving it a pass.

Tech Support / Re: Best PC laptop for modding?
« on: December 26, 2017, 03:47:50 PM »
I've used a Nvidia card (one of these with a custom vendor cooler for those curious) for the past three years and never had a GPU related issue (that I can remember) when running Zero Editor . So I would be inclined to instead say that with you might have issues rather than probably having them.

Although a disclaimer about possible Survivorship bias is needed from me here.

Tech Support / Re: Best PC laptop for modding?
« on: December 19, 2017, 05:10:39 PM »
The playing and modding SWBF is a very low requirement. They're old and not very GPU intensive. I would imagine pretty much any integrated or dedicated GPU from the past few years to do both with flying colours. The requirement of running the other games sets your bar a bit higher.

Intel's recent integrated GPUs can probably do it but go back too far and they definitely won't be able to, at least not while giving a reasonable frame rate in some of them. I'm defining reasonable here as "stays steady at somewhere above 30FPS". So you'll preferably want to get a laptop with a mid-high level dedicated GPU.

Keep an eye out on what memory type the GPU has, if it's DDR3 it's possibly a low-level one and you should keep looking. If it's GDDR5 it may be worth investigating further.

As a starting point nvidia say's the GTX 760M from a few years back can play Skyrim at 1080p/30+FPS at Med/High settings. If that sounds acceptable it could serve as a starting point for your search.

Obviously once you've found a laptop in your price range that seems to fit your requirements I would suggest doing some research to see if you can find benchmarks for it playing one of the games you like.

Released Assets / Re: SWBFII HLSL Shader Toolkit
« on: December 03, 2017, 04:51:09 AM »
I don't have the time personally sorry! Even then I'm not sure you want people to have to install a core.lvl that gives custom shadows designed only for your map. What if they play more than your map in one session? Seems like it may be better to focus on other aesthetic parts of your map.

Released Assets / Re: SWBFII HLSL Shader Toolkit
« on: December 02, 2017, 09:40:44 PM »
Not too hard actually. In the case of the Normal shader you'll just need to edit it's definition file so it only uses the basic shaders. You'll have to follow the instructions for installing the toolkit and getting it to produce a core.lvl.

After that for each state definiton in normal.json you'll be interested in these lines. They control which shader function is used for that state.

      "name": "unlit opaque hardedged",
      "id": 1,

      "passes": [
          "skinned": true,
          "lighting": false,
          "vertex_color": true,
          "texture_coords": true,
          "transform": "position",

These lines here.
          "vertex_shader": "unlit_opaque_vs",
          "pixel_shader": "unlit_opaque_hardedged_ps",

          "vs_target": "vs_2_0",
          "ps_target": "ps_2_0"

If you play around with swapping those values from different states around you should learn how to replicate what you want.

Released Assets / Re: SWBFII HLSL Shader Toolkit
« on: December 01, 2017, 06:44:39 AM »
Yup. Although I don't know why you would want to do that. I'm guessing it would be for performance reasons?

It is probably simpler to force the game to use it's fixed-function rendering path by passing it `/fixedfunction` as a startup argument. It'll accomplish most of the same with a fraction of the work.

Released Assets / Re: SWBFII HLSL Shader Toolkit
« on: November 30, 2017, 07:42:11 PM »
I'm probably going to get this just to see how much fun I can have and to learn... Thanks for the great work!
Messing with things is a lot of fun. I hope you get some enjoyment and knowledge out of it!

Now if only there is someone to create the relef terrain thing for pixel shader 3.0 that will be awesome!!!!Im telling you people even if its not perfect its a big thing for this game.When i heard that such thing is possible here i totally forgot about other shaders,not because i dont need them.For example if its easyer i would absolutely love to get the full reflection water shader moved to....lets say some of the non working shaders like  the "sky" shader.If im not mistaken it was 11
I assume you're referring to the .msh file render types? They're actually a poor representation of SWBFII's material system;  I suspect a lot of them are just layovers from SWBF1. And in SWBF1 I suspect a lot of them are just layovers from it's early development days or from other games.

From a typical game object's perspective (after the munger runs) SWBFII effectively only has two render types. Normal and Refraction. in SWBF1 there were more, but that was because it's rendering system was a lot less unified and actually less powerful.

In regards to a dynamic reflection render type, shaders sadly don't have any say over what they're passed, they simply take input data and output a result. So setting up a custom reflection shader is not possible using just the shaders.

However Refraction (surprisingly) might be able to give you something similar to what you want. To perform it's refraction it get's passed a copy of the game scene rendered at a lower resolution. It then projects this texture onto the model with an offset specified by the bump/normal map. If you use a completely grey value for the bump map (RGB{128, 128, 128}) it should turn off the distortion and create an almost reflection effect.

I'm wondering if we can modify shaders to have pixel point/spot lights emit from nulls/primitives (particularly in vehicles and weapons) that are based accordingly. You'd probably need a reference to the game objects in the scene..

This could make things like a Halloween map that requires the use of a flashlight that actually lights up the buildings that use the shader.

Headlights on vehicles would be so cool!
I've never tested it but if you're using SWBFII you can use -attachlight in a model's option file (Or AttachODF with AttachDynamic in the odf, see the modtools documentation.) and use a spotlight with a projected texture.

As far as doing anything else as you say you would need to control/edit the game's scene in some way, which shaders obviously have no concept of.

Released Assets / SWBFII HLSL Shader Toolkit
« on: November 29, 2017, 04:16:51 AM »
As some of you likely know I've been working on this toolkit for a few weeks now and I feel it is now reasonably complete. It allows you to write shaders for the SWBFII in HLSL and have those shaders target either Shader Model 2.0 or Shader Model 3.0. See the readme for more information.

To install and use this you'll need to download or clone the repository from GitHub. Put it into the root of your BF2_Modtools folder. The folder structure should go BF2_ModTools -> shader_toolkit -> src.  Not BF2_ModTools -> shader_toolkit   -> shader_toolkit -> src. After that you can bootstrap the toolkit or you can download this which is a shader_toolkit folder containing a build folder for you to copy into the shader_toolkit you got from GitHub.

After that simply see the Getting Started in the readme for how to use the tool!

GitHub Repository
Prebuilt Compiler and Pre-extracted Premunged Files
Prebuilt core.lvl containing the New Shaders

SWBF1 Modding / Re: [WIP] Naboo: City of Theed
« on: November 19, 2017, 01:55:31 AM »
Yes well as I said I was ignoring the EU in that argument. Perhaps I worded that wrong and I should have explicitly said I was ignoring anything other than the films. In that context you have still weakened my argument by pointing out a couple things I forgot from the films, but I believe the key points still hold.

SWBF1 Modding / Re: [WIP] Naboo: City of Theed
« on: November 18, 2017, 08:52:32 PM »
Oh dang! I just got out Star Warsed!! You got a point there my friend!
However, since Clone Wars is now Clones vs Droids wouldn't the Clones have control of the palace?  :P
Not necessarily, let's take the situation Sereja's map is providing and explore it. (I'm going to ignore the EU here and go solely off the films.)

So first we know the Republic had many member worlds and unless the Republic had foreknowledge of an attack against a single planet (assuming that planet was of little strategic value) it is likely it would succeed. The Republic hardly would've had the numbers to maintain a substantial garrison on each member planet.

And in the case of Naboo from the films we know their own security forces were no match for "a battle hardened Federation army". Which would suggest that they would not have been able to offer substantial resistance to an even better equipped Separatist army. (Of course it's possible after the first invasion Naboo went through widespread reforms to maintain an army and defences to prevent another invasion from succeeding. Although given they oppose the creation of a galactic army in the second film it seems unlikely, but still it is certainly possible.)

And remember that Naboo was remote enough that the Senate was hesitant to believe accusations that the Trade Federation had invaded and occupied the planet. This backs up that the Separatists could invade the planet (or at least key portions of it, such as it's capital city) before the Republic could respond.

Nute Gunray also (as depicted in Attack of the Clones) held a severe grudge against Padmé Amidala for besting him and it is believable that he would use his influence to have the planet invaded as a form of revenge.

Overall I believe the situation Sereja depicts of the Republic liberating the planet has a greater thematic basis than them defending the planet. (Although the inverse situation is possible to come up with as well of course.)

Tech Support / Re: Bugged transport
« on: November 16, 2017, 05:39:56 PM »
You need to turn AntiAliasing in your video options up to 8x.  That is what the consensus seems to be when this issue comes up with hover vehicles.
Using V-Sync also fixes the problem I believe and may be more acceptable for people that can't use MSAAx8 at an acceptable frame rate.

Pages: [1] 2 3 ... 129