Mittens 2016 planning is underway, with a current suggestion of Sweden. Please visit the thread to see if you'd like to attend!

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Messages - Snarky

Pages: [1] 2 3 ... 214
Advanced Technical Forum / Re: Invert Transparency Mask
« on: 25 Apr 2016, 15:16 »
Pretty sure that won't work. You probably won't be able to tint the character to "magic pink", and if you do manage to do so, drawing it on top of the other sprite will achieve nothing, since drawing transparent on top of non-transparent doesn't wipe out the region below, AFAICR.

Advanced Technical Forum / Re: Invert Transparency Mask
« on: 25 Apr 2016, 11:44 »
But that's not the effect he wants, though. He wants the rim lighting on the character, because that's, you know, right.

Don't count on me or let this interfere with your decision, since it depends on a lot of other things, but if it's in Sweden I might come after all, at least for part of it.

Beginners' Technical Questions / Re: Total number Views
« on: 24 Apr 2016, 18:56 »
There's no limit!

<a href="" target="_blank" class="new_win"></a>

(As of AGS 3.2.1 and later, at least)

Advanced Technical Forum / Re: Invert Transparency Mask
« on: 22 Apr 2016, 08:02 »
CW, I don't think you read that carefully enough. In the first chunk, you convert the alpha value to a black-white gradient by copying it over to a black sprite (with CopyTransparencyMask()), which you then draw on top of a white one (with DrawSurface()). Now you can use GetPixel() on the result and check the brightness of that color to find the alpha of the original mask. (Actually it might be better to use a red-black gradient, because that way you can get the intensity from a simple right-shift of the AGS color value. Edit: No, use a green-black gradient, since the green channel has an additional bit of precision. But you still only get 6 bits of the 8-bit alpha, and then you have to convert to an integer percentage in the next step, so there's quite a bit of loss of precision in the process.)

And the fact that DrawingColor doesn't let you set alpha is the whole reason for the convoluted workaround where you use DrawSurface() to draw each pixel individually, since DrawSurface() does allow you to specify the opacity.

Advanced Technical Forum / Re: Invert Transparency Mask
« on: 22 Apr 2016, 02:45 »
It just occurred to me how you could do it with alpha-opacity, though this is going to be really slow:

-Create two dynamic sprites, fill one with black and one with white.
-Copy the transparency mask from your source to the black sprite.
-Get the drawing surfaces for each, and draw the black onto the white.

This should give the reverse mask as a black-white mask (with grays for semi-transparency).

Now unfortunately there's no way to directly apply that mask, or even to draw an image pixel-by-pixel with transparency. However, you can draw surfaces with transparency. So what you'll have to do is:

-Create a blank "transparent pixel surface" and a target dynamic sprite, both the same size as the sprite you need to mask.
-Loop through the sprite pixel by pixel.
-For each pixel:
*Use GetPixel() to get the AGS color from the sprite you want to mask, and put a pixel of that color on the transparent pixel surface in the same position.
*Also use GetPixel() to read the opacity from the reverse mask you created. (You need to decode the value.)
*Now get use DrawSurface() to draw the transparent pixel surface onto the target dynamic sprite, at the appropriate opacity.
*Clear the transparent pixel surface.

Advanced Technical Forum / Re: Invert Transparency Mask
« on: 21 Apr 2016, 16:21 »
I think this is the only way to do it in AGS script, and I can't guarantee that it will work:

-Create a dynamic sprite dsInvertedMask of the same dimensions as your mask source, clear it to COLOR_TRANSPARENT
-Loop through every pixel in the sprite whose mask you want to invert with DrawingSurface.GetPixel(). Compare it to COLOR_TRANSPARENT. If transparent, put a pixel of any color (e.g. white) in dsInvertedMask

This should give you an inverted mask, and you can use DynamicSprite.CopyTransparencyMask() to apply it to the sprite you want to mask.

However, this is likely to be very slow.

General Discussion / Re: Journal versus Diary
« on: 20 Apr 2016, 16:08 »
I have never once heard anyone use the word "diarist".
Are you sure that's a real word?

Oh, and the OED has a neat feature to classify words into "frequency bands" based on how commonly used they are. "Diarist" is in Band 4:

