Monday, October 21, 2013

Why I Did Not Attend the Keynote Speech at SIGGRAPH 2013


When I declined to attend the SIGGRAPH 2013 Keynote Speech, a friend was surprised and concerned. The Keynote speech was a collection of talks by successful directors of computer animation as organized by the Academy (of Motion Pictures Arts and Sciences). He simply could not understand why I would not want to listen to the publicity machine grind out more material about those chosen by the powerful to be successful, but I will try to explain.

The reason was not because I fundamentally believe that a Keynote speech by a healthy organization is going to be by someone in the field who helped to create it, and who has something to say about how the field is doing, where it has been and where it might be headed. SIGGRAPH has gone away from that years ago, in fact the last talk of that type that I recall was Ed Catmull, president of PIXAR, and even he might have been selected for the wrong reasons.

But I understand why we do not have a keynote speech of that more serious type, and instead usually have someone else who has nothing to do with the field.  The reason is that SIGGRAPH uses the Keynote speech as a way of advertising the conference to the people who might not attend otherwise. Its also a way to generate publicity for the conference, seeing as how our media could not care less about a computer science conference, but give them Hollywood and they jump to. So they choose people who have media appeal to give a "Keynote" speech that isn't.

But that is ok with me because I think that they do need to attract people and there are other ways to get the effect of a Keynote speech. In fact, I think that the Awards speeches which was initiated this year come very close to what I am looking for.

I did not attend because of something else entirely, something ineffable. Something about my past. Something about being in computer animation in Los Angeles in the 1980s.

Voice echoes and camera defocuses to indicate a flashback.

In the 1980s, I chose to destroy my life by working to help invent computer animation. (1) Being an intellectual out of water (any intellectual in Los Angeles is out of water) I attended no less than 20 or so courses at UCLA, the American Film Institute, and attended many lectures at the Academy. Had I not been a complete idiot, I would have enrolled in a degree program and gotten my terminal degree in some field, that would have done me some good. But instead, I decided to learn about the glamourous and rewarding motion picture industry from a series of continuing education classes taught by working professionals. Not less than 300 individual lectures by my reckoning.

And I had a wonderful time. I attended Robert McKee's story structure course when it was ten 4-hour lectures (and not the weekend thing it became). I attended classes with Lynda Obst, Debra Hill, Lauren Shuler, John Dykstra, Bruce Berman, the VP of Finance of Warner Bros, John Badham, Richard Donner, Joel Schumacher, George Roy Hill. Directors, writers, producers, and even a few "movie stars" (Jody Foster, Women in Film, etc).

Writers on writing. Producers on producing. Directors on directing. And I learned a lot, I think. But after a while one has a diminishing return from such things. Hearing Martha Coolidge speak at WIF is entertaining but it does not pay the bills. Hearing Douglas Trumbull talk about doing all the effects on 2001 is enlightening until you realize that he did not do all the effects on 2001. He just managed to figure out how to get the credit for the work (2)

Then, as with anything, knowledge and experience begins to show you the dark side of these innocent events.

So what do we have with these seven so-called "directors of computer animation".

First, very few of these people are directors in the way that term is used in the rest of the motion picture industry. They are at best managers of part of the production process whose creative content (e.g. script, design) has been created by a studio system that may have nothing to do with the director, who in general is partnered with another person to spearhead and organize the production process.

Second, the people chosen to be directors are chosen for a variety of reasons, of which talent and accomplishment are only two, and probably not the most important ones. The people doing the choosing are people who do not have a clue about computer animation, for the most part.

Third, how many of the people up there sacrificed anything to help bring computer animation into existence? None, I reckon. Why in fact, one of them is a stop motion animator who hates computer animation and was dragged into it kicking and screaming.   To glorify such a person at SIGGRAPH is at best ironic but probably worse.

Fourth, isn't it rude to have a presentation celebrating and glorifying people who had nothing to do with inventing a field at this conference while so many of the inventors of the field are unemployed and impoverished for doing so, are walking around outside?

I think it is rude.

There are two other reasons why I did not attend.  First, I do not have enough time at SIGGRAPH as it is to do the work I need to do there and thus consider it a waste of time to listen to talks I could just as easily hear at some other time or venue.   There was nothing about those particular talks that was unique to SIGGRAPH.    Second, I know, from vast personal experience, that while talks of this type might be entertaining, they do not lead to anything.  Ever.

