Jump to content


Photo

NearInfinity


  • Please log in to reply
991 replies to this topic

#981 Argent77

Argent77
  • Staff
  • 1083 posts

Posted 09 November 2019 - 01:49 AM

I think I have identified an issue with how NI Area Viewer renders night areas with animated overlays.  When the overlays are enabled, the night shading doesn't seem to be correct:

Overlays not always being properly rendered in BG2(EE) is a known issue. The current solution uses a "dumb" check to determine how to render overlays, which doesn't always work. Fixing it is not trivial though. The great number of different overlay render mechanisms would require to implement individual rendering paths depending on game engine variant and used tileset format.

 

 Additionally, BAMs don't seem to render properly when Background Animations->Show actual animations is enabled, but the transparent color in the BAM is something other than the traditional green (such as BW1's stupid teal color).  The BAM renders properly in the game (BG2).

Actual BAM background color shouldn't matter as long as it's located at palette index 0. Can you provide a BAM sample for me to test?



#982 Sam.

Sam.
  • Modder
  • 1106 posts

Posted 11 November 2019 - 05:54 PM

I think I have identified an issue with how NI Area Viewer renders night areas with animated overlays.  When the overlays are enabled, the night shading doesn't seem to be correct:

Overlays not always being properly rendered in BG2(EE) is a known issue. The current solution uses a "dumb" check to determine how to render overlays, which doesn't always work. Fixing it is not trivial though. The great number of different overlay render mechanisms would require to implement individual rendering paths depending on game engine variant and used tileset format.

 

 Additionally, BAMs don't seem to render properly when Background Animations->Show actual animations is enabled, but the transparent color in the BAM is something other than the traditional green (such as BW1's stupid teal color).  The BAM renders properly in the game (BG2).

Actual BAM background color shouldn't matter as long as it's located at palette index 0. Can you provide a BAM sample for me to test?

 

After further examination, I think the 1st issue was a problem with the actual tileset and not an issue with NI, although I'm a bit surprised it wasn't visible in-game.

 

Here is the offending BAM from the second issue.  I have processed it through PS BAM to fix the palette, and it renders as expected in NI afterward.  Here is the original:

Attached File  ysflwht1.rar   1.69K   26 downloads


"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

-- to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#983 Sam.

Sam.
  • Modder
  • 1106 posts

Posted 01 December 2019 - 12:58 PM

Existent sound files are sometimes not found by NI's interface.  For example:

Load BGEE V2.5

Navigate to AR0100.ARE -> Songs -> Main ambient (day) 1

Notice that is is looking for AMB_M13A.WAV, which is not found in the combo box at the bottom of the window.

Go back to the main GUI, and click on the find resources button.

Search for AMB_M13A.WAV

Notice that it does exist and is found contained within SFXSOUND.BIF.

 

This bug results in many false positive results when using Tools -> Check -> For Illegal ResourceRefs...

 

I am using Near Infinity v2.1-20180615.  Is there a newer compiled release?


"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

-- to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#984 skellytz

skellytz
  • Member
  • 90 posts

Posted 02 December 2019 - 02:10 PM

Existent sound files are sometimes not found by NI's interface.

NI has been annoying like that the whole time. It was very frustrating when I was doing research for my projects a few years ago. At the time I thought it was because NI couldn't handle all the biffing.



#985 Sam.

Sam.
  • Modder
  • 1106 posts

Posted 02 December 2019 - 03:46 PM

I thought maybe it was an issue with the resource in question having the potential of being either a WAV, WAVC, or OGG file, but I haven't actually looked into it.

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

-- to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#986 skellytz

skellytz
  • Member
  • 90 posts

Posted 02 December 2019 - 04:35 PM

Does it happen only in some sections for you, too? For example, main ambients in area songs. But if you try to use AMB_M13A in any of the area ambients or spell casting sounds, it will show up in the box.



#987 Argent77

Argent77
  • Staff
  • 1083 posts

Posted 03 December 2019 - 10:19 AM

 Additionally, BAMs don't seem to render properly when Background Animations->Show actual animations is enabled, but the transparent color in the BAM is something other than the traditional green (such as BW1's stupid teal color).  The BAM renders properly in the game (BG2).

Actual BAM background color shouldn't matter as long as it's located at palette index 0. Can you provide a BAM sample for me to test?

That's likely a bug in NI. The code is hardcoded to use the legacy BG1 method for determining the transparent color (I don't remember anymore why I implemented it like that in the first place). It should be easy to fix. 
 

Existent sound files are sometimes not found by NI's interface.  For example:
Load BGEE V2.5
Navigate to AR0100.ARE -> Songs -> Main ambient (day) 1
Notice that is is looking for AMB_M13A.WAV, which is not found in the combo box at the bottom of the window.
Go back to the main GUI, and click on the find resources button.
Search for AMB_M13A.WAV
Notice that it does exist and is found contained within SFXSOUND.BIF.
 
This bug results in many false positive results when using Tools -> Check -> For Illegal ResourceRefs...
 
I am using Near Infinity v2.1-20180615.  Is there a newer compiled release?

This is caused by a piece of legacy code that hasn't been updated for the EE games yet. It limits the search for WAV files to a few selected BIFF archives and the override folder. That issue should also be easy to fix.



#988 Sam.

Sam.
  • Modder
  • 1106 posts

Posted 16 December 2019 - 07:05 PM

Thanks, looking forward to the update.

 