Band 4 contains words which occur between 0.1 and 1.0 times per million words in typical modern English usage. Such words are marked by much greater specificity and a wider range of register, regionality, and subject domain than those found in bands 8-5. However, most words remain recognizable to English-speakers, and are likely be used unproblematically in fiction or journalism. Examples include overhang, life support, rewrite, nutshell, candlestick, rodeo, embouchure, insectivore (nouns), astrological, egregious, insolent, Jungian, combative, bipartisan, cocksure, methylated (adjectives), intern, sequester, galvanize, cull, plop, honk, skyrocket, subpoena, pee, decelerate, befuddle, umpire (verbs), productively, methodically, lazily, pleasurably, surreptitiously, unproblematically, electrostatically, al dente, satirically (adverbs).

... and the "days since this questions was asked" counter gets reset from 7 to 0:

General Discussion / Re: Journal versus Diary
« on: 19 Apr 2016, 20:11 »
A journal can be an official or professional document (e.g. a researcher might have a journal to log experimental results).

And as Danvzare says, a diary can be a planner.

But when used in the sense of a book with private, retrospective notes of what happened in a day, I think they are essentially synonymous and used interchangeably. For example, take the Wikipedia page on the Hitler Diaries: "The Hitler Diaries (German: Hitler-Tagebücher) were a series of sixty volumes of journals purportedly by Adolf Hitler, but forged by Konrad Kujau between 1981 and 1983. The diaries were purchased in 1983 for 9.3 million..."

There is perhaps a sense that journals are less narrative and more reflective than diaries, but I don't think you can make any meaningful firm distinction.

