YAY!

Posted on

I don’t know if its the lack of sleep, the non-stop pouring over this book, or the fact that I need coffee, but I just got to one of the last projects for chapter 10 (there are 3 or 4 of them) and I’m seeing the direction to name a Media Element the name of “ME”.

I saw that and started internally jumping up and down.

Why?

Because I’m crazy!! … and because I’ve seen that this was a major discrepancy that entirely breaks part of the application a few pages from now. The author, Victor Gaudioso (are you as used to reading the name as I am to typing it?), has in a page dedicated to book updates, the bold letters regarding this flaw.

Not sure why – but I feel as though I just “Dinged” in levels by reaching this point (for those of you who are not gamers, that’s a common phrase used among MMOers who increase in level of skill. Quite often, the game will let off a “DING!” coupled with particle effects and text in some form or another which tells you that you’ve increased in skill/level/whatever.).

Update: Now I’m a complete retard.  I was mistaking this naming for the other.  The other was a section which I had to skip to come back to as I couldn’t get it to behave in the way specified and instead of sitting there going back and forth like a mad person comparing over and over and over again until my eyescrossed, I decided to move on and hope that my abilities and proficiency has improved enough to be able to notice the error.

Convoluted explanation.  You could have just stopped at the sentence, “Now I’m a complete retard.” and you would have been good.

WPF Flyby – a YouTube video demonstration

Posted on

This thing that I’ve been talking about all day which has been driving me up the into a wall is finally in a state that is viewable.

Its a basic set of 3D text and a shape, neither of which is “rendered” in the way that many are used to when thinking of using 3D modeling tools, instead, its been kept somewhat raw but in an interesting way – its all kept as code – XAML to be exact.  It includes environmental factor code to allow for lighting and color variations when the text “interacts” with the lightsource.

I don’t know enough to know if it can be used in a way where multiple sources of light are present, but at this point, I’m pretty impressed at the power of XAML.

The below video is a camtasia recording of the “application” such as it is.  The button is set up, not with a trigger to start (which could have easily been set), but by a c# method.

The only thing that I would do differently is to have the button reset the storyboard to 0 (zero) on mouseDown which should allow for the storyboard to “rewind” and replay.

I’m wondering if it would be something where it would detect the place of the animation – such as  if the storyboard is greater than 0, then reset to 0.

I’m digging around google and have posted on the WPF MSDN forums to see if I can find an answer.

Anyway, here’s the video:

Ok, that hole was painted on that wall

Posted on

It wasn’t a real hole – it was a well painted brick with great perspective – I’ll just walk around the wall.

The program which I was using unfortunately wasn’t spitting out the xaml for the entire thing that I was viewing. It had the perspectives and the object and its name, but none of the factors regarding angles, colors, shades, textures, or any of that.

So I resorted back to just using what Victor gives in his example on his website and have played around with that. Since I wasn’t able to create the objects, I figured I should at least work for it – right?

So I went through the xaml and hand-changes the aweful red/brown/pink color that his “WPF” was at. At least he’s going w/ the theme presented by the cover this time.

So I modified the “WPF” and turned it into a nice shiny blue but retained the gold hoop which is behind it.

Here’s the fun part – now that the 3D element has been created, I can modify it in Blend. The 2 objects can either be modified as a unit or individually, and that’s QUITE a lot of fun.

So I’m somewhat going outside the boundries of this chapter. Not by much, but a little. Its fun to see what “this button does”.

Anyway, when I have the entire exercise completed, I’ll camtasia it for all of you viewing the blog and put it up on youtube. 😀

A hole was spotted in the brick wall!

Posted on

I thought these walls were supposed to be sturdy!

Blender functions without the correct version of python installed, but not everything works. A lot of the key controls may as well not exist and the entire use of the right-click functions are gone.

Thankfully everything is menuful – and there are a LOT of menus, but I was able to wade through and even though its been years (something like 5?) since I’ve played with 3D models (and I didn’t do it for very long either), I was able to accomplish nearly what was being instructed to do in the book.

The codeplex exporter works so well that it makes you feel as though it must have a bug or a hitch. It just – works and takes next to no time at all. About the amount of time that it takes for you to release your mouse button from clicking on the “Export to XAML”.

So my thanks to the creator of the export to XAML plugin and to the great people within Freenode’s #blender IRC channel for your help and humor.

Hello brick wall!

Posted on

Brick walls are nice.  Sturdy and thick.  The big bad wolf cannot blow them down.

I’m looking straight at one.  ZAM3D by Electric Rain is not available for download on a trial basis.  You have to fork over $200.00 for it.  Its neat that they make the tool available for download, but to continue within the scope of this book, I need to be able to export to XAML.

So I’d found a highly approved alternative – Blender3D with the codeplex plugin.  The export tool is great, but Blender3D requires Python, and not just any version of python.  It requires 2.5.2 or earlier.

Their download page for that isn’t linked to on their main page, so you have to find it by way of google.  So I find it, and the downloads which are available are for 64bit versions of windows installed, x86, or an entirely different operating system.  There is someone on source forge which has made available something related to a 32bit binary for us still running in 32bit and I’ve downloaded this, but it tells me that I am required to have an even earlier version of python – that earlier version doesn’t have the download for my lowly 32bit windows xp.

UGH!  So now I’m stuck.  Victor Gaudioso, author of the book that I’m going through on Blend 2 has examples available for download, so in light of my beautiful brick wall, I’ll just download his project, snatch up the XAML that his 3d object has, and work with that.

public Window1()
{

InitializeComponent();
mainWindow.Ariel += new Ariel(mainWindow_Ariel);

}

void mainWindow_Ariel (object sender, MouseButtonEventArgs e)
{
MessageBox.Show(“Ariel is Frustrated”);
}

Working with 3D objects

Posted on

I ran into an issue with my Observable Collection and after comparing my code and xaml against the one made available for download on http://www.windowspresentationfoundation.com I decided that I’d come back to it and work on the next chapter which deals with handling 3D elements and their export to XAML.

The first part of the chapter is essentially the same as what was done back in chapter 3.  So I skipped ahead to the portion where the author is asking the reader to download and work with Electric Rain’s ZAM 3D program.

The problem is, since they are no longer in testing, the product has officially released, they are no longer making a trial available for download.  They state that the functionality is entirely the exact same as their primary product, save for the export functionality to XAML.

I’m not going to let that keep me down though.  I did a search on google and discovered a great paring.

Someone on codeplex.com made an export tool available for download which hooks into the open source 3D program made available for download at blender.org

They don’t mention it, but when you install blender, it directs you to python.com as it will not run without python installed and functional.  So if you’re following along in the book, you’ll need to be sure to hit python’s download page and make note of where the Windows installation is (3 links down) on the page.

I’ll let you know how things go with this alteration to the book‘s direction.

Edit: There’s a great wikibook available called, “Blender 3D: Noob to Pro” available which can get someone jump started into using Blender.