In response to Lummox JR
Lummox JR wrote:

edit: Also a big question that I have is: Would it be possible to use this color matrix to have a multi colored client.screen?

I don't follow. The client.color value is basically map-wide, if that's what you mean.

In that case, is it possible to have multiple simultaneous colors within a specific area?(Example: If I want to have multiple different colored rays of light drop down on a specific location) Is there anything available that can do that?

Also everything else was great, it's not quite clear yet but once I start messing with it I'll pick it up much faster with this to reference.
In response to Exentriks Gaming
Exentriks Gaming wrote:
In that case, is it possible to have multiple simultaneous colors within a specific area?(Example: If I want to have multiple different colored rays of light drop down on a specific location) Is there anything available that can do that?

In 509, no. I'm strongly considering (as in, actually planning out) a feature in 510 that would allow for lighting of the type you're describing.

What I'm looking at for 510 is basically not so much a matrix thing, but a lighting layer. That is, you'd setup an atom on plane 1 (for instance) that had a blend_mode of BLEND_MULTIPLY. Then you'd have other atoms on plane 1 for the lights, which would use BLEND_ADD. (Probably you'd want something for ambient lighting also.) All the atoms would be drawn on plane 1, and then the entire plane would be blended over the map.
In response to Lummox JR
Lummox JR wrote:
Exentriks Gaming wrote:
In that case, is it possible to have multiple simultaneous colors within a specific area?(Example: If I want to have multiple different colored rays of light drop down on a specific location) Is there anything available that can do that?

In 509, no. I'm strongly considering (as in, actually planning out) a feature in 510 that would allow for lighting of the type you're describing.

What I'm looking at for 510 is basically not so much a matrix thing, but a lighting layer. That is, you'd setup an atom on plane 1 (for instance) that had a blend_mode of BLEND_MULTIPLY. Then you'd have other atoms on plane 1 for the lights, which would use BLEND_ADD. (Probably you'd want something for ambient lighting also.) All the atoms would be drawn on plane 1, and then the entire plane would be blended over the map.

So would doing it on a plane limit these lights to just being straight or could they possibly also be applied to objects and then blend that object over the map- Not sure if this is what you intend to do, I could be misunderstanding.
In response to Exentriks Gaming
Exentriks Gaming wrote:
So would doing it on a plane limit these lights to just being straight or could they possibly also be applied to objects and then blend that object over the map.

I'm not sure what you mean exactly.

What I think this would look like would be something like this:

obj/effect/light
icon = 'halo.dmi'
blend_mode = BLEND_ADD
plane = 1

New(radius, col)
color = col
var/trans = (32 - HALO_SIZE) / 2
radius = (radius * 32) / HALO_SIZE
transform = matrix(radius,0,trans,0,radius,trans)

obj/item/torch
New()
overlays += new/obj/effect/light(3, rgb(255,240,128))

All of the lights on plane 1 would be drawn to a blank canvas, and then plane 1 would be blended over the regular map with BLEND_MULTIPLY.
In response to Lummox JR
Lummox JR wrote:
Exentriks Gaming wrote:
So would doing it on a plane limit these lights to just being straight or could they possibly also be applied to objects and then blend that object over the map.

I'm not sure what you mean exactly.

What I think this would look like would be something like this:

obj/effect/light
> icon = 'halo.dmi'
> blend_mode = BLEND_ADD
> plane = 1
>
> New(radius, col)
> color = col
> var/trans = (32 - HALO_SIZE) / 2
> radius = (radius * 32) / HALO_SIZE
> transform = matrix(radius,0,trans,0,radius,trans)
>
> obj/item/torch
> New()
> overlays += new/obj/effect/light(3, rgb(255,240,128))

All of the lights on plane 1 would be drawn to a blank canvas, and then plane 1 would be blended over the regular map with BLEND_MULTIPLY.

Ah okay this is great! So if you wanted a multi colored light, you would just have to add differently colored objects(with the same plane) to the torch?

Since you're not entirely sure about the idea- this is something that a picture could really help with... You could post a picture of it in action when you get it to work and get our feedback.
I think what Exentrik is trying to convey, in simpler terms is-

Can you do this

In response to Rushnut
Rushnut wrote:
I think what Exentrik is trying to convey, in simpler terms is-

Can you do this


Not exactly, what I meant is- can you put all of those colors on ONE of those walls and see the individual rays shine through instead of just one blob of colors(although I think this could just be done with the proper icons). What you displayed I think is pretty much what Lummox is going to do.

That looks really cool regardless though...
In response to Exentriks Gaming
Exentriks Gaming wrote:
Not exactly, what I meant is- can you put all those colors on ONE of those walls and see the individual rays shimmering. What you displayed I think is pretty much what Lummox is going to do.

If I'm understanding you right, no, it won't be possible since it's all radial multiplication, I believe. I'm not TOO good at matrixes.
In response to Rushnut
I edited a bit to help explain better.
Shadowcasting isn't part of the deal, unfortunately.
Shadowcasting is possible with serious amounts of matrix tomfoolery, but not quite as easy as most would like it to be.
Static shadow casting is easily possible; dynamic shadow casting is possible too. Matrix doesn't need to be part of it in order for it to work, but to get a lot of different projections from various light sources quickly and without hogging the memory, 3rd party rendering may be needed.
With plane blend_modes, you could have colored lights with dynamic shadowcasting if you only compute brightness per tile vertex and linearly interpolate rgb values in between tile vertices. So that screenshot of Terraria isn't too far fetched for what may be possible in the very near future.
In response to D4RK3 54B3R
This is awesome! I like where we're headed.
Would it be possible for the "master" system to allow nesting?

For example, I want to designate the area covered by a light using several atoms, multiply those with a simple "point light" sprite to get attenuation, then composit all the lights together and multiply it with the lower layers.

This is doable without nesting, but requires a rather large spritesheet.
Nesting is not currently planned but it's something I'm thinking about, largely because there's already a request to be able to flatten an atom's overlays.
Page: 1 2