Today, to my horror, I realized after creating a point-sprite based particle system for Cosmopolis that XNA does not seem to support point-sprite scaling. Meaning that if you set your point sprite to be of size 100, it will occupy 100 pixels on your screen whether you are viewing it up close, or miles away. After a decent session of googling I found a solution which involves setting renderstates that the XNA does not allow you to set in code. You instead need to set them in the HLSL shader pass definition (which I normally do not like to do for various reasons). This will suffice (and set up a “correct” scale according to the previously linked article):
1
2
3
4
5
6
7
8
9
10
11
12
| pass Pass0
{
VertexShader = compile vs_1_1 VS_Particles();
PixelShader = compile ps_1_1 PS_Particles();
POINTSCALEENABLE= TRUE;
POINTSCALE_A = 0.0f;
POINTSCALE_B = 0.0f;
POINTSCALE_C = 1.0f;
POINTSIZE_MIN = 0.0f;
POINTSIZE_MAX = 9999.0f;
} |
Just be aware that you can not set these renderstates back through XNA, although it shouldn’t affect anything else.
The project I’m working on right now (and our submission to the Imagine Cup) is called Cosmopolis, previously known as Codename Life or Warpipe. In short, it’s a testbed for behavioral model research, funded by the Department of Defense, engineered at USC GamePipe with some design inputs from CMU. I could copy and paste a whole bunch of academic jargon about the idea and purpose, but as a proud non-PhD student I try not to get lost in the imaginary (they call it theory) world too much and just focus on programming and making things look pretty, at 60 FPS minimum.
My role is graphics and engine programming. Our team is pretty small right now, so I’m responsible for most things rendered on the screen, except UI. Balki (AKA Balakrishnan Ranganathan, but no one knows that’s his real name), a PhD student at USC Gamepipe, is leading the project and works mostly on engine, server and whatever dirty work that needs to be done. Marc Spraragen is another PhD student on the project, taking care of most of our paper writing needs as well as some AI. Then we have Nitin Venugopal, working mainly on patcher and deployment things. Last but not least there is Aadarsh Patel who was heavily involved in the summer but drowned by coursework at the moment. He wrote the animation system and content pipeline for the models.
As a part of entering the Imagine Cup competition and getting a free PDC ticket to boot (worth ~$1600), I have been challenged to start writing some random blurbs about my Imagine Cup development experience as well as my experience at PDC.
So… yeah! Our team at USC are making a game called Cosmopolis. The gameplay will not be discussed but I’ll try to share some random technical details, both from the past and as they are implemented. Subjects could include for example: Ambient Occlusion, Parallel Split Shadow Maps, 3D Particle Systems, Terrain visualization and Nvidia Nexus experiences.
However, chances are that I will fail miserably like 95% of other “blo**” (I despite that word), so come back often to laugh in my face when I don’t post anything! :)
Hey!
My name is Bjarni Thor Arnason and I’m a (or at least aspire to be) Game Programmer. I’m not looking for a job right now (working for Mythic Entertainment as a Software Engineering Intern on Warhammer Online), but I like to keep track of my work because we all know it can be a pain to get that old project running 2 years down the road when you want to show it to someone.
I’m less than a year away from graduating from USC with a Master’s degree in Computer Science – Game Development, so I’ll probably get more active in job searching when that moment draws close. But by then I’ll also probably edit this text :)
Thanks for stopping by! If you are curious about any of my projects, feel free to send me an email. Even if you are a student, not just recruiters!