HaArLiNsH

[1.3]TextureReplacerReplaced v0.3

167 posts in this topic

2 hours ago, Sigma88 said:

EDIT2:

I've added the loading times from my old version but with the start moved at "MainMenu.Awake"

there doesn't seem to be any loading issues so it's probably something that has to do with the shader code, I don't know how that works, and I don't even know if an higher loading time has to be expected so I defer further testing to @HaArLiNsH and @Ger_space
 that are certainly more familiar with the code :D

I haven't tested this version with any heavy installations (planet packs + kopernicus tend to be really heavy at the MainMenu.Awake and MainMenu.Start so it wouldn't surprise me if there were some issues there)

but I don't have time now to test that, so it will have to wait

I'll have a look what is going wrong there. The shader loader compiles all shaders at once, but this should not be not such an large issue. 1-2 seconds had been expected, but this is later on regained by a faster loading of the other scenes, where the shaders are used. Perhaps I messed something up, with one of my latest changes, but my reflective branch of TR didn't show this problem, so I'm a bit confised, what I have messed up.

Are you using OpenGL or DX9 or DX11?

 

Share this post


Link to post
Share on other sites
5 hours ago, Sigma88 said:

@HaArLiNsH

 

I've added the loading times from my old version but with the start moved at "MainMenu.Awake"

there doesn't seem to be any loading issues so it's probably something that has to do with the shader code, I don't know how that works, and I don't even know if an higher loading time has to be expected so I defer further testing to @HaArLiNsH and @Ger_space
 that are certainly more familiar with the code :D

I haven't tested this version with any heavy installations (planet packs + kopernicus tend to be really heavy at the MainMenu.Awake and MainMenu.Start so it wouldn't surprise me if there were some issues there)

but I don't have time now to test that, so it will have to wait

That's a nice test that really looks like the result I was referring to. And yeah this is at the black where there is no loading bar, I can see the progress in realtime because I have an external monitoring screen (RAM, GPU, fps, cpu, etc)

I don't know the shader stuff, @Ger_space is the shader expert :) That's why I let him do these changes as he seems to know a lot more than me on the subject.

I'm also learning about this MainMenu.Awake and MainMenu.Start :)

10 sec seems a bit long just to load the shaders

I tried a stress configuration,  the last master build + 2 copy of my TRR_SuitGuide (one in suits & one in default), each pack contains 55 .png at 4096x4096 (so we go to 110 .png )  and I got the nice windows freeze nice popup "would like to wait for the application to finish or shut it down". I waited and all loaded normally, so even if it takes time, it don't crash :)

edit (last response came wile I was typing)  :  I use DX11 I guess as I didn't configured this and I'm on win 10

 

 

And FYI, the master branch is clearly not ready, but as TR still works for the 1.3, we don't need to rush.

- I still need to fix my 3 states (log spamming an error because of my check system to see if we are at suborbital for the EVAground suit),

- we need to fix the veteran state,

- we need to finish the new shader system,

- I still need to look at the skybox and navball,

- we need to detach the folders suits,heads, skybox and so on from the TRR folder

- EDIT : the helmet collar removal is a dream that seems to be achievable too :wink:

I'm sure there are things I forgot :)

 

Edited by HaArLiNsH

Share this post


Link to post
Share on other sites
2 minutes ago, Ger_space said:

I'll have a look what is going wrong there. The shader loader compiles all shaders at once, but this should not be not such an large issue. 1-2 seconds had been expected, but this is later on regained by a faster loading of the other scenes, where the shaders are used. Perhaps I messed something up, with one of my latest changes, but my reflective branch of TR didn't show this problem, so I'm a bit confised, what I have messed up.

Are you using OpenGL or DX9 or DX11?

 

I was getting errors of missing shaders in the logs, one was called something like "KSP/TR/visor" or something like that

 

not sure about opengl and dx, I just run the game without any modifications on win10 so no opengl I would suppose

Share this post


Link to post
Share on other sites
Just now, Sigma88 said:

I was getting errors of missing shaders in the logs, one was called something like "KSP/TR/visor" or something like that

 

not sure about opengl and dx, I just run the game without any modifications on win10 so no opengl I would suppose

you can find these 2 files in the master branch

https://github.com/HaArLiNsH/TextureReplacerReplaced/tree/master/GameData/TextureReplacerReplaced/Shaders

@Ger_space : We only need these 2 files and get rid of the old ones ?

Share this post


Link to post
Share on other sites
2 minutes ago, Sigma88 said:

I was getting errors of missing shaders in the logs, one was called something like "KSP/TR/visor" or something like that

 

