Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: killface on February 14, 2010, 05:03:05 pm

Title: Specular lighting issue
Post by: killface on February 14, 2010, 05:03:05 pm

I have a mission where a number of fighters are going at it with high rate of fire miniguns.  During the hottest part of the battle, it seems like the specular lighting gimps out...the sun "flare" effect shuts down, and the spec lighting on the hulls of every space craft turns off, only to flicker on and off as the firing recedes, then return once nobody is shooting anymore.  This is odd and annoying.  I tried setting -spec_point 0 to make it so the weapons had NO impact on the specular lighting, but everything still happens as outlined above.  I feel like I'm missing something.  Is there any way to fix this issue?
Title: Re: Specular lighting issue
Post by: The E on February 15, 2010, 03:20:24 am
You may be hitting one of the engine's limits (I suppose either bitmaps or objects, not sure). You are bound to see weird issues crop up there. Only way to fix it is to lower the weapon's ROF.
Title: Re: Specular lighting issue
Post by: Fury on February 15, 2010, 07:05:43 am
Run the mission with debug build and analyze the log afterwards. Usually any limits you hit are recorded in debug log.
Title: Re: Specular lighting issue
Post by: Dragon on February 15, 2010, 07:12:43 am
What is the fire wait of the weapon?
Also, it's lifetime would be helpfull.
Title: Re: Specular lighting issue
Post by: killface on February 15, 2010, 07:18:31 pm

