Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Feature Request: Alpha Image Masking (https://forums.graalonline.com/forums/showthread.php?t=134263607)

Tigairius 06-20-2011 04:56 AM

Feature Request: Alpha Image Masking
 
I will keep it super short.

I whipped up a quick gif example; I'd like to be able to have some way to accomplish this on Graal in an efficient manner:

http://dl.dropbox.com/u/21094358/desiredlights.gif

I think there is more information here (thanks for the link dusty).

It opens up a lot of possibilities for light effects. Right now we can only draw images on top of each other. I'd like to be able to use alpha-transparent images to "cut into" other images/polygons.

cbk1994 06-20-2011 04:58 AM

Would be really nice to see this. Light effects are quite limited now on Graal, and there are lots of times I could have utilized this.

smirt362 06-20-2011 05:00 AM

Masking in general would be nice
http://forums.graalonline.com/forums...4&postcount=97
http://forums.graalonline.com/forums...8&postcount=17

Fulg0reSama 06-20-2011 05:03 AM

Quote:

Originally Posted by cbk1994 (Post 1655434)
Would be really nice to see this. Light effects are quite limited now on Graal, and there are lots of times I could have utilized this.

I concur, I've seen a lot of good effects that could be even better due to the current limitations.

Hoyt1134 06-26-2011 07:48 PM

This is something I have been looking for in Graal for a long time, even going so far as developing tile-based lighting to make up for it. Within the last couple of days though, I have had some luck in creating a system just like what you are looking for. I'll post an update in a day or 2 when I work out some of the larger bugs plaguing it. The major problem I've had is the inability to rotate the light images, but everything else looks good. I was able to do additive colored lights without any weird artifacts where they overlap, which would allow for things like a red light overlapping a blue light to produce purple, but a red light crossing a white light remains white, since white already contains red light. It looks just like the image you posted on the right side except there is no white glow around it, it just transitions from transparent to black.

It also allows you to vary the background color, just like how seteffect works, being able to go to basically pitch black for night-time sneaking games and lighten up to transparent for day time. I just started GS2 like 2 days ago so whatever code I post will probably be really hacky, but I'm sure someone else will be able to make something nice out of it. I'll post a couple screenshots later on tonight if I'm able. Not sure if there are posting restrictions on classic accounts.

DustyPorViva 06-26-2011 08:03 PM

Would really love this, and have been asking for it for years. Only way I could pull it off was with a drawing panel, which was sluggish and limited.

Graal needs to work on its presentation, it's a bit demoralizing when you can't do even half of the things a console over a two decades old could do.

Crow 06-26-2011 09:00 PM

I support this, and I've asked Stefan about it when he was on Atlantis RC recently. He said it could be done, but didn't show a "I'd like to do this!" reaction when he mentioned that he'd have to get it to work with DirectX :p Not sure what's the issue.

Hoyt1134 06-28-2011 03:59 PM

Quote:

Originally Posted by DustyPorViva (Post 1656297)
Would really love this, and have been asking for it for years. Only way I could pull it off was with a drawing panel, which was sluggish and limited.

Graal needs to work on its presentation, it's a bit demoralizing when you can't do even half of the things a console over a two decades old could do.

Yeah the drawing panel was what I used to get this effect, and it seems to slow down after around 30 images per 0.05 seconds are drawn to it, at least on my computer. Its a shame there is no built in support for this feature, it would be so nice for day/night systems and just adding atmosphere to the game.

haro41 08-18-2011 11:57 PM

Sorry for the old bump, but This is still an open topic and much desired feature of myself as well.
That effect is definitely possible, but only stationary objects, and their locations must be predefined, because a large black image would be placed over the level, with holes cut into the image where the lights are placed. If you move the lights, the image will have to be adjusted as well.

I suppose if you wanted to get fancy, you could make a large animated gif with moving holes. Like a train whizzing by would briefly illuminate the boarding gate.
Hell, you could make an animated mng with alpha transparent moving holes. Would look badass, but i can imagine the filsizes would be very large.

If you want... say, a hole over a light, and a mobile player as well, it doesnt work.

oo_jazz_oo 08-19-2011 12:07 AM

Quote:

Originally Posted by haro41 (Post 1664220)
Sorry for the old bump, but This is still an open topic and much desired feature of myself as well.
That effect is definitely possible, but only stationary objects, and their locations must be predefined, because a large black image would be placed over the level, with holes cut into the image where the lights are placed. If you move the lights, the image will have to be adjusted as well.

I suppose if you wanted to get fancy, you could make a large animated gif with moving holes. Like a train whizzing by would briefly illuminate the boarding gate.
Hell, you could make an animated mng with alpha transparent moving holes. Would look badass, but i can imagine the filsizes would be very large.

If you want... say, a hole over a light, and a mobile player as well, it doesnt work.

Or you could use showpoly() to black out the areas around the light images. Thats how i've accomplished this effect in the past. :P

There is a way to do this with gui images...Rufus showed me a screenshot of it before, its not pretty, and idk how it works, but its possible. lol

DustyPorViva 08-19-2011 12:45 AM

Quote:

Originally Posted by oo_jazz_oo (Post 1664222)
Or you could use showpoly() to black out the areas around the light images. Thats how i've accomplished this effect in the past. :P

There is a way to do this with gui images...Rufus showed me a screenshot of it before, its not pretty, and idk how it works, but its possible. lol

http://i.imgur.com/HHe5r.png
http://i.imgur.com/JGUXy.png

It looks as pretty as you want it to look. However, higher resolutions = more intensive. Though, I used this to my advantage and allowed for a quality option, letting the player pick lower quality resolutions which looked worse, but ran worse(and I mean they can run REALLY bad on older computers). Problems were 1) it's gui, they can be a pain to work with, especially when you don't want them to interfere with the gameplay and just be an overlay 2) it's not flexible. I couldn't make it opaque, nor from my recollection could I adjust the opacity at all. 3) It's run on the gui level, so it's always a frame behind the player in rendering.

Being able to draw polygons in the drawpanels in v6 may improve quality, but I'm not sure how well that performs.

smirt362 08-19-2011 12:50 AM

Vouching for this, for like the 4th time.

Hezzy002 08-19-2011 05:18 PM

Trivial to implement with a framebuffer object or render target..

smirt362 08-19-2011 10:09 PM

Speaking of things we'll never get, what happened to the flying stuff?

DustyPorViva 08-19-2011 10:24 PM

Quote:

Originally Posted by smirt362 (Post 1664343)
Speaking of things we'll never get, what happened to the flying stuff?

If someone is willing enough they can script it, because it was all scripted with no actual code committed to helping out with the task... or so I've been told. It's insanely disappointing anyways.


All times are GMT +2. The time now is 03:39 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.