Author Topic: Antipodes #4  (Read 12003 times)

0 Members and 1 Guest are viewing this topic.

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Set in the Custom Flags the following: -bloom_intensity ##

Where ## = 0-160
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Commander Zane

  • 212
  • Spoot Knight of Anvils
With the new builds it runs faster than before, the only problem is that the bloom is affecting the background nebulae, is that gonna be managed somehow, like a command line or a mission property?.
It's always done that as far as the Antipodes go.

 
With the new builds it runs faster than before, the only problem is that the bloom is affecting the background nebulae, is that gonna be managed somehow, like a command line or a mission property?.
It's always done that as far as the Antipodes go.

Which bit? The bloom, the background nebulae or the speed :P
STRONGTEA. Why can't the x86 be sane?

 

Offline Commander Zane

  • 212
  • Spoot Knight of Anvils
Blooming nebula.

 
Interesting, because Antipodes is just a trunk build with some extra stuff :P
I'll keep an eye out for it.
STRONGTEA. Why can't the x86 be sane?

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
there is one bug with postprocessing, not truly related to antipodes itself.

when using the mainhall script, any mission that is chosen, wont display, but instead a fullscreen greyish plate will be displayed where the mission should play out. aka, the post processing doesnt actually process the frames it should but processes a blank slate of sort, which gives the good grayness -.-

if my logic is correct, this is actually more lua(scripting) related probably, as the command that the script uses pulls the frames out of the wrong framebuffer.
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline Commander Zane

  • 212
  • Spoot Knight of Anvils
Something I seemed to notice in game was ship-to-ship collisions disable all the bloom effects as long as they are grinding hulls together, once they stop frotting the bloom comes back on.

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
try it with weapon impacts too (get a rapidfire weapon or tablehack another to check...)
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline Hery

  • 26
Commander Zane: This should solve the problem.

pecenipicek: Could you give me all data I need to reproduce this bug?

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
unfortunately, not at the moment no, but that bug was apparent since you first started to do the postprocessing. i will be able to give you all the neccesary data after 30th december, since i'm not at my usual pc...

however, here are the steps, use this script, save it as mainhall-sct.tbm in your tables folder
Code: [Select]
#Conditional Hooks
$Application: Freespace 2
$On Game Init: [
--Function to handle a section every frame
section = function(name, event, num, hidden)
if hidden == false then
divsize = 8
xadd = 159
yadd = 35
else
divsize = 256
xadd = 10
yadd = 10
end

--MENU COLOR
local xmargin = gr.getScreenWidth()/divsize
local ymargin = gr.getScreenHeight()/divsize

--Get corner coordinates for this box
local x1 = xmargin
local y1 = ymargin*num
local x2 = x1+xadd
local y2 = y1+yadd

--When the mouse is OVER this section...
if io.getMouseX() > x1 and io.getMouseX() < x2 and io.getMouseY() > y1 and io.getMouseY() < y2 then
if hidden == false then
--Draw the inside box
gr.setColor(0, 255, 0)
gr.drawRectangle(x1+5, y1+5, x2-5, y2-5, false, false)

--Draw the little target lines now
local x = x1+(x2-x1)/2
local y = y1-20

--Top target line
gr.drawLine(x, y, x, y+15)

--Bottom target line
y = y2+10
gr.drawLine(x, y, x, y+15)

--Left target line
x = x1-20
y = y1+17
gr.drawLine(x, y, x+15, y)

--Right target line
x = x2+5
gr.drawLine(x, y, x+15, y)
end

--Handle the button click
if io.isMouseButtonDown(MOUSE_LEFT_BUTTON) then
gr.drawRectangle(x1, y1, x2, y2, false, false)
if event == "GS_EVENT_NEW_CAMPAIGN" or event == "GS_EVENT_OPTIONS_MENU" then
mn.unloadMission()
g_missionLoaded = nil
g_splashScreen = nil
end
ba.postGameEvent(ba.GameEvents[event])
end
end

--Draw the outline
gr.setColor(255, 255, 255)
gr.drawRectangle(x1, y1, x2, y2, false, false)

if hidden == false then
--Draw the name
gr.drawString(name, x1 + ( (x2-x1) - gr.getStringWidth(name) ) / 2, y1+15)
end
end
]

