Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Polygon cutout? (https://forums.graalonline.com/forums/showthread.php?t=134265473)

scriptless 12-31-2011 07:36 AM

Quote:

Originally Posted by DustyPorViva (Post 1680191)
The effect is made via drawing an image of a white circle over the black-filled drawingpanel. You can use softer images(excuse the low quality, I was trying a very low resolution):
http://i.imgur.com/lJg0n.png

I also saw that example. So fill the surface black and draw a circle at the x/y of the source to light up.. your brigness fades into darkness.. im asumming you used a gfx for this?

and you apply an alpha of .99 or less and the whiter the color the brighter it is?

DustyPorViva 12-31-2011 07:40 AM

Quote:

Originally Posted by scriptless (Post 1680192)
I also saw that example. So fill the surface black and draw a circle at the x/y of the source to light up.. your brigness fades into darkness.. im asumming you used a gfx for this?

and you apply an alpha of .99 or less and the whiter the color the brighter it is?

1) Creative drawing panel with the size of screenwidth/quality,screenheight/quality
2) fill black
3) draw image for each light source(white circles, with transparency(semi-transparency for softer edges) by via screenx(posx,posy)*quality,screeny(posx,posy)*qual ity
4) render drawing panel at 0,0 and at the scale of quality

I haven't looked at the script in a long time though, so I could be making mistakes... but as for flexibility? You're kind of screwed. Last time I tried this it was either totally opaque, or 99% transparent. Those were the only levels of transparency it would allow.

Honestly, you'd be better off looking at the script yourself, as I'm working from memory here.

scriptless 12-31-2011 07:47 AM

Quote:

Originally Posted by DustyPorViva (Post 1680193)
1) Creative drawing panel with the size of screenwidth/quality,screenheight/quality
2) fill black
3) draw image for each light source(white circles, with transparency(semi-transparency for softer edges) by via screenx(posx,posy)*quality,screeny(posx,posy)*qual ity
4) render drawing panel at 0,0 and at the scale of quality

I haven't looked at the script in a long time though, so I could be making mistakes... but as for flexibility? You're kind of screwed. Last time I tried this it was either totally opaque, or 99% transparent. Those were the only levels of transparency it would allow.

Honestly, you'd be better off looking at the script yourself, as I'm working from memory here.

I will do some searching to see if I can find it I guess. I have idea's that might work.. but im not sure the math on it. What if I did seteffect() with this? I know the blackness would be darker. Not sure the math on that tho..

Or just making the center of the white space "softer" ?



EDIT:
Oh, I see what you mean. I have to make the darkness totally black. Hmm. I would need to play with the script to see what I can come up with.

Might this be what you speak of?
http://forums.graalonline.com/forums...t=DustyPorViva


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

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