Jump to content

[1.7] KVV - Kronal Vessel Viewer = Exploded ship view


linuxgurugamer
 Share

Recommended Posts

  • 3 weeks later...

So … i quickly and manually installed this mod for the current 1.7.X KSP, as CKAN labels it as incompatible. Still seems to work at first glance. Are there issues i can't see or would just the CKAN metadata need an update :blush:?

Edited by eldeifo
Link to comment
Share on other sites

  • 2 weeks later...
On 7/15/2019 at 1:44 PM, eldeifo said:

So … i quickly and manually installed this mod for the current 1.7.X KSP, as CKAN labels it as incompatible. Still seems to work at first glance. Are there issues i can't see or would just the CKAN metadata need an update :blush:?

Nothing that I know of, but just makes sense to install the latest version.  Will also eliminate the incompatible messages

Link to comment
Share on other sites

  • 3 weeks later...
5 hours ago, TheChizzaberry81 said:

Love the mod so far. I've installed and it's running fine, but is it possible to get the edge detect and blueprint options working? The only options that show up for me are Color Adjust, FXAA and Part Config.

Unfortunately no

Link to comment
Share on other sites

  • 1 month later...

 

Unfortunately those shaders don't work and I got swamped on assisting LGG to get it going. It has to do with how it renders shaders. I can get it a blueprint shader to work within unity, I just need to tackle the code. Here's a result in unity:

 

7r1v42K_d.jpg?maxwidth=640&shape=thumb&f

Edited by sirkut
Test
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

Hello linuxgurugamer, thanks for putting so much work into keeping this addon up, it's very cool!

I just recently updated to 1.8, and I have both other compatibility mods installed to the latest date, but for some reason when I open up KVV the entire screen is pink. I still see the mod affecting the ship and movie the parts around, such as exploding the parts out, but for some reason the screen remains a bright pink. I'm wondering if this is because the update, but I'm not sure.

I would really appreciate it if you could assist in fixing this problem, I'd love to use KVV again! 

Best wishes!

Link to comment
Share on other sites

18 minutes ago, SirBerry said:

Hello linuxgurugamer, thanks for putting so much work into keeping this addon up, it's very cool!

I just recently updated to 1.8, and I have both other compatibility mods installed to the latest date, but for some reason when I open up KVV the entire screen is pink. I still see the mod affecting the ship and movie the parts around, such as exploding the parts out, but for some reason the screen remains a bright pink. I'm wondering if this is because the update, but I'm not sure.

I would really appreciate it if you could assist in fixing this problem, I'd love to use KVV again! 

Best wishes!

That's because KSP 1.8 now defaults to DX11 and KVV only works in DX9.

Link to comment
Share on other sites

On 11/1/2019 at 6:51 AM, Friznit said:

That's because KSP 1.8 now defaults to DX11 and KVV only works in DX9.

That was the case in previous versions of KSP (to be more correct, it only worked with DX9 and OpenGL), but it looks like the Unity update has changed that:

Spoiler

tYCVS4t.png

There's a lot I still need to test and refine, but it is safe to say that Kronal Vessel Viewer has a future!

Link to comment
Share on other sites

So, that screenshot up there was made when I just had the part shaders bundled.  When I then bundled the color adjustment and FXAA shaders, I got a black screen, same as when I tried making KVV work with DX11 back in KSP 1.7 and before, so maybe that was the problem all along.  I don't understand shaders well enough to know what to change about them -- Unity seems to like them well enough -- so for now I've disabled those options.  I miss the color adjustment sliders, but with the freely-available image editing tools like GIMP out there, I wouldn't say they're blocking features.

In case anyone knows better what DX11 wants out of a shader, here it is in its current (not working) form:

// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'

