Need DEVS help with modding

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Mr.Freud
Posts: 301
Joined: Sat, 16. Nov 13, 20:20
x4

Need DEVS help with modding

Post by Mr.Freud » Sat, 25. Jan 20, 15:42

I know it's wrong forum, sorry for posting here, but I need DEVs help so I thought they might see it and reply here
I'm building a mod that increases stations draw and lod distances. It's almost done but I can't seem to find where to look for station docking area lights.
Here's what I mean.
Image
currently draw distance for this light seem to be about 40 000 meters

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30368
Joined: Fri, 16. Apr 04, 19:21
x4

Re: Need DEVS help with modding

Post by Alan Phipps » Sat, 25. Jan 20, 16:33

I'll move it to the correct forum but I'll also ask the devs to try to help you.
A dog has a master; a cat has domestic staff.

Mr.Freud
Posts: 301
Joined: Sat, 16. Nov 13, 20:20
x4

Re: Need DEVS help with modding

Post by Mr.Freud » Sat, 25. Jan 20, 16:38

Alan Phipps wrote:
Sat, 25. Jan 20, 16:33
I'll move it to the correct forum but I'll also ask the devs to try to help you.
Thanks!

linolafett
EGOSOFT
EGOSOFT
Posts: 3321
Joined: Mon, 26. Mar 12, 14:57
x4

Re: Need DEVS help with modding

Post by linolafett » Mon, 27. Jan 20, 09:38

The "station docking area lights" are a simple emissive geometry, tagged with "tags = part detail_l nocollision fx"
The only way for you to increase the visible distance of this object, is to increase the "detail_l" renderrule settings. This will of course change the behaviour of all objects tagged "detail_l".
01001100 01101001 01101110 01100101 01110011 00100000 01101111 01100110 00100000 01110100 01101001 01101101 01100101 01110011 00101110 00101110 00101110

My art stuff

Mr.Freud
Posts: 301
Joined: Sat, 16. Nov 13, 20:20
x4

Re: Need DEVS help with modding

Post by Mr.Freud » Mon, 27. Jan 20, 14:16

linolafett wrote:
Mon, 27. Jan 20, 09:38
The "station docking area lights" are a simple emissive geometry, tagged with "tags = part detail_l nocollision fx"
The only way for you to increase the visible distance of this object, is to increase the "detail_l" renderrule settings. This will of course change the behaviour of all objects tagged "detail_l".
Thank you! will try that out. I also found another way - by disabling culling for "default_rendertag". But it comes with strange bug - every station and gate beyond 200 000m renderes like a dark shadow when in the center of the screen and become visible again when you move camera to the side and objects stay near the border of field of view.

linolafett
EGOSOFT
EGOSOFT
Posts: 3321
Joined: Mon, 26. Mar 12, 14:57
x4

Re: Need DEVS help with modding

Post by linolafett » Mon, 27. Jan 20, 14:22

Dont disable culling, please.
Otherways objects will still be rendered, even when smaller than a pixel in diameter. Which is obviously horribly bad for a lot of reasons.
Adjust the exisiting rules to still fade out objects at a certain size.

The blackness is caused by the shadow map, dont ask me why exactly, but the issue is not appearing when having shadows disabled. Something on the render engine side of things, and nothing you can adjust (i think).
01001100 01101001 01101110 01100101 01110011 00100000 01101111 01100110 00100000 01110100 01101001 01101101 01100101 01110011 00101110 00101110 00101110

My art stuff

Mr.Freud
Posts: 301
Joined: Sat, 16. Nov 13, 20:20
x4

Re: Need DEVS help with modding

Post by Mr.Freud » Mon, 27. Jan 20, 15:10

linolafett wrote:
Mon, 27. Jan 20, 14:22
Dont disable culling, please.
Otherways objects will still be rendered, even when smaller than a pixel in diameter. Which is obviously horribly bad for a lot of reasons.
Adjust the exisiting rules to still fade out objects at a certain size.

