Author Topic: Small patch: lighting on briefing screen models  (Read 8960 times)

0 Members and 1 Guest are viewing this topic.

Offline delt

  • 23
  • Dressed to kill
Small patch: lighting on briefing screen models
Hello everyone!

I just made a small diff patch that adds lighting to the models in the "popup" window that appears when you click a ship icon in the briefings. This had always kind of (just a little bit) bugged me that they were flat and boring, unlike pretty much everywhere else in the game =)

This is the result of adding like 7 or 8 lines + a conditional compile (#ifdef) that gives the option to leave the code unchanged. Hope to see this in the next version :D :D :D


[attachment kidnapped by pirates]
You can have the world at your feet by tomorrow, just sign on this line ____________

  

Offline Whitelight

  • 29
  • Thing, man like
Re: Small patch: lighting on briefing screen models
Wow.. Nice if we could see this in an AVX build.  :D
Simpicity of character is the natural resualt of profound thought

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Small patch: lighting on briefing screen models
Wow.. Nice if we could see this in an AVX build.  :D
There isn't really a significant performance difference between the different automatic compiler optimizations, you know.
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 chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Small patch: lighting on briefing screen models
From what I've heard, you'd be surprised at the jump between some of them in various situations.
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

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Small patch: lighting on briefing screen models
From what I've heard, you'd be surprised at the jump between some of them in various situations.
From what I've personally experienced, the maximum "jump" between SSE2/AVX is maybe 1-2 FPS, if you're lucky (and that's after correcting the project files to actually use AVX optimizations). That being said, I obviously use AVX builds myself, because even if you're only getting half a frame per second, it's still a performance gain for no actual effort.
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.

 
Re: Small patch: lighting on briefing screen models
Hello everyone!

I just made a small diff patch that adds lighting to the models in the "popup" window that appears when you click a ship icon in the briefings. This had always kind of (just a little bit) bugged me that they were flat and boring, unlike pretty much everywhere else in the game =)

This is the result of adding like 7 or 8 lines + a conditional compile (#ifdef) that gives the option to leave the code unchanged. Hope to see this in the next version :D :D :D

Is it possible to use this right now? If so, then how is it done?
Why do you say "as" instead of "because"?

 

Offline delt

  • 23
  • Dressed to kill
Re: Small patch: lighting on briefing screen models
Is it possible to use this right now? If so, then how is it done?

What OS are you using? Do you have the tools to compile from source? (if you're using a unix system such as linux or freebsd, then you probably do)

I'm sure there's a GUI friendly way to accomplish the same, but i use command-line for 90% of what i do. So, assuming you have the source tarball fs2_open_3_7_2_RC4_src.tgz and the patch briefcloseup-lighting.patch in your home's Downloads directory, from a terminal window just untar the source,

Code: [Select]
cd /tmp && tar xvf ~/Downloads/fs2_open_3_7_2_RC4_src.tgz
apply the patch,

Code: [Select]
patch -p0 < ~/Downloads/briefcloseup-lighting.patch
this should tell you:

Code: [Select]
patching file fs2_open_3_7_2_RC4/code/missionui/missionbrief.cpp
...and finally recompile & install the fs2_open binary =)

Code: [Select]
cd fs2_open_3_7_2_RC4 && ./autogen.sh && ./configure && make && sudo make install
Then to play, in your launcher browse to the fs2_open_3_7_2_RC4 executable (by default it should be in /usr/local/bin) and then click "Run" or "Play" or however your launcher calls it :D
You can have the world at your feet by tomorrow, just sign on this line ____________

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Small patch: lighting on briefing screen models
If you're on Windows, you can use Visual Studio Community Edition to compile the code, and TortoiseSVN to acquire the code, or you can use that src.tgz file linked in the previous post.  TortoiseSVN is also useful for applying the patch on Windows via a GUI though.
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

 

Offline delt

  • 23
  • Dressed to kill
Re: Small patch: lighting on briefing screen models
Just thought about it, if you're on a Mac (osx) then you probably need to install the xcode stuff to compile programs, but i haven't tested this on a mac. In fact, my experience in developing/compiling on osx is pretty null.

Compiling on windows is possible, as noted by chief1983, but it's a royal pain in the ass in my personal experience.
You can have the world at your feet by tomorrow, just sign on this line ____________

 
Re: Small patch: lighting on briefing screen models
If you're on Windows, you can use Visual Studio Community Edition to compile the code, and TortoiseSVN to acquire the code, or you can use that src.tgz file linked in the previous post.  TortoiseSVN is also useful for applying the patch on Windows via a GUI though.

Is this something that anyone can do, even if they have never done anything like this before? I mean, this seems to be way over my head.
Why do you say "as" instead of "because"?

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Small patch: lighting on briefing screen models
It looks simple enough that we could probably convert it to a command line option placed under experimental and even get it shipped with 3.7.2, so if you'd want to wait for someone to make that  happen, you won't need to worry about it.  But we do have some getting started guides that can halfway decently walk you through compiling the code yourself if you can't wait, and the #scp IRC chat room would be very helpful at generally any time of day if you wanted some direction in that regard.  Getting your own build running can be kind of rewarding in my experience, tackling the build process after they moved to SVN was what got me into the SCP in the first place :)
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

 
Re: Small patch: lighting on briefing screen models
It looks simple enough that we could probably convert it to a command line option placed under experimental and even get it shipped with 3.7.2, so if you'd want to wait for someone to make that  happen, you won't need to worry about it.  But we do have some getting started guides that can halfway decently walk you through compiling the code yourself if you can't wait, and the #scp IRC chat room would be very helpful at generally any time of day if you wanted some direction in that regard.  Getting your own build running can be kind of rewarding in my experience, tackling the build process after they moved to SVN was what got me into the SCP in the first place :)

Oh. Nah, I'll just wait and see if it gets shipped with 3.7.2.

I'm only here because I couldn't stand not playing FS2 anymore, so I finally searched for "FreeSpace 2 in Windows 7 x64" (which is among the best computer-related decisions I've ever made). So, I'm strictly a user.
Why do you say "as" instead of "because"?

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Small patch: lighting on briefing screen models
It looks simple enough that we could probably convert it to a command line option placed under experimental and even get it shipped with 3.7.2, so if you'd want to wait for someone to make that  happen, you won't need to worry about it.  But we do have some getting started guides that can halfway decently walk you through compiling the code yourself if you can't wait, and the #scp IRC chat room would be very helpful at generally any time of day if you wanted some direction in that regard.  Getting your own build running can be kind of rewarding in my experience, tackling the build process after they moved to SVN was what got me into the SCP in the first place :)

I would even tie that same command-line to the lighting in tech rooms.  I wouldn't be surprised if someone just decided to change the lighting there and didn't think to copy it to the briefing popup.

Could someone post a screenshot comparison between a briefing popup with delt's patch applied and one without?

 

Offline delt

  • 23
  • Dressed to kill
Re: Small patch: lighting on briefing screen models

Without:







With:







/* edit */ Looking at these screenshots again, just a still image doesn't do it much justice.... the difference is a LOT more obvious when you see it moving.
« Last Edit: December 10, 2014, 10:29:48 pm by delt »
You can have the world at your feet by tomorrow, just sign on this line ____________

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Small patch: lighting on briefing screen models
I would even tie that same command-line to the lighting in tech rooms.  I wouldn't be surprised if someone just decided to change the lighting there and didn't think to copy it to the briefing popup.

What tech room lighting command line option?  I seemed to recall there having been one of those as well, but can't find it now.
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

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Small patch: lighting on briefing screen models
There isn't one.  I meant that if someone adds a command-line option to control briefing lighting, he may as well tie it to tech room lighting too.
« Last Edit: December 13, 2014, 06:32:00 pm by Goober5000 »

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Small patch: lighting on briefing screen models
Ah, but I was only suggesting this as something temporary to prevent it from having any adverse effects that we might not catch.  By the next release I'd be fine with it being the default behavior as long as it doesn't seem to cause any crashes.  That's why I suggested placing it under experimental, where it would hopefully soon move.  I'm not trying to add a new flag permanently here, we try to avoid that these days.
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

 
Re: Small patch: lighting on briefing screen models
There are briefing screen models?! =-O

And yes, I agree that looks better :)

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Small patch: lighting on briefing screen models
Delt, any reason why the added Glowpoint_use_depth_buffer = false; line is outside of the #ifdef...#endif block?
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

 

Offline delt

  • 23
  • Dressed to kill
Re: Small patch: lighting on briefing screen models
Oops... yeah, that's a mistake. Sorry about that!
You can have the world at your feet by tomorrow, just sign on this line ____________