Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-20-2011, 04:56 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
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:



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.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #2  
Old 06-20-2011, 04:58 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
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.
__________________
Reply With Quote
  #3  
Old 06-20-2011, 05:00 AM
smirt362 smirt362 is offline
Tee Hee
smirt362's Avatar
Join Date: Feb 2005
Location: Texas
Posts: 2,101
smirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant future
Send a message via AIM to smirt362 Send a message via MSN to smirt362
Masking in general would be nice
http://forums.graalonline.com/forums...4&postcount=97
http://forums.graalonline.com/forums...8&postcount=17
__________________

Don Hertzfeldt <3
Reply With Quote
  #4  
Old 06-20-2011, 05:03 AM
Fulg0reSama Fulg0reSama is offline
Extrinsical Anomaly
Fulg0reSama's Avatar
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
Fulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant future
Quote:
Originally Posted by cbk1994 View Post
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.
__________________

Careful, thoughts and opinions here scare people.
Reply With Quote
  #5  
Old 06-26-2011, 07:48 PM
Hoyt1134 Hoyt1134 is offline
Registered User
Join Date: Jul 2004
Posts: 18
Hoyt1134 is on a distinguished road
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.
Reply With Quote
  #6  
Old 06-26-2011, 08:03 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
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.
Reply With Quote
  #7  
Old 06-26-2011, 09:00 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
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 Not sure what's the issue.
__________________
Reply With Quote
  #8  
Old 06-28-2011, 03:59 PM
Hoyt1134 Hoyt1134 is offline
Registered User
Join Date: Jul 2004
Posts: 18
Hoyt1134 is on a distinguished road
Quote:
Originally Posted by DustyPorViva View Post
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.
Reply With Quote
  #9  
Old 08-18-2011, 11:57 PM
haro41 haro41 is offline
zenkou
haro41's Avatar
Join Date: Jul 2003
Location: Sol Grotto
Posts: 689
haro41 will become famous soon enough
Send a message via AIM to haro41
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.
__________________

Zenkou for life
Reply With Quote
  #10  
Old 08-19-2011, 12:07 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Quote:
Originally Posted by haro41 View Post
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
__________________

Reply With Quote
  #11  
Old 08-19-2011, 12:45 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by oo_jazz_oo View Post
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



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.
Reply With Quote
  #12  
Old 08-19-2011, 12:50 AM
smirt362 smirt362 is offline
Tee Hee
smirt362's Avatar
Join Date: Feb 2005
Location: Texas
Posts: 2,101
smirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant future
Send a message via AIM to smirt362 Send a message via MSN to smirt362
Vouching for this, for like the 4th time.
__________________

Don Hertzfeldt <3
Reply With Quote
  #13  
Old 08-19-2011, 05:18 PM
Hezzy002 Hezzy002 is offline
Registered User
Join Date: Jul 2011
Posts: 247
Hezzy002 is a jewel in the roughHezzy002 is a jewel in the rough
Trivial to implement with a framebuffer object or render target..
Reply With Quote
  #14  
Old 08-19-2011, 10:09 PM
smirt362 smirt362 is offline
Tee Hee
smirt362's Avatar
Join Date: Feb 2005
Location: Texas
Posts: 2,101
smirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant future
Send a message via AIM to smirt362 Send a message via MSN to smirt362
Speaking of things we'll never get, what happened to the flying stuff?
__________________

Don Hertzfeldt <3
Reply With Quote
  #15  
Old 08-19-2011, 10:24 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by smirt362 View Post
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:02 AM.


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