Jump to content

[WIP][1.8.x-1.12.x] Singularity - black hole shaders


blackrack

Recommended Posts

16 hours ago, Oraldo revak said:

Hi there! I have a problem with the mod, I did read the wiki, and copy past to change Kerbin's sun the for the black hole, hoewer it said "And the Sun into a black hole with accretion disk (provided the texture is there)".

How do I set the path to the texture? I have EventHorizon installed for the texture, but how do I explain the CFG file to use a texture of a black hole?

 

Sorry If I'm dumb  but I really need to know how to have the black hole instead the sun.

 

ps: I noticed the "warp space" effect around the sun, but I can't see the black hole.

In that config you copy-pasted there is a path that you have to replace.

Link to comment
Share on other sites

Thank you for answered me. My CFG is like this: https://ibb.co/vLtmKbP

 

However in the game I only have this: https://ibb.co/Y3Lyvw5 . I have the accretion disk but not the "lens" https://ibb.co/W0dyKH5

 

And Kerbin's sun isn't "hide". 

 

I know that's a detail, but I need it to be like this video .

Thank you for your time.

 

Link to comment
Share on other sites

9 minutes ago, Oraldo revak said:

Thank you for answered me. My CFG is like this: https://ibb.co/vLtmKbP

However in the game I only have this: https://ibb.co/Y3Lyvw5 . I have the accretion disk but not the "lens" https://ibb.co/W0dyKH5

And Kerbin's sun isn't "hide". 

I know that's a detail, but I need it to be like this video .

It's not clear what is going on from your screenshot, please take better, closer screenshots. The accretion disk appears to be working, but also it looks to be different, if you have instantiator still enabled you need to disable it.

This mod doesn't handle lens flares so you have to disable them separately. If you disable your lens flare config it should look like in the video. There is no lens flare in the video.

Edited by blackrack
Link to comment
Share on other sites

Okay, so, I have deleted every mod, to check if it was mod conflict, but no is still like this: https://ibb.co/B4v8FPh
https://ibb.co/Yp7rvV2
https://ibb.co/sPLcS11
https://ibb.co/5ks6xb5

 

Probably me that doing something wrong with config.

 

I put "Singularity foldder" into gamedata, then I copy "Singularity.CFG" and past into gamedata, then I edit it like this: 

Singularity
{
    Singularity_object
    {
        name = Sun
        gravity = 200000000
        hideCelestialBody = true
        useAccretionDisk = true
        accretionDiskNormal = -0.5,0,1
        accretionDiskInnerRadius = 200000000
        accretionDiskOuterRadius = 6000000000
        accretionDiskTexturePath=AccretionDisk\disk.png
        accretionDiskRotationSpeed = -1
    }
}

 

 

I change the "accretionDiskTexturePath" to the texture I want to use... 

 

Do I miss something ??

 

Link to comment
Share on other sites

2 hours ago, Oraldo revak said:

Okay, so, I have deleted every mod, to check if it was mod conflict, but no is still like this: https://ibb.co/B4v8FPh
https://ibb.co/Yp7rvV2
https://ibb.co/sPLcS11
https://ibb.co/5ks6xb5

Probably me that doing something wrong with config.

I put "Singularity foldder" into gamedata, then I copy "Singularity.CFG" and past into gamedata, then I edit it like this:

I change the "accretionDiskTexturePath" to the texture I want to use...

Do I miss something ??

Singularity's config is correct.

However you need something to remove the stock sunflare, the easy option (and what I did to test) is to install scatterer or a scatterer sunflare and to replace it's sunflare texture with black textures. Another option would be to ask in the Kopernicus thread how to use a moduleManager patch to remove the stock sunflare.

Edited by blackrack
Link to comment
Share on other sites

I finally made it work! Thank you. I had to, delete "FlareReplacer" and delete "sunFlare" and "sunSpikes" in scatter. (add black or blank png was making weird graphical glitch).

One last question If it's not too much. Do you know how to change the inclination of the accretion disk ? I mean mine is totaly vertical compare to the planets orbit : https://ibb.co/3CxSKTL
https://ibb.co/fCT3d91

 

Thank you for helped me, and for the time you spend in modding ;) 

