Je réalise en ce moment même un article pour la MSDN sur l’affichage de terrains intelligents en Xna à l’aide d’une technique que j’ai “inventé”.
Le système fonctionne plutôt pas mal et répond à tous mes besoins. J’en profite donc pour le partager avec vous ici.
Je donnerais l’url de l’article sous peu. Pour l’heure je peux donner les grandes lignes du fonctionnement de cet algo.
J’ai tenté de comprendre à quoi correspondait une forme en Xna. Pourquoi est ce ci important de comprendre ça ? Tout simplement parceque la forme est l’élément visuel le plus important d’un terrain. Si on veut pouvoir afficher un terrain de manière intelligente, c’est à dire avec peu de resources en gardant au maximum son aspect il faut comprendre au mieux ce qui le caractérise. La forme est un ensemble de courbes. C’est à dire un ensemble de triangles côtes à côtes qui ne sont pas coplanaires. A partir de là j’ai cherché à comprendre comment on pouvait définir le fait que deux triangles appartiennent à deux plans qui forment un “angle” entre eux. En fait, c’est tout simple : on le déduit à l’aide de leur normale. Quand deux plans ne sont pas parallèles leurs normales forment un angle. Il suffit alors de calculer le produit scalaire de leurs normales (qui donne la force de leur angle) pour déterminer l’intersité de la forme.
Maintenant que je connait l’intensité de la forme, je suis en mesure de déterminer quelles sont les formes le plus caractéristique de mon terrain pour le garder visible et quelles sont celles qui ne sont pas pertinentes pour les supprimer.
J’ajoute à celà un critère primordial : la distance de la forme à la caméra. Une forme peut être non pertinente si vue de loin. Mais à proximité il est important de la voir. Vous pouvez voir le résultat à l’aide de l’image ci-dessous :
A peu près 100 fois moins de ressources prises et le même aspect. Regardez de même ce cône que j’affiche avec ma technique en Wireframe :
On remarque que la ou il y’a une courbe (à la base du cone et au sommet) le nombre de primitive est important. Mais là ou les courbes sont inexistantes (sur le plan principal et sur les coté du cône), le nombre de primitive est réduit au maximum.
L’image suivante explicite encore mieux le fait d’afficher les détails proche de la caméra et réduire les détails à mesure qu’on s’en éloigne :
J’avais placé la caméra au centre de l’écran (là où se trouve un cratère) et j’ai mis en pause l’application de l’algorithme. Le mesh du terrain n’est alors plus modifié. J’ai alors pris de l’altitude pour comtempler le terrain. On voit que près de la caméra les détails sont au maximum et à mesure qu’on s’en éloigne ils se réduisent mais gardent l’aspect du terrain. De cette façon on peut très bien imaginer l’affichage de terrains eloignés avec très peu de détail pour simuler une ligne montagne comme la ligne bleue des vosges :
L’affichage du terrain est alors ultra leger. J’ai appellé cette technique BilLOD, je vous laisse réflechir pouquoi
Vous pouvez télécharger le code source ici.
Attention il est en Xna 3.0.
A bientôt sur ce blog !
Wow, has it really been two months? I guess you can say that I needed a bit of a break from activity here. A blogger‚Äôs sabbatical if you will. I have been keeping tabs on the ‚Äúpulse‚ÄĚ of the community from a distance. I also have been busy in the background working on projects, so I haven‚Äôt completely left the scene. So, like one of my favorite album titles from Alex Gold, I‚Äôm ‚ÄúBackfromabreak.‚ÄĚ More to follow‚Ä¶
The Grand Poobar of Search Engine Guide ‚Äď Jennifer Laycock has posted a summary of the recent Small Business Marketing Unleashed event in Columbus, Ohio.¬† http://www.searchengineguide.com/jennifer-laycock/recapping-fall-small-business-marketing.php¬†
Now her view might well be biased by the fact that she was the key person responsible for the event, or it might well be reflective of the others that attended the event. Talking to the many that were present at the event, I believe it‚Äôs the later ¬† At any rate, I‚Äôll be watching out for the dates for the next event in April and hoping it lines up REAL close with other travel to the USA so I can come again and learn more. I feel I‚Äôm really getting a handle on how to get my websites up there in the eyes of the people that I want to target. Now that I‚Äôve got the ideas, the next step is to put the plan into action. Thats the task for October / November!
Anyway ‚Äď enough for now ‚Äď time to head out for dinner with my SBS friends here in Seattle!
A digital camera containing secret images and information about terrorism suspects from the British spy service MI6 was accidentally sold on eBay, according to various reports Tuesday from Britain.
What is Android?
Google’s Android is an operating system for mobile phones, similar to how Windows or Leopard are operating systems for PC and Macintosh computers. Android provides the base on which other software on the phone works. Design of the operating system was originally begun by Andy Rubin, a California-based technology entrepreneur who formed the company Android Inc., which Google bought in 2005. The search-engine company announced in November 2007 that it would enter the mobile phone market through Android.
Again I am going to report on another Windows Mobile device I am currently using: the Toshiba Port√©g√© G810.
The G810 is a very interesting device with very good specs:
- Processor: Qualcom MSM7200 400Mhz
- Memory: 256/128 MB
- Battery: 1530 mAh
- Camera: 3MP, and VGA
- Band: up to 3.6Mbps HSDPA and 2Mbps for HSUPA
- GPS: A-GPS
- OS: Windows Mobile 6.1
- Wifi and Bluetooth
- FM Radio
As for what I have noticed so far:
- Clearly fast device;
- Great screen, great color depth and brilliance, very crisp;
- External housing is rubberized and very nice to touch, and easy grip;
- SPB Shell included, very cool!;
- Power button not very cleverly positioned;
- The whole face buttons looks very cool but is not practical at all;
- The pen is an intelligent approach, but fails in what comes to quality since its very plastic. Oh, and if you loose you loose part of the device’s aesthetics;
To see more images click here, if you have any questions about the device feel free to ask.
I for one am very happy that the next version of Visual Studio will finally embrace what some of us have been requesting for a long time now ‚Äď UML adoption. A few months ago I mentioned some stuff that would be in the next version of VS and now that more has been going on I am thoroughly pleased.
For my part I’ve not really looked too much into what’s going on with the class diagrams etc and whether or not we will be graced with the standard l&f for UML diagrams. I for one hope that this does happen.
This is way overdue and both Eclipse and Netbeans have UML incorporated into them to a certain degree. Netbeans has pretty good UML support right now in fact. Of course the great thing about the addition of these UML features is that we will be able to get a more abstract view of our code and the way various components work with one another by reverse engineering it. Maybe this might not seem so helpful now, but when you revisit old code or encounter code that isn’t yours it will be.
I know that the VS team have had a tonne of stuff to do but why have we had to wait so long for tools which are pretty much essential? We’ve been palmed off to use things like Visio or fork out the big bucks for more comprehensive software.
Well, at least the wheels are finally in motion. Hip hip ūüėČ
Before I go be sure to check out Channel9 this week for more insight on what’s coming up in VS2010. I briefly watched a video today just to get the gist of what has been added since I last looked and it was pretty decent.
I posted on the problems I had had mocking out an SMTP server, well I have moved on a bit. As I said in the update note in the last post, I had given up on nDumbster and moved over to LumiSoft's freeware mail server.
The Lumisoft server is a far better starting point as it is a 'real' server that supports all the major mail protocols. As all the source (and binaries if you can't be bothered to build it yourself) are shipped it is easy to create a wrapper class for unit testing purposes that can do whatever you need.
However even with thi much improved server I still had a problem with System.Net.Mail calls. I had four tests
- Send a single email with System.Web.Mail
- Send a single email with System.Net.Mail
- Send a batch of three emails with System.Web.Mail
- Send a batch of three emails with System.Net.Mail
Before each test a new SMTP server was created, and when the test completed it was disposed of. Each test worked if run by itself.
The problem was that if the tests were run as a batch the final test failed. When the SMTP server was checked it was found to have no messages recorded, not the expected three. However, the logging said three messages had been sent OK. Swapping the order if the tests did not effect the basic issue that the second System.Net.Mail test reported no emails received, whilst the System.Web.Mail tests were fine.
By adding a unique identifier to each created SMTP server it could be seen that the fourth test was sending it mail to the second SMTP server (which should have been disposed of well before the fourth test was started) hence the final test failing.
The problem appears to be that the threading model inside System.Net.Mail holds the TcpClient object in memory for longer than you would expect, so somehow allows the fourth test to reuse the connection (and server) from the second test. Though it is unclear how you are able to have two servers both on port 25 at the same time. I guess this theory could also go some way to explaining the issues I had with the nDumbster implementation.
Though not perfect, the solution I used was to make the Smtp Server instance static for the test class so for all the tests I created just one instance. Before each test I cleared down the received messages store. This far his is working reliably for both single tests and batches of tests.
The latest* Unified Communications technical rollup covers the following topics:
As usual, this information is posted every month at the Technical Rollup blog.
*UPDATE: The October 2008 Technical Rollup Mail – Unified Communications was also posted today.
What is a labcast? An online presentation with guided video demonstrations where you also get the chance to perform these same exercises on your own hands-on virtual lab that we provide during the session. As you face challenges in your lab, our instructors virtually take control of your lab to guide you through the tasks, giving you experience-based knowledge on the Microsoft product or topic. (There are no live instructors if you are watching an on-demand version.)
Some posts ago, we announced here that Microsoft released the Microsoft Desktop Optimization Pack (MDOP) and a promotion for the exam 70-656, that allow the first 500 IT Pros to take the exam through Prometric for FREE. The complete post you can read here: http://msmvps.com/blogs/herlesonpontes/archive/2008/08/21/1645413.aspx
]Also, I posted at my Portuguese blog that the MVP Cleber Marques (http://www.clebermarques.com/) created a set of articles about MDOP and the solutions that compose it in the Portuguese language. You can read more information about it at the URL: http://herleson.spaces.live.com/blog/cns!8ACB9B8FAEDBCB6F!1427.entry
And today, after almost one month of news about MDOP and its exam, I wish to share with you a great victory: I PASSED at the exam 70-656! I took it last Friday, and passed in an exam that requests a deep knowledge in Microsoft Application Virtualization (ex-called SoftGrid), beside the other solutions: AGPM, DEM, DaRT and AIS.
And there is more: I took a look at Microsoft site to see how many professionals passed in the MDOP exam so far (http://www.microsoft.com/learning/mcp/certified.mspx) and I found out that only 74 professionals worldwide have passed until September 22, which means that I´m a MDOP CHARTER MEMBER!
I want to say thank you to my friend Cleber Marques, that prepared an excellent material about MDOP and share it freely in his site. This material was essential to obtain this certification.
I dedicate this victory to my only and forever wife, Priscila, who always supports me and helps me in all moments of my life. I LOVE YOU, MY PRISCILA!
MVP | MCT | MCITP | MCTS | MCP | MOS
Culminis Speaker Member – Brazil
Writer of SQL Magazine, WebMobile and .net Magazine
Upgrading ConfigMgr 2007 RTM
Upgrading to SQL 2008 for ConfigMgr 2007 RTM version is now supported by Microsoft, but a clean installation is not. BEFORE the upgrade you must first apply the following Hotfix: 955229
Installing or Upgrading ConfigMgr 2007 SP1
A clean installation (and upgrade) of SQL 2008 onto a ConfigMgr 2007 SP1 box is supported, BUT you must first apply the following Hotfix: 955262