YOUR ACCOUNT

Login or Register to post new topics or replies
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
n00b question:

Is there a way to convert the incoming aa_zones of a source map input to RGB via Map Script?
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Why do you need this? If for use in filters, then I wouldn't recommend that. AAZones are a purely internal feature, its implementation may vary from version to version and from patch to patch, so there's no guaranteed consistency to its output.
  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
Well, I was looking at the RGB renderings of AAZones of various filters recently, and it occurred to me that many of these these look a lot like color-coded Region-IDs.

(...probably because they are. smile;))

If we could somehow pull this data into the RGB space of a Map Script, then it should be possible to isolate those regions by color, compute their bounding boxes and centers, and generate some form of region-based gradients off of that.

It's probably a whole lot more complicated then that, but it's just an idea I've been speculating about, wondering if this would be possible at all.

(You know, Dilla loves the region-based gradients) smile:D
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Quote
compute their bounding boxes and centers.


That's where the main difficulty lies.

To discover the contour of an implicitly defined shape (implicitly means "defined as a function, not as a polygon or bitmap") you have to sample it, starting from point within the shape and gradually moving outwards, towards the shape edges.

Imagine trying to dicover the contour of a complex shape painted on a graph paper, while blindfolded. You have a pencil that you can poke the shape with, and a friend that tells you whether you hit the shape with your last poke or not, and if you did hit it, he also tells you the hit coordinates (that's the reason why we're using graph paper). You can then use these coordinates to build a contour, a map, a bounding box or whatever other kind of model you're constructing.

Imagine how many pokes you would need in order to discover a complex shape, for example a chinese hieroglyph, with sufficient precision.

And that's just the first step, sampling. Next you will need to store the discovered contour in memory so that you don't have to rediscover it every time you receive a get_sample() call.

To recap, a quality implementation of this is far from trivial.
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Update: the blindfolded shape poking analogy is slightly inaccurate: it implies that poke coordinates are random and cannot be controlled by you. A better analogy would be as follows: you tell the poke coordinates to a friend and he checks whether or not they lie within the shape. This way you can select the coordinates for your next poke on the results of your previous pokes.
  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
Ok, so my guess is: 'AA_zones -> RGB' is impossible (i.e. not implemented), because it wasn't intended to be used in scripts at all.

I understand that we can't even begin to tackle region-based gradients in an efficient manner without a working Bitmap Script component that delivers a 'bitmap signal' of the AA_zone data that is defined implicitly by the preceding filter tree.

So I'm going to rephrase my initial question:

Assuming we had a Bitmap Script component in FF, would it make sense to make this AA_zone 'region-ID' data accessible to bitmap scripts? After all, isn't this data basically available/delivered 'for free'?
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Quote
Ok, so my guess is: 'AA_zones -> RGB' is impossible (i.e. not implemented), because it wasn't intended to be used in scripts at all.


Yes, with an important correction: it wasn't intended to be used in scripts for producing the RGB output, for reasons I stated above (in the second post of this thread.)

Quote
Assuming we had a Bitmap Script component in FF, would it make sense to make this AA_zone 'region-ID' data accessible to bitmap scripts? After all, isn't this data basically available/delivered 'for free'?


The data would be accessible to bitmap scripts, because the scripts can be 'mixed', not purely bitmap-based, but I still wouldn't recommend using AA Zones in RGB output.
  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
Well, that concludes our speculation time for today then. smile;)
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
Betis
The Blacksmith

Posts: 1207
Filters: 76
On a similar note: what about outputting an RGB of the AA zones just because it looks cool? like an AA-Zone component? (unless that's what dilla was asking in the first place)
Roses are #FF0000
Violets are #0000FF
All my base are belong to you.
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Betis, it does look cool, but we can't guarantee that it will look the same way between different versions of components, rendering engine etc. See my replies on this above.
  Details E-Mail

Join Our Community!

Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!

33,711 Registered Users
+18 new in 30 days!

153,531 Posts
+36 new in 30 days!

15,347 Topics
+72 new in year!

Create an Account

Online Users Last minute:

37 unregistered users.