桃源境 Index du Forum
桃源境
~ Asia Lovers ~
 
桃源境 Index du ForumFAQRechercherMembresGroupesProfilS’enregistrerConnexion

Color and alpha blending questions

 
Poster un nouveau sujet   Répondre au sujet    桃源境 Index du Forum -> Espace Membres -> ► Discussions Diverses & Debats
Sujet précédent :: Sujet suivant  
Auteur Message
Sebastian


Hors ligne

Inscrit le: 26 Avr 2018
Messages: 10

MessagePosté le: Mer 6 Juin - 13:58 (2018)    Sujet du message: Color and alpha blending questions Répondre en citant

Hello,


I'm trying to achieve a couple of basic visual effects in my game, and since shaders aren't supported in Slick (I wouldn't know how to make them anyway), I need help figuring out how to approach creating the visual effects that my game needs.The first effect I need is a "flashlight". In the previous iteration of this game that was done in Swing/AWT in 2013, I created a completely black image with transparency, and then I would blend various shapes (radial gradients or polygons) into to subtract from the darkness and essentially create light, then draw it on top of everything.So far, I have not seen an easy way of achieving this in Slick, but I have been more focused on the second problem, which is that I need to create a "night vision" effect, where I put a slightly transparent gray filter over everything, and then draw a white filter over the enemies so they appear like heat signatures, which would look like infrared night vision. The gray filter doesn't seem like it would be any more difficult than rendering a rectangle with the color (0.4f, 0.4f, 0.4f, 0.25f) or something similar. However, I have not been able to get a "white filter" over my images. Whenever I try to apply the color (1.0f, 1.0f, 1.0f) as a filter color in the g.drawImage() method, it simply draws the image as normal. I'm assuming this is because the color filter is simply a multiplication effect, leading it to just show the original color.I have also tried drawing the image's "flash", then trying various draw modes and drawing the original image over it. The most promising was to color multiply the original image over the flash, but it was not white enough and made the transparent shadows under the enemies look strange.Does anyone know of a way I can achieve this?


Please help.


I didn't find the right solution from the Internet.


References:-
http://slick.ninjacave.com/forum/viewtopic.php?f=3&t=8448
Real Estate Video marketing




Thanks


Revenir en haut
Publicité






MessagePosté le: Mer 6 Juin - 13:58 (2018)    Sujet du message: Publicité

PublicitéSupprimer les publicités ?
Revenir en haut
Montrer les messages depuis:   
Poster un nouveau sujet   Répondre au sujet    桃源境 Index du Forum -> Espace Membres -> ► Discussions Diverses & Debats Toutes les heures sont au format GMT + 2 Heures
Page 1 sur 1

 
Sauter vers:  

Index | Panneau d’administration | Creer un forum | Forum gratuit d’entraide | Annuaire des forums gratuits | Signaler une violation | Conditions générales d'utilisation
Powered by phpBB © 2001, 2005 phpBB Group
Traduction par : phpBB-fr.com
Thème Pluminator imaginé et réalisé par Maëlstrom