So that is why I did not attend.

_____________________________________________

1. In order to do so, I had to turn down opportunities that almost certainly would have made me independently wealthy. Those opportunities are gone, they were part of that time. And being involved in computer animation did not result in being able to make a living. Therefore, since I did not come from a wealthy family and since being wealthy or being able to generate wealth is a sine qua non of our society,  I had destroyed my life by making this choice.

2. He was so egregious at this that Stanley Kubrick took out an ad in the trades reminding everyone that the credits for visual effects for 2001 had five names, the first being Stanley Kubrick.  I think the ad ran about 1982 but I am not sure.


Friday, October 18, 2013

Bad User Interface Design: Celebrate the Nightmare from Hell that is Gimp


Many philosophers over the centuries have asked: "what makes bad user interface design?" Oh the arguments that have raged over that apparently simple question. Is it all inspiration, accident or genius that leads to bad user interface design? Are there principles we can deduce to help new and inexperienced designers write bad user interface code, maybe even dreadful user interface code?

I believe that the answer is yes, we can help people design and write bad user interface code, code that demeans the user, insults the user, makes their life worse, and makes their work impossible or nearly so. True inspiration may be beyond our capability to teach, true genius may break these principles we write down here, but for the great majority we can deduce principles that can act as guidelines for a truly bad user interface or "user experience" as we say.

We will take the case study approach as pioneered by Harvard Business School and from these case studies try to create principles to apply to new situations.

I recently sat down to learn GIMP, the Gnu Image Processing program, and was thrilled by its bad user interface ideas. From these I derived some principles and will then discuss how GIMP achieves these worthwhile goals.

Principle #1: Make a bad first impression.

If you can make a bad first impression, then you may even be able to make the user give up entirely. But how, specifically, can one make a bad first impression?

Principle #2:  Increase frustration by focusing on what the beginning user has to do and make that more difficult

In other words, concentrate your bad design into those areas that the beginner has to work through, it is less important to inconvenience the advanced user as they are far fewer in number and have more capability and skills to work through your stupidity.

Principle #3:  Use a GUI design or principle from a similar program that  the beginner almost certainly knows but give it a completely different meaning, and actually hide something important that the user needs to do under that category.

Our third principle here is a particularly nasty one. It solves several problems at once, it confuses the user, and makes them less confident that they bring skills to your program that will be useful.

Let us examine how GIMP achieves these three principles in a truly elegant manner. What is the first thing a beginner of a "paint" program might wish to do? Well I would argue that finding a paint brush and setting a color is pretty much right at the top of the list for a beginning user. What Gimp does for this is to make it ok to find a paint brush, although there is some good confusion there, but then it completely makes it inscrutable to choose a color. How does it do this?  It does this by hiding the pick-a-color function under a glyph that means something else entirely in Photoshop.

Then ask yourself how many new users of Gimp will have been exposed to Photoshop? I would argue that at least 80% of any user of Gimp will have learned at least something of Photoshop and the percentage may well be higher. Then what could be more devious and self-defeating than to hide "pick a color" under a graphic that has nothing to do with picking a color from Photoshop? And that is exactly what they do. In Gimp, pick a color is carefully hidden under the following icon:




which means of course to exchange a foreground color with a background color in Photoshop and has nothing to do, actually with choosing a color.

What genius ! What mad genius ! What a clever and nasty person whoever did this must be !!

No one would ever think to look under switch fg/bg color, and they have to look up how to pick color in Gimp on the internet (of course there is no online documentation for Gimp) and eventually they find it, but not after many minutes or even hours of frustration and hairpulling.

So our first case study suggests: find something a beginner certainly has to do, and hide it in a place he will explicitly not look for it based on previous experience.

In future posts we will examine other examples of genius bad user interface design.

Thursday, October 17, 2013

Global Wahrman Retreats from Dynamic Views


I think that I must have unrealistic expectations about how these things are documented.  It makes perfect sense to me that I would want to have my posts truncated to 4 lines, no, wait, that doesn't make any sense at all.  In fact, that would be nutty.  Oh well, I guess making billions of dollars as Blogspot and Google do is no guarantee of quality.  

We temporarily retreat from dynamic views, but we will return to the subject one day soon!


Global Wahrman Tests Dynamic Views


