Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: anarchist on February 05, 2011, 02:18:58 PM
-
I am creating a dialogue window, with some similarities to GITS.
I plan to have the two participants portraits at the top and bottom of the screen. I want to create an effect, a rectangle that starts black behind the image portrait and fades as it goes away from it.
I am using the blend tool of GIMP to crate the image with the effect I want. I add transparency in its background and I have the result I want.
I create a window and then a static area with the size of my image. But, trying to add the image seems to have no results. The image path (interface/dialogue/dialoge.png) is added but I cannot see the image.
My questions are:
1)Does Wintermute support this or do I have to use a workaround?
2)How should I export the image in GIMP so that Wintermute can handle such effects? (so far I have been trying .png, since .jpg cannot handle transparency).
-
Wintemute does support png files with transparency of course. You can upload the file to check if it's ok.
-
Or at least a screenshot of what you're trying to achieve, because I don't quite understand from the description.
-
if you save the image as a png file with RGBA, you'll get the desired effect. Note that jpg files don't support transparency.
-
I was talking about something like this: http://www.ghostinthesheet.com/dialog.jpg (http://www.ghostinthesheet.com/dialog.jpg)
metamorphium, how do I create that transparent rectangle that is placed behind the actor's portrait and contains the dialogue text?
What I do in GIMP is create an image with the right dimensions, filling it with black colour and reducing the layer opacity. In GIMP it shows it as I wish but exporting it to .png creates a grey image. I do not understand what you mean by RGBA.
As for why it was not visible when I added the image in the Window, I think that particular .png I tested was exported in a way that Wintermute cannot recognize.
Thank you all for your responses and I hope you can help me further.
-
I used the default png export options of gimp and the file works perfectly fine in wme. Can you please upload your png to check it?
-
I solved the issue where I set an image to a static control and it did not show, it was something stupid on my behalf :-[
But, from what I have found so far, .png cant handle opacity. I get this warning whenever I export a .png from GIMP. It just exports an image with grey background and that is also how Wintermute shows it in the game.
(http://img844.imageshack.us/img844/6739/dialogueleft.png)
-
As I already said I used the default png export settings of gimp and the png has transparency and it works perfectly fine in wme.
-
But, from what I have found so far, .png cant handle opacity.
PNG format definitely CAN handle opacity. I'm not familiar with Gimp, but perhaps you're using some conflicting options when saving the file?
-
anarchist, I am using Gimp for transparent PNG's all the time.
Simple google search would immediately yield for example this:
http://www.ehow.com/how_7717232_save-transparent-png-gimp.html
-
I have searched this multiple times and the results I always get is how to make some parts of the image fully transparent, while what I am looking for is for a black image than is see through (like the rectangle in the GITS dialogue), so I can place my dialogue text inside it.
-
I have searched this multiple times and the results I always get is how to make some parts of the image fully transparent, while what I am looking for is for a black image than is see through (like the rectangle in the GITS dialogue), so I can place my dialogue text inside it.
As I have mentioned twice, I did exactly that using the default png export of gimp and it works as it should. Please upload your png file to check it.
-
(http://img220.imageshack.us/img220/2128/blackwn.png)
This is one of the images I have been working. Obviously it is not transparent. Could you please upload a working example?
-
This file strange. I have no time to check it further but for some reason only photoshop sees it as transparent. For everything else it's just RGB 0,0,0. I created those files http://dl.dropbox.com/u/7421572/black.zip using gimp (2.7.1unstable) and they work in wme. I created a 1024x100 file, made it black RGB 0,0,0, changed opacity and exported to png using the default png settings.
-
Thanks odnorf those files work perfectly and thanks everybody for your answers. Sorry to be a bother but it was annoying not being able to do something so trivial. If I find out was I was doing wrong I will let you know.