I have run into a handful of BAMs that cause my PS BAM utility to crash when trying to read them.  When I tried loading one with NI, it wasn't able to handle it either. However, BAMWorkshop, BAMWorkshopII, and DLTCEP seem to be able to read them properly.  Contents of the Debug Console:

 

Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException
    at java.nio.Buffer.checkIndex(Unknown Source)
    at java.nio.HeapByteBuffer.get(Unknown Source)
    at org.infinity.resource.graphics.BamV1Decoder.decodeFrame(Unknown Source)
    at org.infinity.resource.graphics.BamV1Decoder.frameGet(Unknown Source)
    at org.infinity.resource.graphics.BamV1Decoder$BamV1Control.cycleGetFrame(Unknown Source)
    at org.infinity.resource.graphics.BamResource.updateCanvas(Unknown Source)
    at org.infinity.resource.graphics.BamResource.showFrame(Unknown Source)
    at org.infinity.resource.graphics.BamResource.makeViewer(Unknown Source)
    at org.infinity.gui.ViewFrame.setViewable(Unknown Source)
    at org.infinity.gui.ViewFrame.<init>(Unknown Source)
    at org.infinity.gui.OpenFileFrame.openExternalFile(Unknown Source)
    at org.infinity.gui.OpenFileFrame.actionPerformed(Unknown Source)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$500(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

 

Apparently the game engine loads them fine.  Can you tell exactly where the issues is?  I haven't had time to pinpoint the exact issue yet, but maybe the last frame's frame data is simply truncated early?  Edit:  test BAM seems to indicate this is the case.  Loading and saving with DLTCEP adds a single 0x00 to the end of the file.

Attached File  grnbow.rar   1.23K   30 downloads


Edited by Sam., 16 December 2019 - 07:27 PM.

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

-- to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#989 Argent77

Argent77
  • Staff
  • 1083 posts

Posted 29 December 2019 - 07:36 AM

Thanks, looking forward to the update.
 
I have run into a handful of BAMs that cause my PS BAM utility to crash when trying to read them.  When I tried loading one with NI, it wasn't able to handle it either. However, BAMWorkshop, BAMWorkshopII, and DLTCEP seem to be able to read them properly.  Contents of the Debug Console:
 

Spoiler

Apparently the game engine loads them fine.  Can you tell exactly where the issues is?  I haven't had time to pinpoint the exact issue yet, but maybe the last frame's frame data is simply truncated early?  Edit:  test BAM seems to indicate this is the case.  Loading and saving with DLTCEP adds a single 0x00 to the end of the file.
attachicon.gifgrnbow.rar

From what I can see the RLE encoding of transparent pixels in the second frame of the BAM contains some errors which results in a buffer overflow. Even DLTCEP warns you about it. I'd suggest to reencode the BAM, possibly without RLE encoding (frame compression) or use another tool for the encoding operation.
 



#990 Sam.

Sam.
  • Modder
  • 1106 posts

Posted 29 December 2019 - 11:03 AM

Thanks, looking forward to the update.
 
I have run into a handful of BAMs that cause my PS BAM utility to crash when trying to read them.  When I tried loading one with NI, it wasn't able to handle it either. However, BAMWorkshop, BAMWorkshopII, and DLTCEP seem to be able to read them properly.  Contents of the Debug Console:
 

Spoiler

Apparently the game engine loads them fine.  Can you tell exactly where the issues is?  I haven't had time to pinpoint the exact issue yet, but maybe the last frame's frame data is simply truncated early?  Edit:  test BAM seems to indicate this is the case.  Loading and saving with DLTCEP adds a single 0x00 to the end of the file.
attachicon.gifgrnbow.rar

From what I can see the RLE encoding of transparent pixels in the second frame of the BAM contains some errors which results in a buffer overflow. Even DLTCEP warns you about it. I'd suggest to reencode the BAM, possibly without RLE encoding (frame compression) or use another tool for the encoding operation.

I ended up modifying PS BAM to handle it.


"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

-- to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#991 Luren

Luren
  • Member
  • 7 posts

Posted 21 March 2020 - 11:50 PM

Hi Argent77,

And thanks a lot for all the time you spend on working on NearInfinity.

Recently, while working on an object for IWD2, I noticed an error in NearInfinity, in the list of values associated with the opcode #402. It seems that you have taken the one from the opcode #290, but it turns out that it is slightly different, as we can check in the effects.src file, and as the IESDP also indicates.
It was when I wanted to create an object with the effect #402 that I realized this. The effect applied while the values entered (80 -> Near enemies | 86 Daytime) had to ensure that it did not apply! Indeed in the list of the Effects.src file, the values are different (80 -> not goblin | 86 not keg).
 
effect #290

Spoiler


effect #402

Spoiler


Edited by Luren, 21 March 2020 - 11:58 PM.

banniere_small1.jpg


#992 Argent77

Argent77
  • Staff
  • 1083 posts

Posted 23 March 2020 - 09:24 AM

Recently, while working on an object for IWD2, I noticed an error in NearInfinity, in the list of values associated with the opcode #402. It seems that you have taken the one from the opcode #290, but it turns out that it is slightly different, as we can check in the effects.src file, and as the IESDP also indicates.
It was when I wanted to create an object with the effect #402 that I realized this. The effect applied while the values entered (80 -> Near enemies | 86 Daytime) had to ensure that it did not apply! Indeed in the list of the Effects.src file, the values are different (80 -> not goblin | 86 not keg).

Thank you. I'll add a fix.

 

Btw, I have recently started coding again (after a prolonged time of absence). I'll probably publish a new version shortly.