not sure about opengl and dx, I just run the game without any modifications on win10 so no opengl I would suppose

Then you use DX9.

Oh dear, when you have this error. then the shader is not loaded into your system. I'll check this later and report back. I don't know whats the current problem.

 

3 minutes ago, HaArLiNsH said:

you can find these 2 files in the master branch

https://github.com/HaArLiNsH/TextureReplacerReplaced/tree/master/GameData/TextureReplacerReplaced/Shaders

@Ger_space : We only need these 2 files and get rid of the old ones ?

yes this are the files.

Share this post


Link to post
Share on other sites

@HaArLiNsH I was using that folder, which means the code to get them could be wrong? not sure

the error was saying "KSP/TR/visor"  is that the correct name?

usually when KSP loads stuff (mainly images) from GameData the name is the location of the file, so an image stored in

KSP_INSTALL/GameData/MyMod/texture.png

would load with the name "MyMod/texture"

 

1 minute ago, Ger_space said:

Oh dear, when you have this error. then the shader is not loaded into your system. I'll check this later and report back. I don't know whats the current problem.

don't worry about this now, if you are still working on it it's probably best that you get it to work 100% on your system and then share what you have and see if it works. there's no point in testing something which is not ready yet (I was just curious to see if there was a delay, but it's probably caused by the fact that it's still an unfinished "product")

Share this post


Link to post
Share on other sites
1 minute ago, Sigma88 said:

@HaArLiNsH I was using that folder, which means the code to get them could be wrong? not sure

the error was saying "KSP/TR/visor"  is that the correct name?

usually when KSP loads stuff (mainly images) from GameData the name is the location of the file, so an image stored in

KSP_INSTALL/GameData/MyMod/texture.png

would load with the name "MyMod/texture"

 

it is the self-given identifier of the shader, so it is correct. It's not a path. (think of categories)

 

4 minutes ago, Sigma88 said:

@HaArLiNsH I was using that folder, which means the code to get them could be wrong? not sure

the error was saying "KSP/TR/visor"  is that the correct name?

usually when KSP loads stuff (mainly images) from GameData the name is the location of the file, so an image stored in

KSP_INSTALL/GameData/MyMod/texture.png

would load with the name "MyMod/texture"

 

could you please replace the reflective shader file with the one from my TR package? I might have messed that up.

Share this post


Link to post
Share on other sites
1 minute ago, Ger_space said:

it is the self-given identifier of the shader, so it is correct. It's not a path. (think of categories)

ok, then probably it's something more complicated than I thought :)

Share this post


Link to post
Share on other sites
20 minutes ago, Ger_space said:

could you please replace the reflective shader file with the one from my TR package? I might have messed that up.

The OpenGL.bundle and DirectX.bundle that we can find in the v0.2 release ? or the one before ?

 

edit : I've put back the opengL and directX in the master branch, I think there was a third but I can't find it :)

Edited by HaArLiNsH

Share this post


Link to post
Share on other sites
9 minutes ago, HaArLiNsH said:

The OpenGL.bundle and DirectX.bundle that we can find in the v0.2 release ? or the one before ?

 

edit : I've put back the opengL and directX in the master branch, I think there was a third but I can't find it :)

no, these files are not loaded anymore. I was talking about the TR_Reflective_something .ksp file from the TR thread. 

Share this post


Link to post
Share on other sites
10 minutes ago, Ger_space said:

no, these files are not loaded anymore. I was talking about the TR_Reflective_something .ksp file from the TR thread. 

this one ?

I have also a question ,I changed all the TextureReplacer to TextureReplacerReplaced except of course the TextureReplacer class name , but I still I have this one

foreach (UrlDir.UrlConfig file in GameDatabase.Instance.GetConfigs("TextureReplacer"))

at line 62 of TextureReplacer.cs on the master branch and I don't know if I can/need to change it or if it makes reference to the class itself

Edited by HaArLiNsH

Share this post


Link to post
Share on other sites
6 minutes ago, HaArLiNsH said:

this one ?

I have also a question ,I changed all the TextureReplacer to TextureReplacerReplaced except of course the TextureReplacer class name , but I still I have this one


foreach (UrlDir.UrlConfig file in GameDatabase.Instance.GetConfigs("TextureReplacer"))

at line 62 of TextureReplacer.cs on the master branch and I don't know if I can/need to change it or if it makes reference to the class itself

not this file. I'll test this later on my own. I'll also add some profiling stuff so I can see exactly where the time is wasted and what is going on. 

 

KSP API for Getconfigs  This is the identifier in the config files. you need to rewrite all config files. if you change this.

Edited by Ger_space

Share this post


