Wednesday, April 22, 2009

all burned up…

Okay… so had a few minutes this weekend and my son had asked about how the demons do their warps in the tv series “Charmed”. Ironically enough … Andrew Kramer had on his blog this week a bit that’s very much like the old “staked” flame away from Buffy and Angel.  So this is my way of giving and unabashed plug to Andrew and his site… and I would be really evil – if I didn’t mention he’s got all kinds of updated video tools you can buy there. 

Anyway – after a bit of telling my son that these effects weren’t as hard as you might imagine led to me grabbing some old video footage… And here’s a couple examples I did in After Effects to show him how easy these effects are to do.  Very fun – and surprisingly easy – they just take time.  My only complaint is I really need to break down and get a better quality camera because it’s sad when the CG work has better quality than the original footage. 

Now – admittedly the warping / warbling warp in on this is largely to cover the fact I was too lazy to go out and shoot any new footage so I took a bit of garbage footage lying around and used that as a quickie bit for the burn effect.

A better copy of the burn – is below.  Here I’m using a simple image of a penny and you can really see how the right media really makes the effect. 

So… let’s get down to how the effect layers out – and that is really the secret to making it work, a lot of layers each one over lapping the other. Now this is explained a whole lot better in one of Andrew Kramer’s tutorials and since I don’t do tutorials – and Andrew Does I’m going to refer you to him here

imageimage

The only real twists I’m adding to this is – I don’t use any pre-comp’d smoke which he does, and I’ve simplified this up a bit so we’re not using several layers that he is.  Remember I’m doing this for just a very quick effect on some very grainy footage and Andrew’s outputting HD level.   For a lot of work (web for example) this is good enough and it’s very quick. 

image image

So – we take a simple comp shot of just the woods – and another shot of me walking in these same woods.  If you have a green screen you can do this very quick – but if you’re just using raw footage it won’t take long for you to matte the woods out – and then overlay these shots.

image

image

Now – we apply the layered burn effect which is really just a combination of linear radiant's on a texture – that is then applied with color.  As this transitions across the layer it causes it to glow.

imageimage

The next set of layers uses a similar radiant and glow effect on a texture – that we’ve boosted to a point where it’s pretty much a very jagged linear ramp that as we transition this across – gives the effect of it erasing or burning away what is below. 

image

We add over this a layer of smoke and some particles that pass over it. You can see that we need to do this on a very semi-transparency to the overlapping layers that are placed over the footage.  But that’s really how easy this effect is to pull off.  It’s not complicated – it’s just a bit of repeating the same effect with slight variations one over the top of the other, and then applying them in a set order.

Once again – you can get a great detailed video tutorial on this over at Andrew Kramer’s VideoCopilot.net site who is pretty much the definitive guy for any After Effects effect.  Any of us who do anything with video from your basic beginner to long time pros can learn a lot from him – so even if you’ve never used AE that’s the place to go if you want to learn these effects.

Tuesday, April 14, 2009

Make some color happen…

I’m taking a breather from the next installment of eCommerce talk.  Not that discussing the glories of PunchOut catalogs and on line supplier services isn’t hoot – but I needed to add a little color so I

grabbed a bit of video I had lying around and I did just that.  If you take a gander at the clip here ther’s a couple tricks that are pretty easy to create some very dramatic and colorful footage out of well, kind of drab footage. 

The clip here has the original footage, first – just a simple few seconds of the back yard around the house here on a typical Seattlish late afternoon.  Meaning – it’s overcast and dark.   And that’s not a bad thing – in fact the nice thing about it always being overcast here is that it’s easy to light a video shot, and you seldom ever have to worry about over exposing the shot.  But life isn’t always about various shades of grey.  imageNow, the original footage isn’t all that bad – there is some color there.  But as you can see its a bit washed out.  So one of the first fun things you can do to boost the color is to replace the sky entirely.  So I did – I spent a few minutes out there on Flickr and got a very nice flaming red sunset. 

¹Fun tip for Video and Design:

Which … btw – is under a creative commons license that allows it to be used.  Flickr has a very nice feature that allows you to do a search for works that are under the Creative Commons – so keep that in mind.  It’s under the Advanced Search settings – scroll to the bottom of the search imageoptions and check the boxes for Creative Commons reuse policies.  You can even have it search for stuff that you can use commercially – which – is pretty cool.  (Be even cooler if you could download actual video instead of flash videos – but hey, beggars can’t be choosers.)

Anyway, like I said, I got on on Flickr and looked around for a very very dramatic flaming red sky since I really wanted to give the shot a vibrant dramatic boost.  Now the trick to doing this with a shot that’s very effective and very quick is imagenot to roto-scope all the frames but to do a color matte.  What’s a color matte? It’s really simple to do in After Effects and it’s very useful.  First things first – is to duplicate the shot, and then desaturate it completely.  Then hit the levels and totally boost the sky so it’s got a really almost black and white look.  Then, last but not least bring in a good luma key.  Drop the photo in behind it so it shows through the key – and wallah – you have a very dramatic sunset.  Now, you may have noticed that it’s ALL black where it’s not colored sunset… so drop a mask across the area you want to show at the bottom and pin to that the original footage.  Do a little color correction on it and you have the very dramatic scene you see here.  (A little more work and we could get the little color spots out of the edging – but this was done very quickly  - even still its very dramatic.  Got a nice vibe to it and the colors' literally scream at you. 

What it is not however … is particularly realistic.  And the downside of this technique is that you really make the fine details get blocky and pixelated. So its really good for less than photo realistic effects butimage you need to use it wisely or it really will drown out any moments that need to be done subtley.  So … how do you color it up without losing detail and without making it… blah?   Color correction gel.  What’s that?

Simple – the way you’d get a similar effect is to use Andrew Kramer’s free AE plugin – the Colored Gel Effect.  It takes a bit of getting used to and tweaking to get just the look you want – but the results are awesome.  If you look at the detail of the trees – they keep that very soft pine needle blur, and when they move in their own way they’re very … cabin on the lake.  I was tempted to play around with a mask or two on the barn down there – but decided to leave it be – basking in the golden sun.    You know they say that Lighting sets the mood for a shot quicker than anything – faster than sounds, faster than anything in the shot.  So play around with some color, have some fun with it.  I will.

Monday, April 13, 2009

The joys of being a POSR

Nope… not a mis-spelling – that’s POSR, as in Punch Out Setup Request.  As part of this current set of postings on cXML and the magic that is eCommerce that’s the subject dujuor.  The totally awesome and completely cool … POSR.

Now, a POSR is probably the single most important part of the eCommerce step by step.  It’s what authenticates and allows and online catalog to be sent to you. 

Here’s what one looks like  courtesy of www.cxml.org

The first section of a POSR handles the Doctype and how to handle the document…

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.020/cXML.dtd">
<cXML payloadID=1233444@ariba.com   timestamp="2000-03-12T18:39:09-08:00">

Now the grey line up there has the doctype and you can put all kinds of good things in there but what I’m showing here is the most important part – the DTD.  With this badboy you can write an app that will allow you to validate all your cXML and make sure it works, using some very simple XML routines and a few free tools available on the web. 

TIP:
You can – also find xml validators that can read the DTD – but many will choke on this line.  XML Notepad for example is designed for pretty much XML only and not cXML, and will choke.  The same thing goes for some browser based viewers.  If that’s all you’ve got to view xml – remove this line and you’ll find it’ll load the file fine.

Anyway, you can use the DTD to learn a lot about what’s wrong with any cXML that you’re given (or that you create) by validating it against the DTD.  So if you’re not – do so.  It’ll save you weeks of headaches.  This is especially true if you’re dealing with SAP or some of the Oracle solutions out there that like to write their own versions of cXML, or worse let you output in any fashion you want without telling you there are rules to how cXML is processed. 

<cXML DTD and  Consultant Rant Begins Here>
I would say 80% of the work I’m currently doing is on telling people how to validate their cXML, and fighting with people who tell me, “But we work successfully with dozens of vendors doing it this way…”.  That may be the case – but cXML has rules, and it doesn’t matter how anyone else works – if you’re outputting to cXML you follow it’s rules or you pay.

The reward for following the rules is that if you do have a valid document – cXML is as stable as a rock, and your cXML will process like cannonball from a cannon.  So it is worth the effort to do it right, even if your “consultant” tells you it’s not necessary.  (Clue – if your “expert” tells you it’s not necessary to follow a standard… slap them.  They either don’t know how to follow the standard, have been told by a software application advertisement it’s not necessary, or something but the bottom line is – they don’t know.  I’ve seen a rash of “consultants” who claim this standard or that standard isn’t needed.  It usually is – and the only reason why they don’t or they won’t use the recommended DTD standard is that they assume what they’ve been told by articles or others who are not familiar with them, that a DTD is basically the same thing as an XSD schema.  

They hold many things in common, and often have a degree of interchangeability – but there is a reason why a DTD and an XSD exist and we don’t just use one or the other.  The subtle nuances in how they work allow them to perform different degrees of use for different types of uses.  For cXML the DTD is the model you need to be using, and one of the reasons is that certain required fields within the cXML DTD file enforce rules needed to make cXML work efficiently and correctly.  When consultants try to slip around these rules, or try to get loose with the rules – it may work fine on their local system, but when they try to connect to anyone else, it becomes costly and time consuming.
</End Rant>

Before move on, it’s important to point out one thing in the DTD.  DTDs are versioned.  Each version has it’s own requirements and rules.  If you find that you’re not validating – check the version which you’re validating against – it does make often a very big difference.  You can read more about each of the versions, and get copies of them at www.cxml.org.

So… let’s get back to the POSR.  What this does is it handles the hand shaking between the customer who is “Punching Out” to the vendor who has the catalog of goods that they will punch out to us.  Now the concept of the “PunchOut” is very simple.  A customer may have a massive catalog of items, but we don’t want all of them, or we may have rules regarding certain items in the catalog.  (Joe the Janitor probably isn’t allowed to buy the same things that Victor the V.P. does at a company.)   This can be controlled by the catalog that is “punched out” to the customer.  And all of this – begins with the POSR, where we authenticate not just the company but often the employee at the company who is requesting access to the catalog. 

This is done at the header of the POSR.  Here’s what a header looks like:

<Header>
        <From>
            <!-- Supplier's identity -->
            <Credential domain="NetworkID">
              <Identity lastchangedTimestamp="2000-03-12T18:39:09-08:00">AN01333333333</Identity>
            </Credential>
        </From>
        <To>
            <!-- BCE's identity -->
            <Credential domain="NetworkID">
                <Identity>AN01222222222</Identity>
            </Credential>
        </To>
        <Sender>
            <Credential domain="AribaNetworkUserId">
                <Identity>admin@ariba.com</Identity>
                <SharedSecret>bce's shared secret with AN</SharedSecret>

            </Credential>
            <UserAgent>Ariba Network v20</UserAgent>
        </Sender>
    </Header>

The area you need to pay closest attention to is the one that reads “AribaNetworkUserId”, which I’m going to break from things here and point out that cXML is a standard developed by Ariba, and so – you’re going to see a lot of cheerleading for them in it.  But you will probably have to change this for some eCommerce companies who… ahem… have competing products.  But what you should never deviate from – is the use of a ID and SharedSecret.  These will generally be supplied to you – from the vendor doing the punchout.  These are the most important part of the punchout.  Without them… you won’t authenticate, you won’t get a catalog and you will most definitely not pass go and collect $200.

Now if you’re familiar with earlier versions of cXML you’ll note that up in the Suppliers Identity – there’s a lastChangedTimestamp and you may not have seen that before.  The truth is cXML (even with all those DTD rules) is very flexible.  And you can actually put in your own Identities in this section so if your internal cXML processor needs other names to identify it – go to it.  I’ve actually seen cXML where there were up to 15 Identities here.  So long as the Identity that you and your vendor have agreed upon is in here amongst the others you can get pretty creative and this is a good place for you as an organization to make use of multiple identities.

The next part of a good punchout setup request is … the request itself.   It contains a cookie, and if you have to do debugging something really handy… the BrowserFormPost.  If you can locate this you can discover exactly here it originated from – and often this can help with network an connectivity issue resolution.  So – keep track of that. 

<Request>
    <ProviderSetupRequest>
        <OriginatorCookie>c546794949</OriginatorCookie>
        <BrowserFormPost>
             <URL>
http://service.ariba.com/returntome</URL>
        </BrowserFormPost>

        <Followup>
             <URL>http://service.ariba.com/laterUpdates</URL>
        </Followup>
        <SelectedService>BCE.Edi</SelectedService>
        <Extrinsic name="user">
           <Identity>user234</Identity>
        </Extrinsic>
        <Extrinsic name="url">
           <URL>
http://service.ariba.com/anotherurl</URL>
        </Extrinsic>

    </ProviderSetupRequest>
</Request>

Also up in there… are the extrinsics.  Now I’ll let you in on a secret.  Most of the stuff you see up there?  Look up in the DTD – you’ll find a lot of it is not required.  Remember that rant on DTDs I had up above?  The DTD – will tell you exactly what fields are required and which fields are optional for cXML.  Now, some vendors may have rules over and above those – but the DTD is core.  It speaks – the world listens.  So – check to see what you need and what you don’t need. A good rule of thumb for efficient processing is that if you don’t need to be sending  it – don’t.  All that does is make the systems on the vendor’s end have to read through it and figure out if it’s needed or not.

Put into a cXML document only those things you absolutely need for the best performance. 

And that leaves us to the last part about the POSR… the closing tag. 

</cXML>

I won’t go into a rant over tags here – but I will say that a well formed document with complete tags is essential.  Don’t get sloppy.  cXML is not forgiving when it comes to tags.  It’s not chopped HTML where an unclosed tag will let it slide through.  It may work on your system – but validate, validate, validate. 

Get a tool which handles DTD validations, or roll your own.  Either way – validate your stuff.  If you use a tool like SAP or Oracle, find out how to get your output – even if you have to get it from the server logs and validate that.  Make sure the application you’re using actually does churn out valid cXML if you’re sending it to a vendor.  The time you save on that one chore – may save you weeks of arguing back and forth which of you has the problem.  Don’t just assume your cXML output is good – KNOW it’s good because with the flexibility in some tools that I’ve mentioned it will actually let you create very bad cXML that no one can run no matter how forgiving their system is.

Well this is a larger post than I meant – but I’ve been behind on my postings… so seemed I should make up for it here.  Next we’ll look at the PunchOutSetupResponse (the return to the POSR) – the OrderRequest and the POOM.  (Yeah, yeah… I can tell you’re all shaking with anticipation.)

See you next week.

Friday, April 3, 2009

what’s been keeping me up at night…

Been a bit busy… so I figured I’d give everyone a taste of the somewhat promised cXML eCommerce toy I’m working on.  So here are a few screen shots.  As you can see – it’s designed to load cXML or XML and perform validations.  It also allows the tester to actually POST the cXML PunchOut and OrderRequests directly to the server.  This retrieves complete header information.  The tester can auto-generate OCI HTML web forms that can be sent to customers for their own testing.  

You can also verify Authentication Tokens, Session IDs, and perform HostName / IP Address checks. 

The cXML validation allows the user to validate against any of a number of DTD files, from cXML to those used by OSN or even 3rd party or local files.  Anyway… that’s what has been keeping me from Posting.   In the next week or so – I’ll get some code up and discuss how eCommerce procurement systems work a little more directly. 

Until then… you’re just going to have use these shots and wonder.  (And for the record … yes I have removed any sensitive info from these screen shots.  The cXML displayed is a generic OrderRequest form. 

 image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

image

 

image  image

image