The blackness is caused by the shadow map, dont ask me why exactly, but the issue is not appearing when having shadows disabled. Something on the render engine side of things, and nothing you can adjust (i think).
I only experimented with culling to see what effect it will have, not going to put it in mod.
I have tried increasing "dbglodrule_detail_l" and it works just like you said. ( Ithought those rules were for ships only so didn't touch them)
But now I notice that when I increase "dbglodrule_1" or "dbglodrule_gates" I see same bug as I mentioned. I set distance to 400 000 and lod radius to 0. If I set radius to their default values stations render the way they do by default and not noticeable in distance.
here are screenshots for example (only tweaked dbglodrule_1). I disabled shadows too, I initially thought that shadows were causing it. I even tried disabling shadows along with culling (but now for that example).
https://imgur.com/a/9SLAfv4
The effect normalizes when getting to 200 000 or closer to a station. Seems like there's a rule that prevents anything beyond 200km to render at full lods maybe?
Also maybe I don't understand how radius works and I should tweak them too instead of just setting to 0? I tried it a little but stations become somewhat transparent even whey staying close to them. Could you please explain in short?

linolafett
EGOSOFT
EGOSOFT
Posts: 3321
Joined: Mon, 26. Mar 12, 14:57
x4

Re: Need DEVS help with modding

Post by linolafett » Mon, 27. Jan 20, 16:22

Again, never ever set something to lod radius 0. This is incorrect handling and will cause issues.
The distance parameter is not used anymore, as far as i know.
01001100 01101001 01101110 01100101 01110011 00100000 01101111 01100110 00100000 01110100 01101001 01101101 01100101 01110011 00101110 00101110 00101110

My art stuff

Mr.Freud
Posts: 301
Joined: Sat, 16. Nov 13, 20:20
x4

Re: Need DEVS help with modding

Post by Mr.Freud » Mon, 27. Jan 20, 16:38

linolafett wrote:
Mon, 27. Jan 20, 16:22
Again, never ever set something to lod radius 0. This is incorrect handling and will cause issues.
The distance parameter is not used anymore, as far as i know.
damn, seems like I've been doing everything wrong :D looks like only lod radius makes changes that I thought were made by setting distances further...
Is there any way I can increase stations draw distances without touching lod radius?
If not - can you explain how radius works? Does increasing a radius increases or decreases lod draw distance? are values like 0.5 etc safe?
Last edited by Mr.Freud on Mon, 27. Jan 20, 16:52, edited 1 time in total.

linolafett
EGOSOFT
EGOSOFT
Posts: 3321
Joined: Mon, 26. Mar 12, 14:57
x4

Re: Need DEVS help with modding

Post by linolafett » Mon, 27. Jan 20, 16:51

You need to understand how the lodradius settings work, before changing those values randomly.

Take a look here, where i explained how that works. This then should help you be able to set proper values for your mod.
viewtopic.php?p=4892452#p4892452
01001100 01101001 01101110 01100101 01110011 00100000 01101111 01100110 00100000 01110100 01101001 01101101 01100101 01110011 00101110 00101110 00101110

My art stuff

Mr.Freud
Posts: 301
Joined: Sat, 16. Nov 13, 20:20
x4

Re: Need DEVS help with modding

Post by Mr.Freud » Mon, 27. Jan 20, 16:55

linolafett wrote:
Mon, 27. Jan 20, 16:51
You need to understand how the lodradius settings work, before changing those values randomly.

Take a look here, where i explained how that works. This then should help you be able to set proper values for your mod.
viewtopic.php?p=4892452#p4892452
Thank you! sry for taking your time

linolafett
EGOSOFT
EGOSOFT
Posts: 3321
Joined: Mon, 26. Mar 12, 14:57
x4

Re: Need DEVS help with modding

Post by linolafett » Mon, 27. Jan 20, 17:18

Thanks for taking your time to mod our game ;)
01001100 01101001 01101110 01100101 01110011 00100000 01101111 01100110 00100000 01110100 01101001 01101101 01100101 01110011 00101110 00101110 00101110

My art stuff

Mr.Freud
Posts: 301
Joined: Sat, 16. Nov 13, 20:20
x4

Re: Need DEVS help with modding

Post by Mr.Freud » Mon, 27. Jan 20, 18:16

linolafett wrote:
Mon, 27. Jan 20, 17:18
Thanks for taking your time to mod our game ;)
My new hobby - modding favorite games :D
Is there anything I can try to get rid of that "field of view" bug I mentioned?
Example:
I set radius 'dbglodrule_1' to 4x times. Default were lodradius0="200" lodradius1="100" lodradius2="35" lodradius3="5". Tweaked looks like this:

Code: Select all

  <rule name="dbglodrule_1" range="40000.0" sizecontrib="100" speed="2.0" lodradius0="50" lodradius1="25" lodradius2="8.75" lodradius3="1.25">  