Shader "Kronal/Color Adjust" {
Properties {
	_MainTex ("Base (RGB)", Rect) = "white" {}
	_InBlack ("Black", Range(0.0, 1.0)) = 0.0
	_InWhite ("White", Range(0.0, 1.0)) = 0.33
	_InGamma ("Gamma", Range(0.0, 5.0)) = 0.75
}

SubShader {
	Pass {
		ZTest Always Cull Off ZWrite Off
		Fog { Mode off }

CGPROGRAM
	/*
	_OutBlack ("Output Level: Black", Range(0.0, 1.0)) = 0.0
	_OutWhite ("Output Level: White", Range(0.0, 1.0)) = 1.0
	*/

#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest 
#include "UnityCG.cginc"

uniform sampler2D _MainTex;
uniform float _InBlack;
uniform float _InGamma;
uniform float _InWhite;
/*
uniform float _OutBlack;
uniform float _OutWhite;
*/

struct uvinfo {
	float4 pos : POSITION;
	float2 uv : TEXCOORD0;
};

uvinfo vert( appdata_img v )
{
	uvinfo i;
	i.pos = UnityObjectToClipPos (v.vertex);
	i.uv = MultiplyUV( UNITY_MATRIX_TEXTURE0, v.texcoord );
	return i;
}

/*
inline half3 rgb2hsv(half4 c)
{
    //float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
    half4 K = half4(0.0, -0.33333333, 0.66666667, -1.0);
    half4 p = lerp(half4(c.bg, K.wz), half4(c.gb, K.xy), step(c.b, c.g));
    half4 q = lerp(half4(p.xyw, c.r), half4(c.r, p.yzx), step(p.x, c.r));

    float d = q.x - min(q.w, q.y);
    float e = 1.0e-10;
    return half3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}

inline half3 hsv2rgb(half3 c)
{
    //float4 K = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
    half4 K = half4(1.0, 0.66666667, 0.33333333, 3.0);
    half3 p = abs(frac(c.xxx + K.xyz) * 6.0 - K.www);
    return c.z * lerp(K.xxx, saturate(p - K.xxx), c.y);
}
*/

half4 frag (uvinfo i) : COLOR
{
	half4 original = tex2D(_MainTex, i.uv);
	float dIn = (_InWhite - _InBlack);
	return half4(
		pow((original.r - _InBlack) / dIn, _InGamma),
		pow((original.g - _InBlack) / dIn, _InGamma),
		pow((original.b - _InBlack) / dIn, _InGamma),
		original.a) /** (_OutWhite - _OutBlack) + _OutBlack*/;
}
ENDCG
		}
	}
	Fallback off
}

I've got some other changes (fairings, KAS, spelling, maybe localization) in the works as well.

Link to comment
Share on other sites

  • 2 weeks later...
On 11/9/2019 at 8:30 AM, Kerbas_ad_astra said:

That was the case in previous versions of KSP (to be more correct, it only worked with DX9 and OpenGL), but it looks like the Unity update has changed that:

  Hide contents

tYCVS4t.png

There's a lot I still need to test and refine, but it is safe to say that Kronal Vessel Viewer has a future!

Did you make this screenshot under KSP 1.8.X ?

Link to comment
Share on other sites

10 hours ago, BryNov said:

If you disable the color filters and the FXAA shaders, then it should work on 1.8.1. Some textures like the decouplers are black though. 

Within the UI or by modifying the .shader files ?

Here is what I get.

191123041927804696.png

 

Purple squares are Nebula Decals PNG.

Link to comment
Share on other sites

15 minutes ago, DarkNounours said:

Within the UI or by modifying the .shader files ?

Here is what I get.

191123041927804696.png

 

Purple squares are Nebula Decals PNG.

Yeah like I said, some textures still don't work properly. Stock decouplers and decal stickers don't play nicely. Parachutes and one or two engines don't work either.

Edited by BryNov
Most custom decouplers do work for some reason.
Link to comment
Share on other sites

  • 1 month later...

Hello @Jestersage, it's not against the rules to ask for an update if it is polite and not repetitive however the substantial changes to KSP's underlying programming introduced in 1.8 have created a large workload for our excellent modding community so please be patient as @linuxgurugamer probably has the greatest burden of all our great mod contributors (180 mods at my last count - probably more now).

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...