$Application: Freespace 2
$State: GS_STATE_MAIN_MENU
$On State Start: [
logolist = {"43_logo","1610_logo"}                --This is a list of logos. Basically the same Logo, only adapted for 4:3 aspect ratio displays and 16:10 ones
shiplist = {"GTF Hercules" "GTF Myrmidon" "GTF Perseus"} --Put your ship classes in quotes here
missionlist = {"Mainhall.fs2"}                    --List of missions to be used
backgroundlist = {"43_mainhall", "1610_mainhall"} --List of backgrounds. Again, divided into 4:3 and 16:10 ones
splashscreen = "2_PreLoad"                        --Splashscreen displayed while the mission loads
usemission = false                               --If false, the single- and multiplayer UI will use the same layout. If true, one of the missions defined in the missionlist will play in the background of the single player UI
rotConst = 7                                      --Modify this to make the ship turn faster to slower

screenWidth = gr.getScreenWidth()
screenHeight = gr.getScreenHeight()
aspectRatio = screenWidth/screenHeight

if aspectRatio == 1.6 then
logo = logolist[2]
background = backgroundlist[2]
else
logo = logolist[1]
background = backgroundlist[1]
end

imgWidth = gr.getImageWidth(logo)
imgHeight = gr.getImageHeight(logo)
renderX1 = 0 --screenWidth * 0.2
renderX2 = screenWidth --* 0.99
renderY1 = 0 --screenHeight * 0.1
renderY2 = screenHeight --* 0.9
rendermidX = (renderX1+renderX2)/2
imageX = 0 --(screenWidth*0.5)-imgWidth/2
imageY = screenHeight - imgHeight

if ts.isCurrentPlayerMulti()==true or usemission==false then
numChoices = table.getn(shiplist)
randomShip = tb.ShipClasses[shiplist[math.random(1,numChoices)]]
shipName = randomShip.Name
init = 42
end
]
+Override: true
$On State End: [
if g_missionLoaded then
mn.unloadMission()
g_missionLoaded = nil
g_splashScreen = nil
end
]
+Override: true
$On Frame: [
if ts.isCurrentPlayerMulti()==true or usemission==false then

--Draw background image
local tex = gr.loadTexture(background)
if tex:isValid() then
gr.drawImage(tex, 0, 0, gr.getScreenWidth(), gr.getScreenHeight())
end

if rotate_pct then
rotate_pct = rotate_pct + rotConst*ba.getFrametime()
if rotate_pct > 100 then
rotate_pct = rotate_pct - 100
end
else
rotate_pct = 40
end

randomShip:renderTechModel(renderX1, renderY1, renderX2, renderY2, rotate_pct)

gr.setColor(255,255,255)
gr.drawString(shipName,rendermidX-gr.getStringWidth(shipName)/2,renderY2)
else
if not g_splashScreen then
--Don't need cursor
io.setCursorHidden(true)

--Draw splash image
local tex = gr.loadTexture(splashscreen)
if tex:isValid() then
gr.drawImage(tex, 0, 0, gr.getScreenWidth(), gr.getScreenHeight())
end

--Draw "Loading..."
gr.setColor(255, 255, 255)
gr.CurrentFont = gr.Fonts['font02']
local loadString = "Loading..."
local x = (gr.getScreenWidth()-gr.getStringWidth(loadString))/2
local y = (gr.getScreenHeight()-gr.CurrentFont.Height)/2
gr.drawString(loadString, x, y)

--Done with splash
gr.CurrentFont = gr.Fonts['font01']
g_splashScreen = true
elseif not g_missionLoaded then
if init2 == nil then
missionName = missionlist[math.random(1,table.getn(missionlist))]
init2 = 42
end
mn.loadMission(missionName)
io.setCursorHidden(false)
g_missionLoaded = true
end
end

if g_missionLoaded then
mn.simulateFrame()
mn.renderFrame()
end

if g_missionLoaded or ts.isCurrentPlayerMulti()==true or usemission==false then
if ts.isCurrentPlayerMulti()==true then
if ts.isPXOEnabled()==true then
section("Multiplayer", "GS_EVENT_PXO", 1, false)
else
section("Multiplayer", "GS_EVENT_MULTI_JOIN_GAME", 1, false)
end
else
section("Ready Room", "GS_EVENT_NEW_CAMPAIGN", 1, false)
end
section("Campaign Room", "GS_EVENT_CAMPAIGN_ROOM", 2, false)
section("Tech Room", "GS_EVENT_TECH_MENU", 3, false)
section("Barracks", "GS_EVENT_BARRACKS_MENU", 4, false)
section("Options", "GS_EVENT_OPTIONS_MENU", 5, false)
section("Exit", "GS_EVENT_QUIT_GAME", 6, false)
section("F3", "GS_EVENT_LAB", 1, true)
end
]
+Override: true
#End