We are testing a new blog format.   I have my doubts, but apparently the only way to find out is to try it, so I made a backup and here we go !

MW

Tuesday, October 15, 2013

The NSA and the Mystery of Tito and Eliza Doolittle


As everyone knows, the rain in Spain falls mainly on the plain.   Poor Eliza Doolittle had to repeat that phrase over and over again, under the tutelage of her cruel taskmaster, the domineering patriarch Henry Higgins in order to achieve the goals not just for herself but for her language teachers.  She wanted a chance to elevate herself from desperate poverty, but her masters wanted to put one over on British society, to fool English society into believing that this poverty-stricken seller of flowers, Eliza Doolittle, was in fact of the upper classes.   Technically speaking this was a conspiracy.

In a similar manner,  we have a story from the Cold War, a mystery if you will, about someone who did not learn to pronounce his H's properly and so was unmasked as an impostor.  Of course in his case, since he was the ruler of a Communist dictatorship, it didn't really matter.

This person was probably a plant of a Russian trained agent to lead the resistance of communist and other partisan forces in a war they expected with Nazi Germany.   The mysterious Russian, if he was Russian, whose real name we do not know, was secretly proven to not be who he said he was after WW II and during the cold war.  It was his failure to learn to pronounce his H's, figuratively speaking, that revealed him.

The organization that succeeded in revealing the truth (secretly) to our leaders was the newly formed and much maligned National Security Agency.   Yes, that poor, misunderstood guardian of freedom, the NSA.

Our story begins in the 1930s in what was the Kingdom of Yugoslavia, formed after WW I out of parts of the Austro Hungarian Empire and the Kingdom of Slovenia.  A former locksmith and metal worker, Josip Broz of Kumrovec, near Zagreb, took the underground cover name of Tito, and led the Communist faction of the partisans in resistance to the Germans who had occupied their country.

When the Germans were defeated, he was able to keep the Kingdom united and create a new country that included Croatia, Serbia, Slovenia and five other distinct provinces and ethinic groups.   He was able to forge his own path for his newly Communist nation, separate from the Soviet Union, and create his own version of Socialism.  (1) When he died, the country split apart violently along ethnic lines. Without him, it could not hold together.

The problem is, or the mystery, is that it was not clear, it still is not clear, who Marshal Tito was.  But whoever he was, it isn't who he said he was.

Marshal Tito was supposedly born Josip Broz in 1892 in Kumrovec to a Croat Father and a Slovene mother.  His first language was Serbo-Croat.    He fought in the Austro Hungarian army, was captured and imprisoned in Russia, fought in the Russian revolution, and returned to Yugoslavia where he was involved in various activities that also got him imprisoned.  After serving time, he went underground and joined the Yugoslav Communist party.   From there he rose in prominence in the Party and led the resistance to the Germans.

But mysteriously the people of Kumrovec did not recognize him.   And when Josip aka Tito spoke his native language, he made mistakes that no native would make.   Serbo-Croat was apparently not his native language.

One job of our intelligence community is to understand what is happening in the world and what is likely to happen. Who the leaders of important countries are, and what they are likely to do, is part of their job. Its a nearly impossible job to do, but certain things can be done. But one is certainly at a disadvantage if you do not even know who the leader of a country is.

What does any of this have to do with the NSA?

The NSA is considered one of the centers of excellence in linguistics in the world. They took a speech that Tito gave and analyzed it, asking the question of whether Tito was a native speaker of Serbo Croat. I do not know when the report was originally written, but it was recently released.  Their answer was: he was not a native speaker of Serbo Croat.  He was an impostor, just like Eliza Doolittle!  But an Eliza Doolittle who did not learn her lessons!  (2) 








So whoever Marshall Tito, one of the great revolutionaries of the 20th Century and a national hero of the former country of Yugoslavia, was he wasn't who he said he was. Most people who know about the issue speculate that Tito was a Russian who was put in place of Josip Broz sometime in the 1930s, well before WW II. But it is speculation.

For a good discussion of the Tito mystery, see this post.

Wikipedia claims this story isn't true.  Well, maybe.  As you would imagine, partisans of Tito would want to deny the story.  Finding out the truth here would be difficult, it might in fact, be impossible. (3)

I hope this little story will help to convince you of two things.  First, the importance of studying musical theatre for understanding the Cold War.  And second, to give you some idea of what the NSA does for a living.   They do not give a fuck  hoot about your pornography or your mistress, they have other fish to fry.

The original report is on the NSA web site at:

__________________________________________________


1. In Stalin's desk after he died was a letter from Tito. It said that they had caught another Soviet assassination squad trying to kill him (Tito) but that they had missed, and that if Stalin tried that again Tito would send his own squad after Stalin and they would not miss.

2. My Fair Lady, of course.

3. One could imagine exhuming the body of Tito, extracting DNA, and comparing that DNA with the DNA of other living members of his family, if any exist, or with people from that part of the world.  One might then have evidence that he was related to those people or not.   This is not something that I, or anyone I know, is going to cause to happen.


Monday, October 14, 2013

Should I Run A Write-In Campaign for the EC of SIGGRAPH ?


As many of you know, I have felt for years that SIGGRAPH should be working to change their approach in a number of areas. (See, for example, this or this.)

And although I had good email dialogs with the chair of last year's SIGGRAPH, I have basically gotten nowhere in having any kind of a discussion with those who run SIGGRAPH, and of course I have had no influence on their policies (except for maybe one, and even in that case I doubt it was because of my efforts).

So when a notice went out encouraging people to run for the Executive Council of SIGGRAPH, as member at large, I nominated myself. I was interviewed by five people at SIGGRAPH who represented the Nominations Committee. There were a number of interesting questions and most of the committee seemed to have an open mind on the issue of whether I would be permitted to run for the EC. Although I was surprised by the interview, nevertheless I was flattered that they would take the time out from their busy schedule to meet with me.

Anyway, I was notified that they had very strong candidates this year and that they were not putting me on the ballot. This is what I expected.

As I also expected, there was no hint of how else I might contribute to national SIGGRAPH. It seems to be a club to which you need to be invited, not apply.

There are several possible responses to this. I could wait until next year and nominate myself again, and see what happens. I could try to find another way to participate with national SIGGRAPH, but that has never worked so far. Or third, I could run a "Write In" campaign to get myself added to the ballot. To do that successfully, I would need to get 1% of the membership of SIGGRAPH to sign a petition to nominate me.

It seems to me that 1% of the membership is a very reasonable number, and that possibly I could get that many if friends at a few facilities were to help facilitate that (e.g. put up petitions at Pixar, Sony, DD, ILM, etc. ).  On the other hand, I am severely under resourced and seem to have a lot of trouble just getting up in the morning let alone fighting powers that ought to be grateful for my contrbutions, imho.

The question is whether I should attempt this. If I do, the time frame is November and December for the write-in campaign to be considered for the fall ballot.  I can not do it if I do not have support, so please let me know what you think by comments here or email.   In the mean time I will write a position paper on "where I stand" although one could probably deduce that from what is already written and posted on this blog.


Friday, October 11, 2013

Is Anyone Home at Khronos / WebGL ? Hello ?


Is anyone home at WebGL / Khronos ?   I mean, does anyone work there?  Or is it just a front from some sort of criminal organization or venture capital firm that is involved in corporate fraud or something similar?

Maybe, if someone does work there, they could get them to update their documentation, so they do not waste everyone's time?  

About two years ago, a flaw was found in WebGL security and a fix was implemented by Google and Mozilla that completely broke using texture mapping.   There is a work around it for those who want to use texture mapping, but it requires implementing something known as CORS and most people have not.   So bye bye texture mapping.  Who needs it anyway?   No problem.

However, isn't it odd that Khronos and WebGL don't say a word about this on their web site?  Its been over two years since this was broken and they don't mention it once, nor is it mentioned in the few tutorials that they have on their web site that happen to be about texture mapping.  So the question is, what are those people thinking?  A few words on the topic could certainly have saved me some time.  Of course WebGL makes it clear, your time doesn't matter to them.

There is more misinformation out there about WebGL then there is genuine up-to-date and helpful information.   Good old internet.  Gotta love it.  Bold new paradigm, you know.


See how Perlin noise adds a certain grunginess to our rocketship without using texture mapping per se.  Hey, I have an idea!   WebGL could have had noise in specification instead of making everyone implement it on their own.   Oh, that would have been too much trouble, I guess.

Thursday, October 10, 2013

Information about WebGL for the Graphics Professional


There are many aspects of WebGL 1.0 that are somewhat documented and somewhat undocumented. These lacuna are very annoying. Well-meaning web pages that repeat tutorials for absolute beginners over and over again clutter the search engine space and make finding solutions diffiicult.

This post does not have information for beginners or dilettantes.   These notes are for the serious graphics person who is trying to get work done and wants to be more productive. Some of what follows are hard facts or details, some are loose impressions or generalizations.  

-- WebGL is deeply intertwined into Javascript, DOM and the browser, so you must know exactly what you are using because there are differences.

-- Chrome's javascript does not allow "const" in strict mode
-- Chrome's browser throws security violations when attempting to load a texture map
-- Firefox's javascript allows const and does not throw security violations (on linux)
-- Failure to test on your selected OS & browser delivery targets will bite you in the ass
-- You must be very aware of this as you desperately try to get information from the internet

-- Do not assume anything from other OpenGL's will be there.

-- WebGL is not OpenGL ES 2.0
-- WebGL 1.0.2 is derived from OpenGL ES 2.0, but they are not identical
-- WebGL is closeer to OpenGL ES than any of the other OpenGLs though
-- There are almost no carryovers of concepts and ideas and intent from the earlier OpenGLs
-- This is a VERY low level graphics interface, you will reinvent the wheel over and over
-- The WebGL shader language is the same as the shader language of OpenGL ES 1.0 GLSL.

-- Documentation is broken

-- The Khronos site does have a WebGL 1.0.2 specification.
-- The specification is highly concise (at best) or just incomplete (at worst)
-- The shader language is not described beyond the statement that it is the same as GLSL ES 1.0
-- The documentation for GLSL ES 1.0 Shader Language documentation is excellent (see link)
-- There is a pretty good concise WebGL synopsis in PDF form (see link)
-- There is no active forum, the one on Khronos was killed years ago
-- There are a few helpful tutorials on the Khronos site, but not too many, some are wrong
-- The examples on Khronos use techniques that have not worked for years (loading textures)
-- There are relevant articles on the Mozilla developer site, but they are incomplete and the
comments are closed

-- WebGL is fragile and unhelpful

-- Things have to be done exactly their way or it will not work
-- Once something does not work, other errors cascade from it, some of them inexplicable
-- Relentlessly check for webgl errors, do not assume things worked
-- Errors appear either as return codes from WebGL, or in browser error windows, or not at all
-- Most of the WebGL error messsages just say "error"
-- Remember that checking for errors will slow you down, so they must be removed for
production code
-- Sometimes when a problem is unsolvable, I move on to other problems, then come back,
rewrite from scratch using the exact same techniques and everything works.

-- Specific Issues

-- drawArrays "count" is not well defined. It probably wants the number of vertices,
not the number of drawn elements (e.g. triangles) or number of floats, etc.
-- drawElements restricts the number of elements to what will fit in a short. This is not
enough to be useful for many if not most applications
-- The documentation for how to load a texture is wrong and will cause security violations
on modern browsers, it is not clear how much the CORS solution helps
-- texture maps must be exact powers of two in size
-- "const" is not cross-browser, do not use
-- functions are only defined in the shader portion being compiled. A function defined in
a vertex shader will not be available in a fragment shader
-- functions must be defined before use (prototypes may work)

-- Recommendations

-- Use the strict mode of javascript
-- Write or pick a matrix manipulation package for javascript. I use gl-matrix.js
-- Expect to write your own display list manager, object manager, texture manager, etc
-- Expect to spend a lot of time reverse engineering the documentation
-- Be very cautious about what you read on the internet. It is often out of date or applies to
something else that sounds similar but isn't
-- Of course the above warning applies to this post as well.  
-- Test on your target platforms as you develop.  Don't be surprised at the end.

-- Links

-- Article on cross domain textures disabled

-- The WebGL 1.0.2 spec is what passes for documentation

-- The OpenGL ES 1.0 Shader Language Document

-- The WebGL 1.0 Quick Reference Card

Wednesday, October 9, 2013

Experimental Uses of Analog Reflectance Mapping in the Pre-Digital Cinema


As we move into the new world of digital cinema is it time to embrace modern aesthetics and criteria of excellence and move away from the tired old notions of story, plot, character and dialog?  These latter elements served their purpose in their day but now hold us back, some would say.  Who cares about a story when you can have giant robots?   What is the point of having sympathy for a character when you can have 1200 effects shots instead?   The answer is there is no point.

If "new art requires new artists" then it also requires new criteria, new standards, which we can use to judge and appreciate this new work  Our modern cinema has clearly transcended these old ideas and moved ahead.  I believe it is time we moved analysis and criticism forward as well.




What are the new criteria that more properly embraces and embodies our new art form?   This is not yet known for certain.  We are feeling our way in a dark room filled with sharp edges.

I propose that one such new aesthetic will be an appreciation of the power and nuance of a well-placed "reflection map".   Consider how pointless it would be to try and appreciate a movie like Gravity (2013) without deconstructing its reflection maps that underlie its mere surface reality. 

For those of you who are not familiar with the terminology of the new cinema, let us review the basis and origins of the "reflectance map".   

A reflection map is subtlety incarnate. Just out of sight it informs the scene subliminally. It is the distorted lens through which we do not see this world, but another world, a world around the corner or above our heads, a world of light that fills the space between the objects.

The origins of the reflection map predates digital cinema, it predates all cinema. Its beginnings are in the history of theatrical lighting and set design of different cultures, both of narrative theatre as well as the religious and other cultural events of these earlier periods. It is in the history of theatrical lighting, the projector, the lime-light, the mirror, the torch, the well-placed pane of glass, the unscrolling panorama, and in the world of theatrical magic that we should seek the origins of the reflection map.  (1)

The reflection map is not new to the cinema, it is has been in the background, in the art form of the cinematographer since the beginning. There have also been some early examples, ahead of their time, that elevated the reflection map to a more prominent place in the structure of the film. There are four films that I describe here that demonstrate mastery of the reflection map, all of them classics of the traditional cinema. I think you will agree that all four films are recognizable at once merely by describing their use of reflection mapping, as analog as it may be.

That is right, in all four examples below, the maps (reflection, projection, etc) are all analog, which obviously could not be as good as digital, that goes without saying, but has value nevertheless.  

Film 1:

The film begins with a minute of solid black with white titles in a classic type. The audio fades up from silent to the background sound of people in a public space and, slowly after a minute and maybe twenty title cards, what appears at first glance to be a stylized impressionist painting appears. A very subdued color palette with unrecognizable shapes of what may be a cafe or group of people. The painting begins to move (it is actually in slow motion), it appears to be animated or abstract in some way. As color is faded into the picture, an orchestra becomes to warm up in the background audio and the painting is revealed to be a distorted mirror of a club in Berlin between the wars. The reflection map itself becomes an element of the scene as it is a backdrop to the stage which is slowly pulled up to the ceiling where it acts as a reflector of the stage beneath it.





Film 2:

A black and white film about a young man who is color blind. However, he became color blind as a young adult, in his early childhood he could perceive color. When he sees something that he saw as a child or which reminds him of his childhood, that element will be in color. This is particularly noticeable in a scene involving a dark room with a back-lit aquarium and the reflections it casts in the room. (2)

Film 3:

A 1960's film about space travel. We often do not see what the character sees directly, but only indirectly in the visor of his space suit, or the reflections on the wall or window. Even when we think we are seeing what he sees directly, we are not, as the imagery is created with an analog technique called slit scan, a technique that uses imagery in a motion control process to create new animated abstract imagery on film.

Film 4:

A black and white film about love and death, with death and death's mechanism personified in the character of a woman (4) and her male assistant. The boundary between the worlds of the dead and the living are mirrors. In an attempt to bring someone back from death, the assistant to death guides the protagonist into and through the world of the dead on his mission. The imagery is composited, either optical or rear projection, of photography at night moving through ruined cities.   The plates are then used as both backgrounds and projections on the characters.  

The four films are of course Cabaret (1972) by Fosse , Rumble Fish (1983) by Copolla, 2001: A Space Odyssey  (1968) by Kubrick and Orpheus (1950) by Cocteau.





These are all analog films of course, and all but one of them, 2001, can only tease us with the promise of reflection mapping.  It will take the advent of digital techniques for the tsunami of reflection mapping to truly find its voice.


2001: A Space Odyssey

Rumble Fish

Orpheus

Cabaret

_________________________________________


1. For those who think that reflectance mapping was invented in 1982, sadly I must disagree.  At most it was demonstrated in digital form in that year.  Reflectance mapping has been with us since long before.   Anyone writing a renderer in that period, as I was, was well aware of its promise and possibilities.

