Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: Weird Problem with a Sprite Entity  (Read 4976 times)

0 Members and 1 Guest are viewing this topic.

Blue_D

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 66
  • I'm a llama!
    • View Profile
Weird Problem with a Sprite Entity
« on: January 21, 2004, 06:12:11 PM »

Hi, I've created a scene with a sprite entities, but the engine only recongnize it when I'm with the cursor (the default cursor of the Molly project from the tutorial) on the border of the object.

When I'm with the cursor in the center of the object the cursor stays white and nothing seems to happen.

What's wrong?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Weird Problem with a Sprite Entity
« Reply #1 on: January 21, 2004, 06:44:27 PM »

Hmm, I can think of two possible causes, either the image is partially transparent (via the alpha channel maybe) or it's partially hidden behind some other object.
None of those is very likely, though. In debug mode, you can also check the name of the object the mouse is above (it's written pn the right side of the screen).

If you want, you can send me your scene folder and I'll check it out.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Weird Problem with a Sprite Entity
« Reply #2 on: February 04, 2004, 09:39:36 AM »

Yes, it's most likely the alpha channel problem. The alpha is 254 or something so WME is considering the object transparent. I'll increase the alpha sensitivity to make an area transparent when it's opacity is below 50% or so. Sorry about that.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Blue_D

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 66
  • I'm a llama!
    • View Profile
Re:Weird Problem with a Sprite Entity
« Reply #3 on: February 04, 2004, 01:39:19 PM »

Quote
Yes, it's most likely the alpha channel problem. The alpha is 254 or something so WME is considering the object transparent. I'll increase the alpha sensitivity to make an area transparent when it's opacity is below 50% or so. Sorry about that.

How does the alpha channel works in the png files?

I'm asking because photoshop opens a png file without the alpha channel and when I try to open the picture named dvd.png (you have it in the project I sent you) in photoshop I can't see the halo of the green light, but this halo shows in the game. What's wrong?

What can I do?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Weird Problem with a Sprite Entity
« Reply #4 on: February 04, 2004, 06:55:02 PM »

Ok, please download an updated wme.exe here:

http://dead-code.org/download/wme_latest.zip

Replace the old wme.exe. Transparency should work now even with your PNG files :)
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Blue_D

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 66
  • I'm a llama!
    • View Profile
Re:Weird Problem with a Sprite Entity
« Reply #5 on: February 04, 2004, 07:13:27 PM »

Thank you, now it works fine. Can you explain me what I was doing wrong before and if possible a workaround?

I think this thing should be a source of problems and better be in the help file.

Thank you for the help!
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Weird Problem with a Sprite Entity
« Reply #6 on: February 04, 2004, 07:20:25 PM »

The problem was, that WME considered an area of an image non-transparent only if it didn't have an alpha value of 255. In your case, the entire image had a lower alpha value, therefore the image appeared to be transparent and didn't recieve mouse events.
Now, WME takes an area for transparent only if it has an alpha lower than 128 (50% transparency) so it shouldn't be a problem anymore.

As for your PNG files, I don't know how they are created. They contain transparent areas but no alpha channel. I've never seen that before...
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Blue_D

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 66
  • I'm a llama!
    • View Profile
Re:Weird Problem with a Sprite Entity
« Reply #7 on: February 04, 2004, 07:56:21 PM »

Quote
As for your PNG files, I don't know how they are created. They contain transparent areas but no alpha channel. I've never seen that before...

Done with Maya 5.01, don't know how the hell is possible but evidently Maya uses some kind of transparency not well documented. I will do some further investigations.
Logged
 

Page created in 0.035 seconds with 19 queries.