Thursday, June 27, 2013

F*cking Normal-Maps

Will tell later. Gosh what a .. Krampf!
 ---
Okay. New Day. I calmed down about yesterday. Pfew ..
So what was going on? Well. It all started with ktzey asking for a sample how the game might look one. Maybe she knew some ppl that would like to help. So I send her this goodie here:


So far so good. I spoke about it earlier that I liked the light. The Shaders and everything. Okay. Because I dont liked to work on my College-Homework I decided to mess up with it and add some lightning resources to AxGL. 
Of course all other safh's simply use png-overlays to get any kind of effect. But you cant add real gloom just by that.

As usual I started with googling for keywords like Flash shaders, Stage3D lightning and so on and so on. Then I decided that starting with Post-Screen Shaders might be nice. Just some blur here and there. Thats I came up on Sam Divers Homepage: Salt Games.

He did alot of Filters here and there. Wrote some Tutorials and in the end he did many eye candy Flash-Demos that I enjoyed to watch... Until I saw the entry Normal Mapped Lighting in a Game

Have a look at it. Its just.... well progressed.
Suddenly it had blown up my head. I stoped caring about something else and just gained one fucking thought: Normal Maps. You. Need. Normal. Maps!

Unfortunatly Sam also did some Demos (with, and without Storm3D axeleration) about Normal-Maps and Pixel Blender.

They all seemd a bit out of Date. But anyway. I took my old college-stuff and redid the whole lecture about normals. Not as much and not as difficult as I thought. But that was before I started to look about how to do Shaders in AGAL and Flash. Because oh yes. The Adobe Doc's SUCKS. For sure. Theoretical blabla per excellance but, not to mentoin, you have to use our own shitty shader asembler language. Nothing importand. Just by side. Ah and well. Earlier there had been docs about it on "molehill" - but they are not there now anymore.
Molehill? wtf is that? One hour wasted. Back to google.

Norbz wrote in his Dev Blog a nice guide called Stage3D / AGAL from scratch. And the name is what it is. He starts at Adam and Eve of the AGAL Basics. That could come in Handy. But in Part 3 then he starts up with the same kind of Triangle sample as Adobe did.
To bad, that this color_r,color_b,color_g,pos_x,pos_y,pos_z thing never gonna be handy later. So WHY for god's sake is he still using it after Part 3?!? Not just that he lost the main goal of his tutorial: Doing 2D Shaders. No. Hes also filled me up with.. desillusion.

I just noticed I wont come to normalmaps this easy. As more I dig and read as more I drove away from the goal itsel. 3 hours gone.

Okay. Then I gotta break the rules. Sorry Sam. Loaded his demo. Decompile. Done.
.. hehe. hehehe. 
... extends MoleGraph. extends MoleScene. MoleGraphicConstands ... the. Fuck.
It took me about one hour of. Dunno why. To realisize that MoleHill was the former project name for the Adobe API that later got abadonned and partwise re-used for Away3D.
I got nearly insane with the bad decompiled code fragments. Was this God's punishment for ripping of a smal and very basic shader? Reading the Away3D Api Doc's made me insane. Nothing but rlly nothing looked like the former MoleHill anymore.

6 Hours. STOP!!
Okay. Clean your breath. Try something very different.
Grap yourself an Extension of AxSprite. Copy and paste the whole draw() routine made be Arkeus. Register more Textures. Replace the Shaders.... and remember the way how shaders work. How to pass structures. How to anything.

Here:
I made work. 9 hours.

Just in this moment the ppl that would like to help contact me in Skype. I ask them how well they know about shaders. That scares them so much, that they dont even want to try how to make maps with tiled. It's gotta to be too complicated.

Well. You cant have it all, no?


No comments:

Post a Comment