rename any mission to "Mainhall.fs2" and enable any postprocessing effect via sexp's in that mission (i am not sure if bloom affects it but i believe that it does), and run the game. if i described the steps right you should get a grey screen with 5 or 6 buttons replacing the usual mainhall buttons.

normally, it should display the mission playing out in real time as the mainhall "background".

mods used do not really matter.


i believe that these two commands would be used in scripting for rendering something out(look below this text), and i believe that its worth checking from which framebuffers the functions pull data from, as obviously its something not used in your postprocessing pipeline. (or its just pulling from a wrong FB, ie, not pulling the final rendered out frame but one of the intermediate framebuffers or even just the first state of the base FB, not that i have any idea how all that works. just saying from what would seem logical to a 3D artist)

mn.simulateFrame() and mn.renderFrame()

also, portej, i deeply apologise for reporting this after antipodes #4 has ended, i unfortunately forgot about that gem completely back when postproc was unveiled, and it just very recently bit me back in the ass when i was tweaking the effects for TAP.
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
mn.simulateframe() runs the AI and all that, mn.renderFrame() renders it.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
i'd still check both in the code just in case. who knows where it might be bugged anyway. do take note that i am not a programmer and that i'm kinda figuring out this as i go and how the script works. thankfully i've dabbled in c++ enough to be able to identify major parts of a program if its not obfuscated too much.
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline Commander Zane

  • 212
  • Spoot Knight of Anvils
Commander Zane: This should solve the problem.
Wait, what? What bug?

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Zane, this is in relation to my problems, not yours. You just have to grab that file and overwrite another one in your tables folder.
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline Hery

  • 26
Solution to the problems with mainhall scripts was committed and will appear in the next nightly build.

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
what was the bug anyway?
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 
also, portej, i deeply apologise for reporting this after antipodes #4 has ended, i unfortunately forgot about that gem completely back when postproc was unveiled, and it just very recently bit me back in the ass when i was tweaking the effects for TAP.

Hey no probs! :)
Better to have a bug report late than none at all :)
STRONGTEA. Why can't the x86 be sane?

 

Offline Hery

  • 26
The problem was that current simple effects configuration was initialized when a mission was loaded. Unfortunately, there is separate code which handles "normal" mission loading and mission loading called from lua scripts. I was unaware of that and when script loaded a mission simple effects configuration was invalid. Contrast was set to 0, hence the grey screen.

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
ah. excellent. i will test this when i get back home... 3 more daays :D
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
post effects do work now, but spec maps are...whacked. i get full enviroment reflection in ship lab and ingame.

btw, nightly build, 29 Dec 2009 - Revision 5749

needs more testing however, will return when i have proper data.
« Last Edit: December 30, 2009, 07:49:42 pm by pecenipicek »
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.