viernes, 21 de junio de 2013

Avoid transparent sorting with discard() function

One of the most expensive tasks when rendering, is transparent sorting.... having to sort all transparent meshes from back to front to render them that way is very consuming... and with Ogre in Iphone there is a 300 or something limit to the number of transparent meshes that can be sorted.... I do not know why this limit exists, or if its really necessary, but it exists.... One solution to this 300 limit, is to make clusters of transparent meshes, joined into one mesh, but then you have certain artifacts....


I never really had an issue with this problem, i could sort everythin fine, and we didnt have a lot of renderiing performance issues, until a few days ago, with a level we could not optimize enough... this wasnt in IOS but in a console... but the problem and solution is the same...

I discovered a VERY SIMPLE solution to say, Alpha plant textures....alpha plants, are more an STENCIL than an actual Alpha... there is no real need to have grades of transparency...


There is a special function in CG, and probably in any language....

discard()

with this function in a shader you force a pixel not to be rendered.

This way an alpha plant mesh, or any other kind of stencil mesh, where you do not need grades of transparency needs not to be sorted, and in fact, it is not an alpha material.... you simply do not render pixles that have transparency not equal to 1.0.


so, the sample would be something on the lines of:


if(color.a < 0.9) //not 1.0 just to make life easier for desingners
{
      discard();
}


This is probably very common, but i didnt know about it :P

martes, 5 de febrero de 2013

xtrafinder Finder but Cool



All this months ive been purely on Mac, Ive hated the Finder...

It looks all so messy, nothing is ordered, If you order by name then folders appear all over the place, if you order by type, types are generalized, file extension ignored, the whitish nature of mac, tho soothing at first, after 20 hours a day, get boresome...

I bought a new macbook pro for developing a few days ago, and i wanted a solution for all this minor issues... After trying most Finder replacements, i got to:

XtraFinder

Which is not a Finder replacement, but just a plugin, which makes everything more ordered, and more windows/linux like...

You can even change the background color of the Finder window to black!

Here is the link!


http://www.trankynam.com/xtrafinder/

domingo, 3 de febrero de 2013

And why not... just coz its my first day of blogging, and im in a rush...

a picture of what will be our first product... Murasaki Mist








Some specs of the game.

Iphone Action RPG, fantastic setting, a mixture of mexican and jappannesse culture.

IOS Private Key .p12 and .pem


To install a private key and pair, for IOS development through the terminal, type the following


security import priv_key.p12 -k ~/Library/Keychains/login.keychain

security import pub_key.pem -k ~/Library/Keychains/login.keychain



I always forget this, thats wh this entry exists!

Xcode 4 CPU Indexing

hi!

My first real entry.

The first problem i encountered when migrating my technology to IOS was that my Xcode was permanently using All of CPU, making my computer SLOW and terribly hot...

A few months before, I had SET one computer on fire, because of a similar problem...

After researching the problem, i discovered the issue was Indexing....

So, basically, if your Xcode (4.3 and 4.4 in particular) are eating all your cpu cycles, you must disable
xcodes indexing mechanism... autocomplete features wont be working very well, but aside from that, everything will go smoothly and you will get back your cpu cycles...

To disable Xcodes Indexing, open up a terminal and type (with Xcode closed):

defaults write com.apple.dt.XCode IDEIndexDisable 1



Hello World!

For starters, this blog is intended for myself, as a notepad where i can remember and come back to all those quirky nasty thingies ive come across when programming videogames. In particular, the horrible path from PC / Linux 3d game developing to IOS 3d game developing.

I am cofounder and CTO of Hollow Games, a small videogame company, Mexico City based.
Elias Kuri and I started this company in 2011, with nothing, except some experience at VR and a few grand (MEXICAN PESOS!).

We started out programming for PC, but in the midst of that development, we were forced to move all out technology, and develop and all new 3d game for IOS.

Ive never been to fond of apples products (nowdays I live and sleep surrounded by them), and I have never despised them that much, but surely enough, Ive never been to close to them. I had programmed 3d before in SGI, Solaris, all flavours of Linux, and Windows, BUT NEVER in an apple product. So, migrating my technology and developing an all new 3d game in IOS, was, PAINFUL, to say the least.

All those problems, big and small I have come accross, all that boureaucracy that you must face when programming for iphone, wants to be written here... for myself, and if it may help somebody else, what the better!


As this is a Hello World blog entry, I will give some details about myself.

My name is Daniel Rodil.

I am mexican and live in mexico... in fact, im in love with my country... i lived in UK for a few years, and have travelled as far as i have been able... but still my home is and will be mexico.

I am not a native english speaker, but my blog will be written in english, that way, more people can access it... so any misspellig or gramatical error, is completely normal.

I am and have been so since the beginning of the project, the only programmer and visual designer of Hiperbolia, a VR Mathematical application, that is basically a hyperbollic space renderer. HIPERBOLIA WEBPAGE

My first videogame, was an edducational videogame for kids born with HIV.

Ive had many jobs and projects during my life, most of them are not worth talking about, but my basic skills aside from videogameprogramming are:

drawing/painting
digital painting
video editing and institutional video
3d modeling and animating
2d animation
architeture software
automatic data cleansing

and thats basically it....

 If you ARE reading this blog, do let me know, coz honestly, i dun think anyone will read this first entry.

And if you ARE reading it, you might as well want to check my companies webpage:

Hollow Games

There you can even play a small html5 promotional videogame of our first product thats to come on july this year.

And you may also want to watch some of my short fiction animations in my vimeo channel:

Just look for me as Daniel Rodil...

Last but not least I am 28 years old.


Thats about it :3