« April 2005 | Main | June 2005 »
May 31, 2005
Transparent MIAWs
For many releases now Director has provided the ability to mask MIAWs (Movies In A Window) opened by projectors, but that ability has been limited to using 1-bit black and white masking images. The development and release of Director MX 2004 saw some excellent improvements to the MIAW feature, but what didn't make the cut was >1bit masking. In exploring what would be possible in this area there was one little feature left in the Windows player (sorry Mac folks) and as with all undoc'd abilities it's untested and therefore something you should use carefully. That one feature is the ability to set a window's blend... :)
Setting the Blend of a Window
This undocumented property is really simple, it's called 'blend' and it's a window property that takes a numerical value from zero to one hundred:
-- create a window and set its blend property
tWindow = new window("Foo")
tWindow.blend = 50
Done. Give it a go, but remember that this property is only active in Director MX 2004 on Windows, and as always heed the disclaimer below. Enjoy.
Disclaimer: I make no guarantees regarding validity or usefullness of the information contained in this post. This feature was left as undocumented, and therefore unsupported on purpose, it either wasn't fully developed and/or it wasn't fully tested. I suggest that you utilize this technique in experimental movies due to the potential risks involved. There is no guarantee that this undocumented feature will survive from release to release. Use this technique at your own risk!
Posted by thiggins at 11:11 AM | TrackBack
May 24, 2005
Tree Scattering Across a 3D Terrain
Recently on one of the Director mailing lists (dir3D-l) a developer asked some questions relating to problems he was having in "scattering" trees across a terrain surfce within a 3D scene in Director. He was able to randomly scatter the trees by coming up with random faces, but then the questions arose when trying to determine the location of that face as well as the "up" direction to be used in orienting the tree. In the initial demo the developer used the first vertex listed for the particular face as the position, then used the shading normal vector for that vertex as the "up" direction in order to properly place and orient each of the scattered tree models. But I offered a slightly different technique...
I suggested that instead of placing the tree model at the same location as a vertex of the particular face, he determine where the center of that face is and place the tree there. That introduced a wee bit of complexity as there are many ways to define where the "center" of a triangle ought to be, in my case I suggested using the incenter of the triangle instead (draw an angle bisector for each angle in the triangle, the point at which the bisector lines intersect with each other is the incenter position). In addition I suggested that instead of using the shading normal for any vertex (as it might not be truly perpendicular to the face) he should use the vectors defining the three sides of the triangular face and the cross product result to compute a truly normal vector, one that is specifically perpendicular to the face.
It all started as an email exchange between myself and the developer off-list but then we both decided the samples I created and the brief articles/write-ups I shared with him were worth posting for others to see. So please feel free to have a look at the following two articles as both Marty and I hope that our off-list conversations have produced some helpfull information:
Finding a Triangle's Incenter
Scattering
Please note that it is my intention to formalize these a bit and then look to post them either to DirectorDev.com or to the Director Developer Center.
Enjoy! Comments appreciated. :)
Posted by thiggins at 04:04 PM | TrackBack
May 17, 2005
Using Web Services in Director
Hey folks, have you ever puzzled over how you might go about utilizing web services from within Director-authored content? Dan Sadowski, one of our development engineers just gave it a go and wrote up a nice article for the Director Developer Center:
Using Web Services in Macromedia Director MX 2004
Dan talks about how this can be achieved either natively in Lingo or via Flash sprites on stage. Naturally sample files are provided for you to peruse, enjoy!