Jump to content
Eternal Lands Official Forums
Sign in to follow this  
Roja

Alpha mapping is broken on creature models

Recommended Posts

I was wondering if someone here can look into fixing the alpha mapping for the actors?

When it was first implemented by Learner we both tested it and everything worked fine. When we tested it that was back in May. Sometime after that it got broken.

Right now it does not work for creatures/monsters, but does work for character-player-models.

 

Unfortunately Learner doesn't have the time to look into it, and I'd really like to be able to use it for the upcoming update on the new dragon ;)

 

The way it should work is just by placing another bmp file in the meshes directory with _alpha.bmp as the extension. So like you have the color texture that's dragon.bmp, and it's alpha would be dragon_alpha.bmp

Share this post


Link to post
Share on other sites

I've commit a change that corrects the problem. The problem was that an actor had no way to know if an alpha texture was loaded for itself so it wasn't using it.

 

To correct this, I've added an has_alpha parameter in the texture_cache_struct which is filled upon the texture load and that specifies if the texture uses an alpha channel or not. Then, I copy the state of this parameter to the corresponding parameter in the actor structure when an actor is added by the add_actor function.

I don't know if it was the best way to do it because I've seen that it's done in a different way for enhanced actors. So if someone has more knowledge than me on this part of the code, it would be nice if he could have a look at it.

Share this post


Link to post
Share on other sites

Hello,

 

I found a new bug with the alpha maps. I made an _alpha.bmp for a weapon. If you log into the game, or change a map and put the weapon that has an alpha map on it works just fine. But if you log in or change a map while another(non alpha) weapon is equiped, then take that weapon off and put the alpha-weapon on, the alpha does not work. You have to change a map with the alpha weapon on for it to show.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×