Author Topic: Subspace + nebula  (Read 640 times)

0 Members and 1 Guest are viewing this topic.

Online TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR
Some time ago I made a mission where I used both the subspace and nebula effect, and it worked perfectly.
The subspace corridor was just barely visible, nebula pofs and lighting effect worked normally and ships popped out of the nebula (weren't visible in the distance) as they should.

However, recent (relatively) builds seemed to change how things are rendered, because now I see the outline of every ship in the distance, completely ruining the mission (and the entire effect in a way).

Is it a matter of some setting or render flag I can tweak, or am I fugged?
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 
My guess is that this is caused by MediaVP2014's more transparent nebula gas sprites. If you want the to change them, you can use MediaVP_3612 or extract only the old sprites and use them in your custom mod (overriding newer MediaVP assets).

 
I managed to find an old screenshot of a mission from Shadow Genesis that describes your problem:



So basically this happens, when the background skybox is not unicolor. The older more opaque nebula sprites from mediaVP_3612 managed to hide the ship outlines far better.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Can you test something real quick for me? Reproduce this in a debug build, open the debug console (shift+enter in-game), then type "neb_skip", then close the debug console.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Luis Dias

  • 211
Yes, I've seen this many many times, it's just the way it renders the fog: the color of the nebula fog will paint the ships in a gradient the farther they are, until they are totally that color. A much more useful algorithm would be to have the background painted on top of the ships, but I have no idea if this is hard to do, or even a smart thing to do in all cases.

 

Online TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR
How it used to be:

Not a good example, as it doesn't show ship in the distance that were concealed


How it is now:
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
How it used to be:
[snip]
Not a good example, as it doesn't show ship in the distance that were concealed


How it is now:
[snip]
If you want this fixed, I need you to do this:
Can you test something real quick for me? Reproduce this in a debug build, open the debug console (shift+enter in-game), then type "neb_skip", then close the debug console.
And then report on whether or not that behavior is preferable, obviously.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Online TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR

Unfortunately, I can't try that, because the debug build complain hat two capital ships (Titan and Typhon) have inverted bounding boxes on EVERYTHING (is there a simple way to fix this), and after clicking trough all the error pop-up, I get:

Assert: "strstr( (const char *)&props, "$glow_texture=") != NULL"
File: modelread.cpp
Line: 1955

ntdll.dll! NtWaitForSingleObject + 10 bytes
KERNELBASE.dll! WaitForSingleObjectEx + 156 bytes
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
fs2_open_3_8_0_x64_SSE2-FASTDBG.exe! <no symbol>
[...]
[ This info is in the clipboard so you can paste it somewhere now ]


This is strange, since I checked all 3 capital ships in the mission and they all have clearly defined glows (red_glow and blue_small4_glow)
« Last Edit: October 28, 2017, 05:03:06 pm by TrashMan »
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Well, somewhere in one of those POFs is a glowbank without "$glow_texture=" in its properties.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Online TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR
I made a new mission to test it.

When I use the debug command I can't see ships in the distance, but they just pop up suddenly when I get close. There is NO granularity whatsoever.
It's not like the front is visible and the rear less visible, the entire hing just appears.


Should be easy for anyone to test - just make a mission in subspace with nebula turned on, place some ships and look/fly around.


In a somewhat unrelated note - half of the models I'm using report every single subobject is inverted. Half of those models aren't even mine.
Any way to batch invert/fix, or do I have to go trough every single subobject and invert the values manually in PCS2?
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline m!m

  • 210
I'm sorry but the way the rendering engine currently works does not really support fading ships out to the color of the skybox behind the object. There may be a way to either use the skybox cubemap for determining the fade color or using a post-processing effect for achieving the nebula effect but at the moment the behavior you see is more or less the expected behavior.

 

Offline Kiloku

  • 27
  • I like to code. Code doesn't like me.
    • Minecraft
Is it possible to apply a GLSL shader onto an object? Because that sounds like a cheap way to fade them into an arbitrary color.

Could also figure out a way of making it translucent but still hide other 3D objects that go behind it (in essence, making it show the skybox behind it)

 

Offline m!m

  • 210
Since 3.8 we exclusively use shaders for rendering objects so yes, it is possible to apply them to an object which is exactly what we are currently doing for rendering nebula fog but that uses a uniform color for all objects.

The biggest problem is that objects can not be rendered as "transparent" while doing the normal render pass since the rendering technique we are using for that simply does not support that. It may be possible to use the color of the skybox behind the object but that would require a separate texture lookup and it would interfere with later rendering steps so I would like to avoid that.

 
My screenshot was from version 3.7.2 or 3.7.1 Nightly.

I thought this was caused by different mediaVPs? At least I got different results when I tried switching back to 3.6.12 at that time.

 

Offline m!m

  • 210
If I remember correctly, 3.7.2 was when the deferred rendering was added which is the reason why objects cannot simply be faded to transparency anymore. That would explain why it started to happen with that version.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️À➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Just want to make sure, but it seems there was some ambiguity there.  Lukurgos88, you mean when you switched to the MediaVPs 3.6.12, with a 3.7.2+ build?  Or you were playing the 3.6.12 MediaVPs with a 3.7.0 or lower build?

m!m, if he meant the former and that wasn't what you understood then there might be more here.  Just wanted to make sure that was or wasn't the case though, the version numbers in the previous post have me a little confused now, and I wondered if you understood them differently than he intended or not.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays