HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: GUIs on Billboards being affected by HDR  (Read 1139 times)

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
GUIs on Billboards being affected by HDR
« on: Jun 27, 15, 05:29:33 PM »

I returned today to putting some guis on billboards via the CreateBillboardFromGUIControl() command, specifically in a game area.  I was finding that the gui was appearing a lot darker than it does when in 2D.  The billboard was set to ignore lighting, and setting its Diffuse property did not help, nor did adjusting the gui's presentation settings.  With a good deal of experimentation in a Clean Test area, I finally found that if HDR was enabled when CreateBillboardFromGUIControl() was called, the gui was dark, but if HDR was disabled when that function is called, the gui looks correct.  And then HDR can be enabled after that without affecting the look of the gui.

For reference, I attached some pics showing the normal look of the gui, and then after adding to a billboard while HDR is on.

I see in this old thread
https://community.heroengine.com/forums/index.php/topic,3651.msg20227.html#msg20227
that HDR cannot be turned off via script, so disabling-creating-reenabling is not an option, and could look bad anyways.

Could the way CreateBillboardFromGUIControl() works be changed to ignore HDR?  That would help a lot.
« Last Edit: Jun 27, 15, 05:36:21 PM by FI-ScottZ »
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: GUIs on Billboards being affected by HDR
« Reply #1 on: Jun 27, 15, 08:34:43 PM »

Here is another issue I am finding: that whenever a gui on a billboard has its layout updated, which happens really anytime something on it changes, it causes most of the model instances in the area to flicker briefly, as if they had their rendering interrupted.

To be sure it wasn't just an issue with our guis or area, I tried it in a Clean Test instance.  I wrote these functions in a client script so I could call them from the Console:
Code: [Select]
function PutGUIInBB(guiControlID as String)
  var bb = CreateBillboardFromGUIControl(guiControlID)
  println("PutGUIInBB, guiControlID: "+guiControlID+" bb: "+bb)
.

function Force(gui as String)
  ForceLayout(gui)
.

Then I created an instance of _button and called PutGUIInBB on it to create the billboard.  Then I added an instance of cube.hgm to the area from the Asset Library under Clean Engine.

As I repeatedly called the Force function, the both the button image and the cube would occasionally flicker with the execution of the function.  Not every time, but multiple times to be sure.  In our game area it is every time and most of the models, which might be due to the larger number of models in the area.

EDIT: I just found another wrinkle: when I mouse over the button on the billboard, the button, the cube, and even the shadow under my player character all flicker repeated the whole time I move the cursor on the button.  That one should be easy to reproduce.
« Last Edit: Jun 27, 15, 08:58:59 PM by FI-ScottZ »
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.