Edited by Oraldo revak
Link to comment
Share on other sites

7 hours ago, Oraldo revak said:

I finally made it work! Thank you. I had to, delete "FlareReplacer" and delete "sunFlare" and "sunSpikes" in scatter. (add black or blank png was making weird graphical glitch).

One last question If it's not too much. Do you know how to change the inclination of the accretion disk ? I mean mine is totaly vertical compare to the planets orbit : https://ibb.co/3CxSKTL
https://ibb.co/fCT3d91

 

Thank you for helped me, and for the time you spend in modding ;) 

accretionDiskNormal is a vector that decides the inclination of the disk

Link to comment
Share on other sites

  • 1 month later...
On 1/7/2021 at 11:51 AM, rettter3 said:

This mod:

 

 

Got GU set up with Singularity/EVE/scatterer on a clean install and I've got to say the graphics from singularity are as good as advertised. Excellent job! Now to get it working with JNSQ and GEP...

Link to comment
Share on other sites

  • 4 weeks later...

Thank you for this amazing mod! I have an issue of worm hole. When I use the sample config to turn a planet to a worm hole, in map view it looks perfect, but in flight view the texture of the planet is still loaded. I removed all the other mods but it makes no change. Could you help me figure out where the problem is? Thank you!

- Edit: I found that the texture of the planet was loaded when the height of spacecraft is under a certain value.

KSP version: 1.11.1

config:

Singularity
{
    Singularity_config
    {
        galaxyCubemapResolution = 2048
        objectCubemapResolution = 2048
    }
    Singularity_object
    {
        name = Tylo
        gravity = 200
        hideCelestialBody = true
        useAccretionDisk = false
        wormholeTarget = Mun
    }
}
Edited by Jason Kerman
Link to comment
Share on other sites

  • 3 months later...

Olá, tudo bem, tenho um problema com o mod, não consigo mudar o sol por um buraco negro e, como não consigo encontrar nenhum disco de acreção, você pode me ajudar? 

Quote

Hi, all right, I have a problem with the mod, I can't change the sun for a black hole and since I can't find any accretion disks, can you help me? 

 

Edited by Vanamonde
Please post in English when not using the International subforums.
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...
  • 1 year later...
  • 1 month later...
On 7/1/2023 at 8:43 PM, blackrack said:

Are you saying that based on your detailed analysis of how both render?

From what ive seen, it looks like the ordering is kinda messed up (The Rendering), atleast thats what it looks like. Is it overriding the volumetric clouds aswell? 

Link to comment
Share on other sites

  • 2 weeks later...

Hey ! I'm using your preset for the Sun, however even with the hideClestialBody set to True, I see what looks like the stock Sun's corona.
I tried to remove each of Ghost1, Ghost2, Sunflare, SunSpikes or replace them with black / transparent PNGs, but it didn't worked.

Here's a screen without hidecelestialbody enabled and with it.
Is there something I can do ?

Kw97cTh.pngc9IqF0T.png

Link to comment
Share on other sites

7 hours ago, Nyxilo said:

Hey ! I'm using your preset for the Sun, however even with the hideClestialBody set to True, I see what looks like the stock Sun's corona.
I tried to remove each of Ghost1, Ghost2, Sunflare, SunSpikes or replace them with black / transparent PNGs, but it didn't worked.

Here's a screen without hidecelestialbody enabled and with it.
Is there something I can do ?

Kw97cTh.pngc9IqF0T.png

Hmm I think maybe something changed since I implemented this. Is this with Kopernicus? Could you maybe look into how to remove/modify a sun corona with Kopernicus?

Link to comment
Share on other sites

10 hours ago, blackrack said:

Hmm I think maybe something changed since I implemented this. Is this with Kopernicus? Could you maybe look into how to remove/modify a sun corona with Kopernicus?

Looks like Kopernicus has a "removeCoronas" settings somewhere, I'll look into this.

Link to comment
Share on other sites

Hi blackrack,

Thank you for these remarkable shaders!

The mod Principia alters the coordinate system in the way describe below (key excerpt: "original x axis will become the y axis when |body| is the main body, and the |initialRotation| will be correspondingly increased by 90°." )