You're missing a semi-colon inside your loop, but if it compiles that's probably not the problem here. (I'm not sure why you've changed the code to say "[same array number]" when surely it should simply be "k". And is it deliberate that you're not using index 0?)

2. In dDocsPrep I saved the option number in an int var "opt".  In the sub-dialog where the player can choose if he wants to take a document or doesn't (Yes/No) and he chooses "yes", I coded "dDocInterview.SetOptionState(k,eOptionOn)".

result: No option is shown.

so what am I doing wrong?

Well, for one thing, you say you saved the current option number as "opt", but you're using "k" when setting the corresponding option on.

Well, that comes down to what you define as "art" (you seem only to consider fine art), and whether art has to great art to be art at all. I wouldn't normally think so.

I tend to think anything can be art, and that it's more a question of the attitude of the audience than the processes that created it. The idea that a lot of human personality and deliberation has to go into a work for it to be meaningful to audiences (that you need an active artist) is at best an assumption, and one that I think technologies such as this will in fact increasingly challenge.

There is always at the least a selection and curation process that defines what we approach as art. So I think it's valid to say: "I had the computer generate 2000 different image mashups, and this one came out to something really interesting" and have that be a piece of art.

Some reasults are pretty cool, but still this fucking devalues the artist. the human spirit imagines these artworks and creates it by hand and the machine just eats it.

I imagine they said the same thing when photography was invented.

Like others are saying, this is just another tool, like photographs or 3D modeling or Photoshop. Both fine artists and commercial illustrators have always taken advantages of tricks and shortcuts to make things easier for themselves (including things like standard templates that could be individually customized, assistants drawing in the easy bits, camera obscura and mirror tricks, and more recently photo reference and collage/xerography).

Perhaps with this some art jobs will go away, like some work in layout/design and typesetting went away when people could easily do it themselves digitally. But it's not like the world is lacking for designers or typographers! Artists will adapt.

It seems that what the program does is look for similar textures and forms in both pictures and then apply them from one to the other in progressive layers. In the portrait of the guy's face you can clearly see the folds from the woman's dress and the tablecloth being re-used in several places on his face.

So yeah: it is a very, very sophisticated graphics filter, but it's quite a stretch from that to worrying that "art" is being created by machines.

For example: In the first pictures Snarky posted: When I look at the actual painting of the street scene I get a true feeling of how the artist felt about this view and the particular and individual beauty of the elements that they thought were worth capturing and accentuating on their canvas. But...when I look at the computer generated scene which has borrowed this artist's vision out of context I just see a technically well-painted picture by a person talented in copying a real artist's physical techniques of brushstrokes etc, but completely without any particular elements that drawn my eye here and there and make me understand why the artist wanted to paint this picture.

Artistically, it's just a confusing mess.

Well, but partly that's because this is still early days, and partly it's just the deficiency of a not-very-interesting photo combined with a not-quite-suitable technique.

It doesn't seem at all hard to imagine that neural networks such as this could learn to identify and match features in the style and subject images more intelligently, so that you don't get a face made out of tablecloth (although that's an interesting effect in itself), but painted in the same style as specifically the faces in the source image. Something like what they did half-manually in the Rembrandt example. It could also quite conceivably measure depicted proportions and other features of the art, and compare to a database of photos to identify characteristic distortions (e.g. to understand how van Gogh depicted skin tones, or how Picasso abstracted, distorted and rearranged anatomy). And you could imagine an interactive version, where you could mark bits that don't work and have the computer come up with another attempt.

Then by choosing/composing a good subject image, and by selecting a good source style image (or set of images, perhaps), and by doing a bit of cleanup, I don't see why you couldn't create something that looks perfectly convincing, and potentially just as good as the source images. (Depending on how artistically brilliant they were in the first place, and your own artistic talent.)

There will still be human involvement, but it'll be a lot less work. And I think it does make a difference if someone could, from a good portrait photo and a database of paintings, with maybe half an hour's work, create a work that – if not as brilliant as a Vermeer or a Rembrandt – is almost indistinguishable from and the equal to a good classic portrait.

Of course, when anything is possible with the click of a button, deciding what to do is where the talent and skill comes in. Much like a camera can at the click of a button create a picture of anything in the real world, but it's still not at all trivial to shoot a good picture. Or like how movies nowadays can digitally tweak pretty much every aspect of a shot, but some still look much better than others.

Anyone can use the "charcoal sketch" filter to change a photo into what looks like something drawn by hand, but you won't see it hanging in a gallery next to pictures that actually were drawn by hand with charcoal, because "art" is not about how good the final product looks, it's about how a human being applied their talents to create something from a vision that started in their head, and recreated that image as a tangible object in physical reality.

I'm not sure that's true. The reason you don't hang those Photoshop-filtered images in galleries is that they're not as good (and to a certain extent that it's not in fashion). It is the final product that matters. In principle there's no reason why you couldn't hang a work like that in a gallery (and in fact there already are many gallery artworks that have been created digitally, including using semi-automatic and randomized processes). The process is pretty irrelevant, apart from how it shapes the final work.

This is why photos will never make portraits obselete.

To a great extent they already have. Portrait painting used to be a huge industry. But nowadays how many people get their portrait painted, not counting sidewalk caricatures? There is still a market for it, but it's orders of magnitude smaller than it was.

That's the article from the AI singularity thread I referenced in the first post; please let's keep discussion about that over there.

I brought this up in the AI Singularity thread, but maybe it's something that deserves its own topic.

Researchers recently figured out a way to use "deep learning" neural networks (as used in facial and other image recognition) to instead generate pictures:

People, in particular a group called "Ostagram", are already applying this technique, which Google dubbed "inceptionism", to achieve some startling artistic effects.

You can apply the art style of one image to another:
+ =

Or blend them to create more surreal (nightmarish) results:

Using slightly different techniques, you can even have a robot/printer paint a hardcopy of the result:
<a href="" target="_blank" class="new_win"></a>

I expect that this technology will be generally accessible pretty soon. If this becomes as easy as a Photoshop filter, how do you think it would be used, e.g. for 2D game art? What if you could take a photo or a simple background sketch, and run a "Bill Tiller" filter on it to make it look like Monkey Island 3?

Advanced Technical Forum / Re: Text window text offset
« on: 11 Apr 2016, 08:47 »
The only solution I see now is to add some per-font options that would control how the particular font is drawn.
For example:
- Font's height only counts Ascender (upper part). This will be backwards-compatible too.
- Font's height counts both Ascender and Descender.

I think it would be better to, as Dave suggested, just have a parameter for vertical text offset (baseline shift) that would allow you to shift the text up or down. And perhaps another parameter for the line spacing (leading), in case the one calculated from the ascender/descender values isn't correct. I think this would be more intuitive to work with, more flexible, wouldn't require users to look deeply into what's wrong with the font metrics, and is more consistent with the type of options offered by other applications.

Are you trying to do this by just changing the cursor graphic? Instead, you should change between the inventory cursor and the normal cursor, with the center for each set in the editor.

Advanced Technical Forum / Re: Text window text offset
« on: 04 Apr 2016, 13:56 »
Or is this something specific to TTF fonts?

Yes, it is. These issues I've mentioned don't apply to bitmap fonts (although there are some other issues here with lack of control over how text is positioned inside the text frame that do).

I'm probably going to sit this one out. But good luck, and have fun!

Beginners' Technical Questions / Re: Open source games?
« on: 03 Apr 2016, 14:04 »
There are a bunch, and the question has come up a number of times (just do a thread search). There's a list on the Wiki, but it's very incomplete.

If anyone wants to update the wiki or post a better list we could sticky, I'm sure that would be appreciated.

Pages: [1] 2 3 ... 214