Firewait 0.1, lifetime 2.0.  It is also Energy Consumed: 6, which on my fighters simulates the "burst" effect to be incorporated into 3.6.11...i.e. it drains your energy reserves fast, but I modded ships.tbl so the recharge rate is pretty quick too.  Anyway, I find that with about 40 fighters going at it, these strange lighting effects begin to kick in.  It seems like there should be someway to knock that off....I mean, if the weapons are contributing NOTHING to specular lighting, why would the sun-based lighting and the solar flare effect suffer as well?
Title: Re: Specular lighting issue
Post by: The E on February 16, 2010, 03:54:56 am
Run the mission with debug build and analyze the log afterwards. Usually any limits you hit are recorded in debug log.
Title: Re: Specular lighting issue
Post by: Dragon on February 16, 2010, 04:10:06 am
Yes, do this.
0.1 isn't that fast, I have a gatling gun that fires much faster, but have short lifetime (so the bullets will disappear fast enough not to hit any limits).
40 fighters is quite a lot though, so they may be hitting some limit.
Are you sure you need that many?
Title: Re: Specular lighting issue
Post by: Spoon on February 16, 2010, 10:57:35 am
40 fighters with a fast firing weapon that has a 2 second life time like that can probably produce enough projectiles to hit the limit.
One Erinyes alone could produce like 160 shots onscreen that way (if my math isn't horribly mistaken)
Title: Re: Specular lighting issue
Post by: killface on February 17, 2010, 12:11:09 am
Every time I try to run the debug, it gives me a black screen....hitting ESC gets me out of it, but errorlog doesn't update?  This has been an ongoing issue for me.

UPDATE: OK, I got the log to come back but couldn't get into the startup menu.  I could use some help interpreting the log...

[attachment deleted by admin]
Title: Re: Specular lighting issue
Post by: Zacam on February 17, 2010, 01:33:28 am
Not errorlog.txt.

fs2_open.log in freespace2\data.
Title: Re: Specular lighting issue
Post by: killface on February 17, 2010, 10:17:19 pm

OK, here it is...keep in mind I cannot get into the game at all when running the debug mode, and not sure why.  This is a separate issue from the lighting one...

[attachment deleted by admin]
Title: Re: Specular lighting issue
Post by: The E on February 17, 2010, 10:26:27 pm
Do you have a debug_filter.cfg in your data folder? Please delete it, and run the debug build again. Then post that log. The one you posted just now is unusable due to the +parse option.
Title: Re: Specular lighting issue
Post by: killface on February 17, 2010, 10:38:08 pm

Alright, here's the updated file...

[attachment deleted by admin]
Title: Re: Specular lighting issue
Post by: The E on February 17, 2010, 10:41:04 pm
Code: [Select]
WARNING: "$Rearm Rate for ballistic primary CMI 71-KEC not specified.  Defaulting to 100..." at Weapons.cpp:2585
Int3(): From e:\storage\fso\fs2_open_3_6_10\code\globalincs\windebug.cpp at line 1326

You have edited your weapons.tbl, or placed custom mods in either FreeSpace 2\data or mediavps\data. Please remove those, and place them in a custom mod folder.
Title: Re: Specular lighting issue
Post by: killface on February 17, 2010, 10:50:09 pm

mediavps is the custom folder...but the tables are all in mediavps\data\tables.  There are some older, duplicate tables hanging out just in the mediavps directory...you're saying I should delete these?
Title: Re: Specular lighting issue
Post by: The E on February 17, 2010, 10:52:06 pm
Delete them, or move them to another mod folder.

Please remember this for the future: Do not put custom content, especially not table files, in the mediavps or base FS2 folder. It makes troubleshooting much, much harder, and as evidenced here, when the custom content is actually bugged, can kill the game.
Title: Re: Specular lighting issue
Post by: killface on February 17, 2010, 10:58:31 pm

Thank you for the tip, I had been considering deleting the clutter, but I'm still unclear on where custom content belongs, then.  If mediavps IS the mod I'm using, the tables go in mediavps\data\tables, correct?  Where do custom models and effects go, to still be active in that mod?  Or are you saying that during troubleshooting, all custom content has to be temporarily moved?  If so, how does this help me identify the spec lighting trouble with the custom weapon I made via weapons.tbl?
Title: Re: Specular lighting issue
Post by: The E on February 17, 2010, 11:14:05 pm
1. Create a new folder in your FS2 directory. Name it "mymod" or whatever. Place all your custom data in mymod\data\whatever, following the rules as laid out here: http://www.hard-light.net/wiki/index.php/FS2_Data_Structure

2. Create a new text file in the mymod directory. Rename it to "mod.ini". Copy the following text into that file:
Code: [Select]
[multimod]
secondarylist = mediavps;
Save the file.

3. Use the Launcher to select "mymod" as the active mod. The game will now load data from mymod before the mediavps, enabling both mods.

Now, none of these issues help you find the issues directly, but they make organizing your modding work easier, and as I said before, makes helping you once you run into problems easier.

It seems to me that you should spend a good deal of time absorbing the info in the Wiki's modding portal (http://www.hard-light.net/wiki/index.php/Portal:Modding), especially with regards to tbms.

As for your current problem, first see if the issue appears with the unmodified mediavps. If it does, we'll work from there. If it doesn't, post the weapons' tbl entry, so that we can take a look at it.

EDIT:
Code: [Select]
WARNING: "$Rearm Rate for ballistic primary CMI 71-KEC not specified.  Defaulting to 100..." at Weapons.cpp:2585
Int3(): From e:\storage\fso\fs2_open_3_6_10\code\globalincs\windebug.cpp at line 1326

This is one error in the weapon entry you _need_ to correct.
Title: Re: Specular lighting issue
Post by: killface on February 17, 2010, 11:41:31 pm
OK, folder rearranged per the wiki.  The only remaining problem with this rearrangement is that when I attempt to test out my mission again, it's telling me that the mission is incompatible with my currently selected mod (which is the new folder, mymod).  None of the ships and weapons are pulling from the tbl files, which are within the mymod subdirectories now.  How do I "redirect" this mission to pull the data from the new folder?

EDIT: Disregard the above....retesting mission now
Title: Re: Specular lighting issue
Post by: killface on February 18, 2010, 12:01:28 am

Reposting the fs2_open log now...it crashed on startup again.

[attachment deleted by admin]
Title: Re: Specular lighting issue
Post by: FUBAR-BDHR on February 18, 2010, 12:13:22 am
C:\Users\Seth\Desktop\Games\Freespace Open

That's your first big issue right there.  You need to have it installed somewhere other then your desktop preferably c:\games\freesapce2.

Title: Re: Specular lighting issue
Post by: killface on February 18, 2010, 12:17:09 am
OK.  I'll move it, but do you mind explaining why?  Trying to learn, and all that... ;)

EDIT: Crapped out again, log reposted

[attachment deleted by admin]
Title: Re: Specular lighting issue
Post by: FUBAR-BDHR on February 18, 2010, 12:58:45 am
'C:\Games\Freespace Open\mymod\data\maps\3610_Patch.vp'  
Belongs in the mediavps root directroy since it is part of the mediavps.  


By crashed on startup what do you mean?  Locked up?  Any error message?  Anything on the screen?

Does it lock up if you run with no mods or just the mediavps?

Title: Re: Specular lighting issue
Post by: The E on February 18, 2010, 08:58:14 am
Yeah, that would be my question as well. Something in your various assets is broken; add them in one by one to find out what.

And please please please move the 3610_patch.vp back to the mediavps folder where it belongs.
Title: Re: Specular lighting issue
Post by: killface on February 18, 2010, 05:19:53 pm

It's only when I run the game in debug mode that it crashes.  And by crash, I mean I get to the splash screen, but then I see my cursor in wheel of death mode, where it sits until I do a CTRL-ALT-DEL/Task Manager to exit to Windows environment, at which point I see the "Freespace has stopped working" message.  Again, this is JUST for debug mode.  Regular mode runs without any problems at all (besides the spec lighting issue which prompted me to start this thread; that's more of a design issue, I believe?).

I've posted the contents of my main freespace directory and the mediavps directory.  If anything else is somewhere it doesn't belong, please let me know, but I think I've got the custom content at vp files where they need to be, finally.

Seth

[attachment deleted by admin]