& indeed, when used in conjunction with Principia, the Singularity blackhole shader appears to me to visually display the part of the skybox 'that is 90 deg to the right'. 

For example, with Principia when looking at a Singularity black hole via the tracking station, if I align the view such that the 3 belt stars of Orion of the skybox show up close to centered in the 'view of the blackhole', then in order to see the actual 3 belt stars in the skybox I would need to rotate the tracking station camera/view 90 deg to the right.

Principia Singularity Coordinate Interaction
7pn27uh.png

Do the shaders happen to be coded in a way where I might in one or a few config file(s) locations tweak a few values in order to align the rotation/coordinate system expected by the shaders to align/compensate for the orientation change that Principia makes (described below)? Or any other suggestions you may have regarding what may be occurring based on what you see in the screenshot provided above (e.g. perhaps I would also need to adjust some values in a Scatterer config, etc...)?   Thank you!

https://github.com/mockingbirdnest/Principia/blob/d80ebd378097e63f9dc1465380596619a05b910a/ksp_plugin_adapter/config_node_parsers.cs#L78

Quote

        gravitational_parameter =
            node?.GetAtMostOneValue("gravitational_parameter") ??
            (body.gravParameter + " m^3/s^2"),
        // The origin of rotation in KSP is the x of Barycentric, rather
        // than the y axis as is the case for Earth, so the right
        // ascension is -90 deg.

        // Note that once we set the positions and orientations of everything,
        // that original x axis will become the y axis when |body| is the main
        // body, and the |initialRotation| will be correspondingly increased by
        // 90°.

 

Edited by AloE
Link to comment
Share on other sites

On 8/24/2023 at 1:16 AM, blackrack said:

Hmm I think maybe something changed since I implemented this. Is this with Kopernicus? Could you maybe look into how to remove/modify a sun corona with Kopernicus?

e4Yt17o.png

Thanks to  OhioBob on the Kopernicus thread, there's an easy way to remove the corona with Kopernicus, you only need a black PNG to set as the corona's texture.

https://1drv.ms/u/s!AtylFJmePVdBiMFYBBDbKuDYXUSZ3g?e=6BqIEC
Here's just a folder w/ the Kopernicus config and the black texture for the corona.

Link to comment
Share on other sites

18 hours ago, AloE said:

Hi blackrack,

Thank you for these remarkable shaders!

The mod Principia alters the coordinate system in the way describe below (key excerpt: "original x axis will become the y axis when |body| is the main body, and the |initialRotation| will be correspondingly increased by 90°." )

& indeed, when used in conjunction with Principia, the Singularity blackhole shader appears to me to visually display the part of the skybox 'that is 90 deg to the right'. 

For example, with Principia when looking at a Singularity black hole via the tracking station, if I align the view such that the 3 belt stars of Orion of the skybox show up close to centered in the 'view of the blackhole', then in order to see the actual 3 belt stars in the skybox I would need to rotate the tracking station camera/view 90 deg to the right.

Principia Singularity Coordinate Interaction
7pn27uh.png

Do the shaders happen to be coded in a way where I might in one or a few config file(s) locations tweak a few values in order to align the rotation/coordinate system expected by the shaders to align/compensate for the orientation change that Principia makes (described below)? Or any other suggestions you may have regarding what may be occurring based on what you see in the screenshot provided above (e.g. perhaps I would also need to adjust some values in a Scatterer config, etc...)?   Thank you!

https://github.com/mockingbirdnest/Principia/blob/d80ebd378097e63f9dc1465380596619a05b910a/ksp_plugin_adapter/config_node_parsers.cs#L78

 

Yeah, rotate the rayDirection here when sampling this cubemap: https://github.com/LGhassen/Singularity/blob/master/Singularity/Shaders/SingularityShaders/Assets/Shaders/BlackHoleAccretionDisk.shader#L303

Ideally though you wouldn't do it in the shader, you would add some code on plugin side to detect if principia is installed, then you add the correct rotation here when creating the cubemap: https://github.com/LGhassen/Singularity/blob/6006f990a6b4f1dd1f712aa43feac66859e24746/Singularity/Singularity/Singularity.cs#L118 depends how much effort you want to put in this.

Edited by blackrack
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...