2. Rumble Fish also used projected time-lapse photography which is another example of the use of reflections for narrative purpose.

3. Story has become the victim of the new economy.   By economizing on a writer, the total film budget may be lowered by many thousands of dollars.  This allows them to spend more on what is important, to bring value to the film, such as more visual effects.

4. Yes, death is portrayed as a woman in this film.  I do not know what the gender issues are, but they must exist.



Sunday, October 6, 2013

Unspeakable Evil, Esoteric Knowledge and WebGL


What madness possessed me that day I will never be able to explain. Having accomplished what needed to be done, why did I press on?  I do not know myself what unconscious self-destructive character flaw caused me to innocently go forward and attempt to learn the forbidden knowledge that lurks just below the surface of WebGL.

Those who watch, those who control, those who oppress our pathetic lives through means both grand and small,  yes even through those apparently innocent graphics API committees that design our APIs. 

Or put another way, I decided to move forward and add texture mapping and multiple objects to my little WebGL object viewer which is really just an excuse for learning WebGL.  

1. I attempted to use the feature, attribute arrays, to download the UV coordinates for use by the shader. But even though I have used this feature successfully for the vertices, colors and normals I could not make it work for UVs.

2. Texture mapping would not work. After a while I figure out that my texture map is not an exact power of two, and that seems to be fatal. First, I do not think that is clear in the documentation. Second, why is the only error code that WebGL seems to know about is "error"? Why can there not be more informative error messages?

3. I use a trick to get the UV coordinates to the shader, and that works, but I can not use that trick in the final software.

Yeah !  A cube with a texture map !

4. In the process of writing slightly more sophisticated shaders, I discover that (a) functions are tricky and that (b) it is not clear which GLSL (shader language) WebGL implements unless you read very carefully (the answer is that it implements GLSL ES 1.0 only) and (c) there is no obvious documentation.  There is documentation it turns out, but you have to go searching around for the documentation for OpenGL ES 2.0's 1.0 shader language. Confused?  You should be, there are many, many OpenGL shader languages defined out there and they are all different yet similar. 

5. In the process of doing this, using textures and so forth, Firefox on Windows gets a hard failure because I am not using vertex attribute 0.   Really, why does it care?

6. Once I start using texture maps, Google Chrome, which had been very compatible before, now fails hard with the following security error.

Security violation?  What security violation?  I am loading a texture map, ok?

Here are the conclusions I drew from this not very fun 72 hours: 

1. WebGL is fragile. You may think you have learned how to do something in WebGL, but its possible that you did not and that you got lucky. You may not be able to use that feature in the future, or you might, but you do not know.

2. WebGL is designed to a very low level. Even the API for the 2D canvas is at a much higher level (and much more usable) than the 3D API.   The only solution seems to be to write your own management system to do basic stuff that could or should have been done for you.  

3. The WebGL error system is nearly useless. It does not give enough information to diagnose problems and errors.

4. The WebGL documentation is problematic. There is no reference manual, there is no shader language documentation (it turns out there is, but you have to be a detective to figure out which one it is and where it is), there is way too much reliance on group sourced internet tutorials that are very low level and often incorrect or unhelpful.

5. It is not clear how much a problem browser compatibility is. Initially there did not seem to be any problem but as of yesterday I am dead in the water and I can not figure out what it is complaining about. Therefore be warned, browser compatibility is a real issue.

6. This might all just be a problem of software (im)-maturity.  Maybe it will all get better with time.  Maybe someone will write a Javascript package to smooth over the loose ends and everyone will use that API instead of the WebGL one.

7. One does what one always does in this situation.  You write your own software to hide the ugliness of the underlying system and after a while the problems go away.   The irony here is that OpenGL was originally created to make it easier for people to start doing 3D.   It has evolved into something that seems to take pride in making it as difficult as possible for a beginner to do 3D.  Weird.

There are a lot of positive things to say about WebGL (including the ability to run a 3D application from a browser which means that the end-user does not have to install a program). But if I were advising a client on whether or not to commit to doing an application that was important to the company using WebGL, I would tell them "Maybe, but proceed with caution". This is a very low-level API, it is not yet robust or documented. One will need to do tests and carefully evaluate whether what you need to do can in fact be done in this environment and at what cost.  Look before you leap.