result screens:
https://imgur.com/a/FF8Dhen
It also noticeable with default parameters - but much less noticeable
disabling shadows doesn't have any effect

linolafett
EGOSOFT
EGOSOFT
Posts: 3321
Joined: Mon, 26. Mar 12, 14:57
x4

Re: Need DEVS help with modding

Post by linolafett » Tue, 28. Jan 20, 10:24

I asked around what the black stuff is.
Its caused by a set distance after which there is no light calculation being done anymore.

This setting is not easily accessible for you to change (defined in common.h "#define BGDIST (2000000.0f)").
There is probably also something off, as its set to 2000km and this darkness appears earlier than that.
01001100 01101001 01101110 01100101 01110011 00100000 01101111 01100110 00100000 01110100 01101001 01101101 01100101 01110011 00101110 00101110 00101110

My art stuff

Mr.Freud
Posts: 301
Joined: Sat, 16. Nov 13, 20:20
x4

Re: Need DEVS help with modding

Post by Mr.Freud » Tue, 28. Jan 20, 14:59

linolafett wrote:
Tue, 28. Jan 20, 10:24
I asked around what the black stuff is.
Its caused by a set distance after which there is no light calculation being done anymore.

This setting is not easily accessible for you to change (defined in common.h "#define BGDIST (2000000.0f)").
There is probably also something off, as its set to 2000km and this darkness appears earlier than that.
Maybe someone forgot one 0 :D
looked into it and its 2 000 000. added 3 more 0 just to test and its still the same.
Could it be something to do with camera position or something like that?

Mr.Freud
Posts: 301
Joined: Sat, 16. Nov 13, 20:20
x4

Re: Need DEVS help with modding

Post by Mr.Freud » Thu, 2. Apr 20, 13:45

linolafett wrote:
Tue, 28. Jan 20, 10:24
Hi. Could you please look into the bug if you have time to spare please?

linolafett
EGOSOFT
EGOSOFT
Posts: 3321
Joined: Mon, 26. Mar 12, 14:57
x4

Re: Need DEVS help with modding

Post by linolafett » Thu, 2. Apr 20, 14:55

I am just an artist, not the graphics engine programmer, so i cant really help you there.
We are also very busy with other critical issues like currently the artifacting on amd gpus.
This dark shadow effect is on our long term to do list.
01001100 01101001 01101110 01100101 01110011 00100000 01101111 01100110 00100000 01110100 01101001 01101101 01100101 01110011 00101110 00101110 00101110

My art stuff

Mr.Freud
Posts: 301
Joined: Sat, 16. Nov 13, 20:20
x4

Re: Need DEVS help with modding

Post by Mr.Freud » Thu, 2. Apr 20, 16:44

linolafett wrote:
Thu, 2. Apr 20, 14:55
I am just an artist, not the graphics engine programmer, so i cant really help you there.
We are also very busy with other critical issues like currently the artifacting on amd gpus.
This dark shadow effect is on our long term to do list.
I understand. Thank you.

Mr.Freud
Posts: 301
Joined: Sat, 16. Nov 13, 20:20
x4

Re: Need DEVS help with modding

Post by Mr.Freud » Tue, 7. Apr 20, 15:59

linolafett wrote:
Thu, 2. Apr 20, 14:55
Hey linolafett, sry for bothering you again. I'm tweaking masstraffic now for my mod - my aim is to make masstraffic ships more visible. When editing LODs for "masstraffic" and "xs_ships" I can make them more visible in the distance. But at the same time, when tweaking "dbglodrule_ship_xs" lowering LODs makes the glow around the engine disappear while ships themselves are more visible in the distance. Is there a way to make the engine glow stay while at the same time they become more visible in the distance?

linolafett
EGOSOFT
EGOSOFT
Posts: 3321
Joined: Mon, 26. Mar 12, 14:57
x4

Re: Need DEVS help with modding

Post by linolafett » Tue, 7. Apr 20, 21:36

The flares are part of the LODs, there is no way to independently make them larger/smaller.
There might be a way to increase the materials visibility of the engine flare.
01001100 01101001 01101110 01100101 01110011 00100000 01101111 01100110 00100000 01110100 01101001 01101101 01100101 01110011 00101110 00101110 00101110

My art stuff

Post Reply

Return to “X4: Foundations - Scripts and Modding”