Posts Tagged 3D
Hey, I am working on a bigger post, but in the mean time, allow me to write this quick tip. In NGUI, when you don’t use an atlas for your sprites, you use the UITexture class. At first I was having so much trouble with it because the make pixel perfect button just didn’t seem to make my texture look pixel perfect. That was until I figured it out.
Making it work
When you select your texture file in Unity (the actual png file), the inspector will show you settings for it. By default, the type is set to ‘Texture’, which seems fine, but what you really want to be setting it at is ‘Advanced’. Than you will be able to change the next combobox. In 3D you want to have images (textures) that their width and height are powers of 2, example: 2, 4, 8, 16, 32, 64, 128, 512, 1024. When you do 2D (UI) that really never happens; never. That is why you will likely set the Non Power of 2 to ‘None’. That is the most important setting. Now when you will press Make Pixel Perfect button in NGUI, it will resize the texture to the correct size.
Figuring out compression
To be frank, I don’t totally understand the rest of the settings as they refer to 3D stuff, but by setting the Wrap Mode to ‘Clamp’, Filter Mode to ‘Trilinear’ and Aniso Level to ’4′ , your texture will look better at run time. Also, as you probably don’t need it, you should remove the check mark after Generate Mip Maps.
Well that is it for this quick tip, I hope it saved you some time when dealing with textures.
All the debate about Apple vs Adobe really got me thinking lately. Last night , I woke up at 4 in the morning with the idea for this post. It suddenly hit me. Most of the latest trends on the web happened because it was allowed by Flash. If you think about 3D, Augmented Reality and ChatRoulette; all of those could not have happened if Flash didn’t exist and are currently not possible to implement using HTML5.
AR was all the buzz last year and 3D is what really made it possible in the browser. AR is a concept that has been around since the 90s but it never picked up until it came to Flash because it made it accessible. For AR you mostly need 3D and a camera. The webcam is easily accessible in Flash and since Flash is so ubiquitous. Now video is possible with HTML5 but webcam won’t happen; maybe HTML6. So as AR evolve we will see tons of new applications coming our way.
Now ChatRoulette is really interesting. I don’t know if it is going to last or if it is going to disappear or change, but it definitely showed an interesting facet of the internet ( not talking about the impressing number of male exhibitionists out there). ChatRoulette could use the webcam and a media streaming server, but that is not what is happening here. Already all that is not possible in HTML5. What ChatRoulette is using is the new P2P service Stratus by Adobe integrated FlashPlayer 10. That is a new feature in the Flash player that most people are not aware of. What it does is that it connects users directly to send the video without going through the server ( in this case the ChatRoulette server) so it save a lot of money in bandwidth. Is this a cool feature? fuck yeah. Is this close to being included in HTML5? Not in years.
You can see a really cool demo of a 3D engine all in flash here. It runs nicely when you lower the settings a bit and doesn’t seems too slow. The sprites need some touch-ups but it’s only a demo so we can hope for the best. I don’t think they are going to release the code for us to play with it, but it’s nice to see that this can be done with flash. It confirms that being a flash programmer is really a good career choice because there is going to be a lot of good jobs in that domain in the future. As the computers get better and better, we will be allowed to program more complex stuff and no designers will be able to do it.