Posts Tagged Papervision3D
The post of the year
It is that time of the year where I look back and ponder. As I had foreseen, 2009 was really a great year (at least professionally but that’s another story). If my skills improved a lot in 2008 they continued to do so in 2009. I got to play a great deal with Papervision3D (roar4milk, Holiday Humanoes) and I got to modify my project workflow a lot too (I plan to make a presentation on that this year).
In numbers, I got to write 62 posts ( a bit less than once a week) and got 478 comments since September 2008. As for traffic, I am now getting 25 000 visitors a month, this is 10k less than the goal I set myself a year ago, but I don’t think it is so bad; my traffic is still growing steadily month after month. I did not write another article for InsideRIA like I wanted to, but I wrote 2 that got printed in FFDMag ( one of those I intended for InsideRIA but someone wrote on Google Analytics for Flash before me). What I am really proud of is that I got to give 2 presentations; one online and one in person at the Montreal Flash User Group. This is something I want to do more in 2010, 3 or 4 speaking engagements would be really nice. I already got an article nearly done so if I could get 1 or 2 more I would be happy. Lastly, I my traffic could increase to 35k visitors a month I think that would be enough for me. While we are at this, if I could be part of writing a book on ActionScript, that would just be the craziest.
Anyway, what I wish for the coming year is that I keep doing what I am doing. If I keep up the good work, good things will come my way, as simple as that, it worked fine in the past and I am pretty sure it will stay that way, naïvely. Blogging is all about keeping doing it.
May 2010 be as good for all of us as 2009 was good for me. Happy new year!
Dominoes for all for the holidays : Twist Image Holiday Humanoes
Posted by zedia.net in Twist Image on December 22nd, 2009
Want to see more than 2400 dominoes in 3D ?(why would you not?) Head over the Twist Image holiday card, see the Holiday Humanoes and make some with your friends’ faces on them.
I know that for every project I say that it was the most complicated one that I did, but this one really was the most complicated I ever did. There even was a night where I didn’t sleep because I wasn’t sure I could make it happen.
My big challenge was to create an experience that was close to what the design team was imagining but that wasn’t too CPU intensive (like all my other projects). I think I did manage to do that. It runs pretty smoothly even on some bad computers. I let Papervision3D do all the heavy lifting but I kinda trick the user into think that there are a huge load of dominoes while at any time there is only 300 of them max (you could consider this object pooling). A second challenge was to position those 2400 dominoes so the they make the final path. The design was done in Illustrator so what we did was that we exported the .AI file as a .SVG file. SVG is just an XML so I made another program that would read the SVG and output (trace to the console) ActionScript code that I would paste into the main application. Finally, the last challenge was to show a zoom out with all the dominoes fallen revealing the message. As I said earlier, if I had 2000+ dominoes at the same time that would be too hard for the computer and run really slow. So I replaced the scene with a bitmap. To get that final bitmap I had to make yet another program that would render me the final path with all dominoes fall and that a screenshot of it.
So I ended up doing 2 more ActionScript projects to end up with the finished product: The Holiday Humanoes.
Oh yeah, just a little trick to finish up, when you deal with COLLADA models, make sure your 3D guy exports the model without the textures if you don’t want the Flash Player to query the server each time you create a DAE. That is what was happening at first and it really scared me.
Prepare to Roar
Posted by zedia.net in Twist Image on October 9th, 2009
If you have been wondering why I haven’t been writting a lot this summer, well it’s been mostly because of this project. I learned a great deal on Papervision3D, using the webcam, on playing with bitmaps and on Facebook connect (even if I wasn’t the one doing that part) while building this project. So here you go, create some roars:
The goal of the campaign was to get teens involved with milk and to build on some ad spots that performed very well on MTV. So what you are doing with this application is recreating the ads but adding yourself at the end instead of the cow. Now I knowthat the site is a bit (to say the least) CPU intensive (3D tends to do this), but believe me it was worse than this before and I wish I would have had a bit more time to perfect this site.
The technical cool part is that you can use your picture, be it by uploading it or using your webcam, and using the derivate bitmap I will composite it with the cow skin and apply that to the loaded Collada model. That was kind of the premise of this site and we built around it with a vintage design. I hope you like it.
Here is a short list of librairies we used: as3corelib, TweenLite, Alcon, facebook api, google analytics for flash and Papervision3D.
Another cool feature is that you can embed your roar on your blog like this:
How to make Collada model double sided in Papervision3D
Posted by zedia.net in Papervision 3D on September 16th, 2009
Well I searched for this for a little while and even tough it is pretty easy, if I didn’t figure it out at first probably other people had the same absence of mind. Also I find it hard to find example of Papervision3D and know which version was used; you find a lot of examples but you never know if the API changed since then so I am going to do a complete example with the version used.
The version used for this example is 2.1.92.
What I wanted to do was to load a Collada model in Flash an animate it. Every thing was going fine with the test models until I used the real models. You see the real models had holes in them that allowed you to see inside the model. Now if your material is single sided, when looking inside, you are going to see through the material and it will look buggy. The solution to this is just to make all material in your model (you can map multiple textures in one loaded Collada model), but that is not as easy as it sound. I tried a couple of options before hitting myself on the face. What did you learn back with ActionScript 2; wait till something is loaded before trying to modify it. This also applies to loaded models. Once loaded I made a little function that would cycle through all materials and make them double side.
Here is the code for the example :
//create all the actors of a Papervision3D scene var viewport:Viewport3D = new Viewport3D(1000, 800); addChild(viewport); var renderer:BasicRenderEngine = new BasicRenderEngine(); var camera:Camera3D = new Camera3D(); var scene:Scene3D = new Scene3D(); //create the DAE/Collada object and load the model var model:DAE = new DAE(false); model.load("model.dae"); model.addEventListener(FileLoadEvent.LOAD_COMPLETE , daeLoadComplete, false, 0, true); scene.addChild(model); //finally add the enter frame listener to render the scene addEventListener(Event.ENTER_FRAME, render, false, 0, true); function render(event:Event):void{ renderer.renderScene(scene, camera, viewport); } //this is where the magic happens, we cycle through all the materials of the model and make them double sided function daeLoadComplete(event:FileLoadEvent):void{ var matList:MaterialsList; var mat:MaterialObject3D; matList = model.materials; if ( matList ) { for each (mat in matList.materialsByName) { mat.doubleSided = true; } } }
I didn’t include the import statement because I plainly forgot to send them to myself, but I will update this post to add them. Have fun loading models!
My review of FITC Toronto 2009
Well I’m on the train (not anymore) and I have 5 hours to kill so I thought I might use this time to write my recap of FITC Toronto 2009. In a general way, I liked this iteration of the festival more than last year. I think that my choice of presentations had a lot to do with it. Looking back, there are sessions I would have changed in my schedule but since they were filming most of the presentations I can just go and watch those that I heard good feedback from. The downside of this year was that I was alone so I kinda not fulfill the Connect part of the festival mission (Inspire, Educate, Challenge, Connect) but I will work on that next year.
What I learned
Here is interesting stuff I wanted to share:
- I really liked the presentation from PowerFlasher (makers of the FDT tool to write ActionScript). It gave insights on their creative process and how they deal with in-house projects. They said they would put the presentation on youtube so I will point it out when it is there.
- GAIA Framework: I wasn’t convinced before the presentation. Now I would like to try it out on certain type of project. What convinced me: the fact the it handles SWFAddress for you. I like SWFAddress a lot, but sometimes I would like it to be a physical object so that I could throw it out the window.
- Joshua Davis is an awesome presenter. If you get the chance to see him talk, seize it.
- I chose a couple of business presentations and they were probably not the best choices to make but I still got a couple of usefull links out of them:
- IconBuffet : Nice for Icons but also nice to know that they are made by Firewheel Design and given freely; nice way to get known.
- CoComment : Nice way to track your conversations, will definitely try it out.
- 37 signals : Heard so much about them that I should probably at least follow their blog
- BaseCamp : An online application to manage projects, made by 37 signals
- HARO : Help a reporter out : a nice way to get your name out there by helping a reporter and getting quoted
- VizualPV3D : Layout tool for Papervision3D that looks great. Can’t believe it was done by only one dude: Gary Stasiuk.
- Finally Colin Moock’s presentation held a couple of gems. First he his starting a company called User1 that will offer and develop the union platform which will facilitate the production of multiuser applications be it on the web or the desktop. Also he teamed up with MegaPhone, a company that provides a framework to manipulate any screen using any phone. I foresee lots of new marketing opportunities.
On a personal note
I own a HP mini 1000, one of those new netbooks. It’s a pretty nice netbook: it has a 10 inch screen, but I believe I need more than that. 10 inch is good for writting and browsingthe web, but not that good for coding. I really hope that they will develop folding LCD soon so that the laptop can stay small but the screen can get bigger.
Lastly, being in Toronto made me realize how much I like Montreal. More trees, smaller streets, no tramway; it’s just warmer. The only other city that compares (and that I have been to) is Amsterdam. I think Montreal deserves its own Flash conference.
Interactive scene with Papervision3D (Great White)
Posted by zedia.net in Papervision 3D on December 11th, 2007
I updated my previous experimentation with papervision3D to version 2.0 (Great White). I can say that it wasn’t too hard thanks to this John Grden article. But is article doesn’t explain everything. A lot of things have moved since the phunky branch; as an example, Planes are now in the org.papervision3d.objects.primitives package. Once you adjusted all the package you previously used so that they can now compile, you can start playing with the new toys. I didn’t try anything fancy; I just wanted to make my materials interactive. It actually was easier than with the previous version even if I had less documentation. I didn’t quite get how to use the Interactive Scene Manager in the previous version.
So if you want to make your 3D objects interactive, you first have to advise the viewport3d object. You do it in this way:
1 | viewport = new Viewport3D(0, 0, true, true); |
The fourth parameter of the Viewport3D constructor is the one you want to set to true. Once that is done you have to make your individual materials interactive also.
1 2 3 4 5 6 | var mam:MovieMaterial = new MovieMaterial(myMovie); mam.interactive = true; var p:Plane = new Plane(mam, 100, 100); p.addEventListener(InteractiveScene3DEvent.OBJECT_OVER, handleMouseOver); p.addEventListener(InteractiveScene3DEvent.OBJECT_CLICK, handleMouseClick); |
You can see that you have to set the interactive property of the material to true in order to interact with it. In the previous, I also created a plane and used the MovieMaterial on it. I then added the listeners on the plane itself. I don’t know if it is better to add the listeners on the plane or on the material but it worked fine this way, if you have more insight on this feel free to make a comment about it.
You have to import the org.papervision3d.events.InteractiveScene3DEvent package in order to use the 3d events. The events you can use are these ones: OBJECT_CLICK, OBJECT_OVER, OBJECT_OUT, OBJECT_PRESS, OBJECT_RELEASE, OBJECT_RELEASE_OUTSIDE , OBJECT_MOVE, OBJECT_ADDED. They are all self explanatory so I won’t explain them.
You now have everything you need to make an interactive flash movie using papervision3D, I hope I shed some light on that.
Impacts of Silverlight for a Flash Programmer
Posted by zedia.net in Silverlight on December 6th, 2007
I have been thinking lately about what impacts will Silverlight have on me as a Flash Programmer. I came to the conclusion that it wasn’t really threatening. It could have been threatening in the sense that it could have made Flash obsolete and make me loose future jobs at the same time. But the thing is, Flash is such a good technology, it’s been around for a long time, the community supporting it is amazing and Adobe has big plan for it, Silverlight would have to be packed with a lot of feature in order to shake Flash’s position in the market. I don’t think it has just that.
It’s true that videos in Silverlight look good, but now with the moviestar release of the Flash Player, I don’t think one is better than the other on that characteristic. It’s nice for programmers who know .net, they can just jump right in and start programming Silverlight applications (maybe with a small learning curve). Good for them, .net programmers are already in demand, now they are going to be even more in demand, their salary is going to increase, so does the cost of building a Silverlight application.
One of the thing that Flash as always suffered was the penetration rate of the Flash Player, as a proof, website using flash 9 are now starting to emerge even if its been more than 6 month since it’s been release. Silverlight will suffer even more as people are not willing to download anything anymore. Flash as the chance to be adopted by huge website like Youtube and Facebook and has been around for way longer, people trust the Flash brand.
A big advantage Flash has over Silverlight is all the documentation lying around the web. If you want to know how to do something in Flash, just Google it, it’s that easy. Also open source projects like papervision3d and Tweener are just amazing.
For all these reasons, I don’t think Flash programmers have to be afraid for their jobs because of Silverlight and that for at least five years. I actually think Silverlight is a good thing; a little competition never hurt anyone, Adobe will have to keep improving Flash which is very good for us.
Papervision3D 2.0 – Great White – is out
Posted by zedia.net in Papervision 3D on December 5th, 2007
Today the newest version of papervision3d was released. It’s the alpha for the 2.0 version and the code name is Great White. It has a ton of new features like shaders, animated models, shading, bumpmaping, frustrum camera etc. Tons of words I don’t understand yet, but what is more important to me is that it’s faster; in fact it’s supposed to be about 23% faster.
It’s funny because just last weak I was trying it out, I started with version 1.5, then I went to version 1.7. Two days later I was reading the forums and I kept reading about the Phunky Branch, so I tried it, it was version 1.9. Now just one week later version 2.0 is out, I guess I’ll have to switch again. It seems like a lot as changed in the Great White branch so I suggest reading this articles by John Grden about how to upgrade current papervision3d projects.