Link to post
Share on other sites
10 minutes ago, Ger_space said:

not this file. I'll test this later on my own. I'll also add some profiling stuff so I can see exactly where the time is wasted and what is going on. 

Last try :)

this one ? tr_reflective_emissive_alpha.ksp for the your version 1.3b ? :) 

 

anyway, take your time, do your stuff on your side :)  I'm trying to fix the log spam I made, I 'm sure its stupid but you know .. :)

Edited by HaArLiNsH

Share this post


Link to post
Share on other sites
13 minutes ago, HaArLiNsH said:

Last try :)

this one ? tr_reflective_emissive_alpha.ksp for the your version 1.3b ? :) 

 

anyway, take your time, do your stuff on your side :)  I'm trying to fix the log spam I made, I 'm sure its stupid but you know .. :)

yes, this file. :wink:

No worries about log spamming. I it always good to know what the code does and at wich line it crashes. (now I need to get back to work)

Share this post


Link to post
Share on other sites
On 6/13/2017 at 11:04 AM, Ger_space said:

as its collider is also disabled. 

This, My kerbals get stuck because their non-existent helmets are huge!

1 person likes this

Share this post


Link to post
Share on other sites
1 minute ago, snkiz said:

This, My kerbals get stuck because their non-existent helmets are huge!

:)

Expect this to stay as it is, I really don't want to mess with the helmet removal :)

Share this post


Link to post
Share on other sites
1 minute ago, HaArLiNsH said:

:)

Expect this to stay as it is, I really don't want to mess with the helmet removal :)

No sweat I just blurted that out. I haven't got to the end of the thread.

Share this post


Link to post
Share on other sites

I had me smiling because I laugh every time this happen to my kerbals when I make them make jump and crash to test the textures :)

Edited by HaArLiNsH

Share this post


Link to post
Share on other sites

@Sigma88 & @HaArLiNsH

I'm able to reproduce the issues with the loading time. It occurs every time when you don't force KSP to run in DirectX11 mode (which I do by every time, because it is way faster)

 

DirectX9 (KSP default) 
$ grep TR output_log.txt  | grep Stop
TR: Stopwatch: "Shader" elapsed time: 00:00:05.3970199
TR: Stopwatch: "Awake" elapsed time: 00:00:05.4038874
TR: Stopwatch: "Start" elapsed time: 00:00:00.4092853


DirectX11 (KSP_x64.exe -force-d3d11)
$ grep TR output_log.txt  | grep Stop
TR: Stopwatch: "Shader" elapsed time: 00:00:00.5496092
TR: Stopwatch: "Awake" elapsed time: 00:00:00.5570853
TR: Stopwatch: "Start" elapsed time: 00:00:00.4115550

looks nearly the same except, that the decimal dot is at an other place, so DirectX11 warms up all shaders 10 times faster...

Share this post


Link to post
Share on other sites

@HaArLiNsH

you can delete the  following line from TextureReplacer.cs. The shaders also be loaded without it, so when I tested it first I might messed something up.

from: internal void LoadShaders()

Shader.WarmupAllShaders();

^^^^^^delete or comment this out this line ^^^^^^

I have messed up my local repository and I don't want to resync it for just one line

Edited by Ger_space

Share this post


Link to post
Share on other sites

How soon do you think the reflection shader fixes will make it into the official release? I ask because if it's within the week I can update WindowShine before going on vacation :)

Share this post


Link to post
Share on other sites
11 minutes ago, Avera9eJoe said:

How soon do you think the reflection shader fixes will make it into the official release? I ask because if it's within the week I can update WindowShine before going on vacation :)

The code is already merged into the TRR master tree and I'll push in a few minutes a small update to the shader files itself.

Old reflections

C64fW4v.png

 

new reflections:

vP1QG7E.png

 

The reflections will now use a bit of the color of the underlying material (while not physically correct) I think it looks better.

the sceenshot are from TRR. So this part is finished.

 

2 people like this

Share this post


Link to post
Share on other sites
3 minutes ago, Ger_space said:

The code is already merged into the TRR master tree and I'll push in a few minutes a small update to the shader files itself.

Old reflections

C64fW4v.png

 

new reflections:

vP1QG7E.png

 

The reflections will now use a bit of the color of the underlying material (while not physically correct) I think it looks better.

the sceenshot are from TRR. So this part is finished.

 

That looks even better :) I'll update WindowShine today or tomorrow :D

Share this post


Link to post
Share on other sites
1 minute ago, Sigma88 said:

@Ger_space are there any downsides to force DX11 ?

as from KSP 1.2.0 and later, no. except that I have a better framerate.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now