I went to japan with Brien an John.
But this wasn't old or new japan, this was Eden japan.
After we got out of our plane, and walked into the airport terminal, it was obvious that Japan was no longer like it's former self; they had mastered use of space and eliminated building ridiculous amounts of structures for ridiculous amounts of people. All of the advertising nonsense had gone away, the airport was very small, because it only needed to have the airstrip large.
So we take a walk instead of taking a taxi or bus, and walk right into the middle of this city, that, unlike current japan, isn't full of skyscrapers and people congestion, but rather a very clear air to the place, no trash anywhere, the density of the population was reduced heavily, there were trees, parks, and lots of green things all over the place.
Interestingly, we get to walk by this water park thing on the corner, near the ocean. This part of the dream more or less catered to my interests, so skip if you want. There was this large quarter circle wave pool, at least 200 some feet radius, and in the middle it had this pretty awesome water slide, which was naturally decorated like any typical asian dragon should be. The only interesting mechanical aspect was the slide was tethered and stable, so it could actually move around, which changed the slide as you were sliding, kinda a cool design, made it pretty intimidating, though the graphics were cute and funny, so it wasn't too terrifying. The way it moved was unusually organic though, and like all waterslides of this type, you start at the tail and come out the mouth. I asked a local about this craziness, and they pointed to a holo-prompter, which played a little holographic video detailing the history (faked) of the slide itself. Apparently, back a long time ago, there was some great conflict over this portion of the sea, and two warring families were causing so much bloodshed, that it angered one of the great dragons enough to come and destroy the commanding officers (this is accompanied by a nifty animation where the slide morphs into it's real form and devours all the warriors at that point in time, yay.) before settling down into the form you see now. Knowing that transformation ideals weren't uncommon in japan, I dismissed this mess and moved on, so we walked toward the city again.
On first glance, we get to see that most of the buildings aren't much taller than 14 or so floors, and appear to be made of bricks and glass, adhering to earthen tones and less harsh colors. There were hardly any steel buildings to be found, and every mile there was at least 2 acres devoted to a green park, where most of the people were milling about, talking, or, as the case was, riding the little carnival rides and buying stuff from street vendors. It looked in spirit a lot like the first part of chrono trigger, really. In either case, we were trying to find where Elena was, and we wandered onto the highschool campus, which had some very ominous prison like brick buildings, with darkened glass. School was always in session, and their highschool was not just that, but also a university, implying that education could be learned on a college level if you so desired. The campus had a few buildings too, and spanned a good chunk of space, with plenty of park inbetween it, much like OU's mall areas, but much greener and more well maintained, which is easier for a place that doesn't have the kind of weather we do.
So after talking about the high school, we began to walk toward main street and all the commotion, nothing much fantastic happening yet, there was a giant ferris wheel in the middle of the town and some sort of festival going on, with generic fair foods and booths, people were in general having a great time; so we got some sake and joined up. Although, the japanese people were different this time, they would make eye contact and greet, though I believe this is a function of alcohol rather than culture.
Eventually, after walking around this city for a bit, we found the building we were looking for, and the camera is forced to undergo a fade till we arrive at scott's new lab, which is larger than his current one but still just as messy. We talk to him for a while, and hang out talking about some disease that had occurred, as if there had already been a life cleansing tragedy that occurred naturally, and he remembered he had a time capsule somewhere in the ceiling (raised ceiling) so that the government wouldn't find and destroy it; Apparently the japanese government destroyed their history in order to maintain order or something stupid like that. So we much around trying to find his box, a maintenance guy comes over and asks what we're trying to do, scott makes up an unbelievable lie, the guy doesn't care, and tells us he'll do what he can. About this time the alarm goes off, so that ended that.
Nothing fantastic happened in this dream, it was pretty tame, not much more than a elated feeling of walking around this happier, more dense world. I think what really struck me was the cleanliness, things weren't like in america where we sacrifice our planet for speed and profit, it was emphasized with nature, temporary materials were all rice paper variants, there was no trash at all anywhere, all of the greenery was well maintained and practical rather than just looking pretty, sporting herbs, air cleaners, fresh smelling flowers and fruit trees. All of this would have failed if the people have been fucking it up, as they usually do, but that didn't happen here. Something had these people trained, or no longer living in fear. I'd like to believe it was that waterslide.
Miscellaneous banter, Useful mathematics, game programming tools and the occasional kink or two.
2009-04-28
2009-04-24
Dream; Stupid pokemon movie
'A Pokemon Movie'
Already this isn't good.
But anyhow, apparently a grand tournament of pokemon masters was to commence on this island, inviting all of the worlds best and most skilled trainers to compete against eachother for a sort of 'black' prize; This was not a legitimate sponsored tournament, this was a underground one, allowing dirty tricks and darker tactics to be used, pokemon may even be killed for that matter.
So, I was not a trainer at all, however, Kelly was a master-trainer in training, and the rest of the GH crew were either support characters or friends of Kelly for light sparring. Turns out, since I know not a lot about pokemon except their data formats, there was a school for animal training in general, which was somewhat like a night school, since it did not replace primary education, but instead augmented development of this pokemon fad hobby thing. I do remember that Kelly seemed to have the same team from brawl, which doesn't make sense, but oh well.
On the side, Etna, my favorite videogame heroine, was also deciding to enter the contest. However, there was this hilarious Disgaea style cutscene with her arguing with her Prinny's about getting items so she could create the ultimate demon pokemon, and well, she did, but as we all know she's not the type of person to spend the time and effort to properly train an animal, and rather assumes it'll act correctly or train it by force.
So, after some conversations at school, and a few classes, GH team banded and we took a boat out to this island so we could watch the competition. Kelly was too smart to enter this tournament, especially when all bets were off about the safety of your monsters. But it'd be kickass to see some of the toughest pokemon out there battling it out. We arrived, watched a few fights, which involved some weird pokemons I hadn't seen before, then decided to go to the concession stand to get some foodulons.
Well, when we left, it was Etna's turn soon, and she was walking her pokemon on a leash to the side of the arena for waiting, but, well, the food storage was visible to this monster, and it began yanking on it's leash, Etna scolded it, but, well, it's not trained properly, so it yanks on the leash till it breaks (it was comically thin) and starts gobbling all the food. Etna goes over and starts hitting it, then gets a shocked look, says 'Ugh' and leaves promptly. Well, apparently this demon pokemon just starts growing as it continued to eat, and everyone immediately took notice, as it had gotten nearly arena sized in no time at all.
We were all at the snack bar, and we hear the commotion and go to check it out, but not really rush in, more like peeking.
Well, this giant monster thing looked a lot like one of those generic godzilla shapes, but longer arms and more sleek build, kinda brown and tan two-tone type colorings with some black markings here and there. It's eyes were yellow-reddish, but it also had claws on it's hands and feet, and some spines on it's tail. It did look like yet another pokemon, but, well, since it was THIS big, it immediately began eating as many of the entrants and pokemon as possible! Which was essentially fanservice to me, but that's besides the point. The thing runs around, smashes the exit so everyone is trapped, and basically spends the next few minutes making sure it had eaten everyone in glorious cartoon style. Well, the Generic professor oak character was standing there, and tried to run but it got him, cue main-character death scream.
So we were deciding what to do, and some other trainer with the same pokemon as kelly rushes out and declares it can beat this monster, and the movie stops and I mentally said 'Hold it. This arena was supposedly filled with the worlds best pokemon and trainers, this thing wipes em ALL out easily, and some punk kid with the original set characters thinks he can do something? Yeah. whatever.'
So we cut to a interior shot of the professor, who looked like he was floating in some sort of dark amber liquid, trying to hold his breath but fails, and it cuts to a monologue 'huh? Strange, I'm not dead... wait... Neither are any of the others! Oh no...' As it pans out, showing this large dark-colored liquid filled chamber, with a ton of these amber bubbles each containing one of the eaten people/monsters, most of them asleep or knocked out. Apparently, this monster was a generic anime 'container' monster, it's purpose is to contain and restrain, without harming it's victims. These kind of things are everywhere in cartoons.
So, GH team decides to leave. Not our problem. After all, if it was Etna, she'll get her Prinny's to beat the f*** out of it until she get's what she wants.
The really funny thing about this dream, was the entire thing was drawn animated; It did look exactly like those super shitty pokemon cartoons, and all of us were drawn in that style, which was hilarity. It worked surprisingly well, and honestly, this movie had just about the same quality as the actual pokemon movies, but with much less fanservice to additional fetish groups, instead focusing only on one. Which is no surprise to anyone.
Other curious details, the school for training looked a lot like my high school, the arena was in a mountain, and kept very dark, that pokemon Etna brought was called 'Gizzardon', and all of it's internal scenes were in high detail, but still had animated parts if need be. The in-dream kelly really liked that squirtle though, he even had it trained to do homework and talk some, which was pretty badass. However, the ivysaur just sat next to the window and made noises, and the charizard was just sleeping all the time. Was kinda a funny dorm room shot I guess.
Nothing too crazy actually happened it seems. I'm disappointed Raesir didn't show up, this seems like his kinda event.
Already this isn't good.
But anyhow, apparently a grand tournament of pokemon masters was to commence on this island, inviting all of the worlds best and most skilled trainers to compete against eachother for a sort of 'black' prize; This was not a legitimate sponsored tournament, this was a underground one, allowing dirty tricks and darker tactics to be used, pokemon may even be killed for that matter.
So, I was not a trainer at all, however, Kelly was a master-trainer in training, and the rest of the GH crew were either support characters or friends of Kelly for light sparring. Turns out, since I know not a lot about pokemon except their data formats, there was a school for animal training in general, which was somewhat like a night school, since it did not replace primary education, but instead augmented development of this pokemon fad hobby thing. I do remember that Kelly seemed to have the same team from brawl, which doesn't make sense, but oh well.
On the side, Etna, my favorite videogame heroine, was also deciding to enter the contest. However, there was this hilarious Disgaea style cutscene with her arguing with her Prinny's about getting items so she could create the ultimate demon pokemon, and well, she did, but as we all know she's not the type of person to spend the time and effort to properly train an animal, and rather assumes it'll act correctly or train it by force.
So, after some conversations at school, and a few classes, GH team banded and we took a boat out to this island so we could watch the competition. Kelly was too smart to enter this tournament, especially when all bets were off about the safety of your monsters. But it'd be kickass to see some of the toughest pokemon out there battling it out. We arrived, watched a few fights, which involved some weird pokemons I hadn't seen before, then decided to go to the concession stand to get some foodulons.
Well, when we left, it was Etna's turn soon, and she was walking her pokemon on a leash to the side of the arena for waiting, but, well, the food storage was visible to this monster, and it began yanking on it's leash, Etna scolded it, but, well, it's not trained properly, so it yanks on the leash till it breaks (it was comically thin) and starts gobbling all the food. Etna goes over and starts hitting it, then gets a shocked look, says 'Ugh' and leaves promptly. Well, apparently this demon pokemon just starts growing as it continued to eat, and everyone immediately took notice, as it had gotten nearly arena sized in no time at all.
We were all at the snack bar, and we hear the commotion and go to check it out, but not really rush in, more like peeking.
Well, this giant monster thing looked a lot like one of those generic godzilla shapes, but longer arms and more sleek build, kinda brown and tan two-tone type colorings with some black markings here and there. It's eyes were yellow-reddish, but it also had claws on it's hands and feet, and some spines on it's tail. It did look like yet another pokemon, but, well, since it was THIS big, it immediately began eating as many of the entrants and pokemon as possible! Which was essentially fanservice to me, but that's besides the point. The thing runs around, smashes the exit so everyone is trapped, and basically spends the next few minutes making sure it had eaten everyone in glorious cartoon style. Well, the Generic professor oak character was standing there, and tried to run but it got him, cue main-character death scream.
So we were deciding what to do, and some other trainer with the same pokemon as kelly rushes out and declares it can beat this monster, and the movie stops and I mentally said 'Hold it. This arena was supposedly filled with the worlds best pokemon and trainers, this thing wipes em ALL out easily, and some punk kid with the original set characters thinks he can do something? Yeah. whatever.'
So we cut to a interior shot of the professor, who looked like he was floating in some sort of dark amber liquid, trying to hold his breath but fails, and it cuts to a monologue 'huh? Strange, I'm not dead... wait... Neither are any of the others! Oh no...' As it pans out, showing this large dark-colored liquid filled chamber, with a ton of these amber bubbles each containing one of the eaten people/monsters, most of them asleep or knocked out. Apparently, this monster was a generic anime 'container' monster, it's purpose is to contain and restrain, without harming it's victims. These kind of things are everywhere in cartoons.
So, GH team decides to leave. Not our problem. After all, if it was Etna, she'll get her Prinny's to beat the f*** out of it until she get's what she wants.
The really funny thing about this dream, was the entire thing was drawn animated; It did look exactly like those super shitty pokemon cartoons, and all of us were drawn in that style, which was hilarity. It worked surprisingly well, and honestly, this movie had just about the same quality as the actual pokemon movies, but with much less fanservice to additional fetish groups, instead focusing only on one. Which is no surprise to anyone.
Other curious details, the school for training looked a lot like my high school, the arena was in a mountain, and kept very dark, that pokemon Etna brought was called 'Gizzardon', and all of it's internal scenes were in high detail, but still had animated parts if need be. The in-dream kelly really liked that squirtle though, he even had it trained to do homework and talk some, which was pretty badass. However, the ivysaur just sat next to the window and made noises, and the charizard was just sleeping all the time. Was kinda a funny dorm room shot I guess.
Nothing too crazy actually happened it seems. I'm disappointed Raesir didn't show up, this seems like his kinda event.
2009-04-22
Brawl models and dream
Man, I burned myself out yesterday trying to figure out textures.
As a result, I haven't slept well since I started this, I keep having crazy dreams, and I was able to remember most of this one:
Dream was odd.
I remember going through a 1st/3rd person shooter where there were unusual zombies, not like normal zombies but something more similar to crazy possessed demon people. I remember one room I got too where I kept getting killed, it was a large room, with a small cubby on one side of it and had a stairway at the back, but to the side of that stairway was a small windowed room with metal walls, and a sealed metal door where the special weapon I was supposed to get was. The entire look ot the scene was dark and grimy, like RE5, but better looking. The lighting was sometimes dynamic, but the walls dripped with rust and grime, as if there had been blood but it dried. The smell was bad too, though I think was was psychologically imposed via my imagination. So I ran pas this guy in a plaid shirt with a large broken pipe, who was some crazy lumberjack like dude, and past this other kid with the typical NY punk ass look who had a knife, got into the room, grabbed this special weapon, but when I did, those two turned into these much larger bug mutant monsters, walking with reversed legs from their back and having 4 spindly ones in front with gnashing teeth and large red eyes. Not particularly scary or anything, but they were really fast and had a sort of mantis mentality, if they got close to you, their legs snapped out and yanked you into their jaws for a kill bite. Not much you could do there, but this special weapon was a wired plasma arc discharger, think of it like a gun that can shoot chainsaws. It was very effective, but you had only milliseconds to get off two EXACT shots to kill these bugs before you had to exactly run upstairs and barricade the door, which saved, then you turned around and blasted more human zombies and some ceiling bugs.
Of course, sinec it took me enough tries to get past that room (There were lots more before it, somewhat like a Super Half-life or something) the dream took a different turn, and I noticed I was in a restaurant. I ran through hit the first time though, noticing that there were odd pictures on the walls, but after I had ran through it, I found a pool of survivors, who, weirdly enough, were all the buddies I knew from Eka's, even some of them I had never met in real life. That stuck me as odd, and apparently there was some sort of crazy furry convention or something going on and they just happened to congregate there. I talked to them for a moment or two, being slightly blood splattered and worn from intense combat. Two of the wanted to help, but they had no weapons, so I had them go get some while the safe room music queued. I went back to the restaurant and it clicked; Apparently, the wall pictures were of a toon-Kami, which immediately raised my mental threat level to max, at least until I saw Ted sitting at a table with two other people I knew. I went over and sat down, and we had some sort of funny conversation about the restaurant, it kinda looked like a Captain D's which was equally ironic. The information I gathered there wasn't too useful, but it was greatly entertaining.
After a few drinks, I went back to the convention, and it was, of course, empty, they didn't make it. There were much stronger bug monsters, some that could fly, and I said 'aw fuck it' and saved the game and went back to the restaurant to get some food. Needless to say, in that particular establishment that's not exactly how it works, but goddamnit I tried.
I can't seem to remember too much of it, I've had long strings of dreams lately that involve me missing my good friends a lot, mostly goathouse members and lots and lots of drinking involved. I conclude that I must be severely depressed, and I can't blame me for that.
I guess you can't really be friends until you've seen the fires of hell as a team, eh?
Update on the format converter; Still trying to sort out textures, but guess what? Blender doesn't like the 394 material MetalGearRex model because it can only handle 16! So f***.
Here's a stupid screenshot with MetaRidely, King K. Rool, Mario, Luigi, Peach, and Link.
Sortof.
For those of you that care, I'm still getting the hang of the transforms down; They don't seem as bad as figuring out how to find which textures and which blending modes to use. Obviously it's a snap to manually assign textures, but this should do most of the job for us, right? I do seem to have the polygon data down perfectly, I am not trying to get any particular model, just reverse engineering their format so I can improve my own. It's bizzare, there is no good reason I can think of why this file needs to be this complex. You can do the same thing or better with a GRF/BRF setup, or hell, any other normal linear file. Honestly the only complex thing WOULD be the materials, and that's what I'm having trouble with...
Also as a side note, blender's bone system is SHIT, because you cannot have zero length bones or infinite length bones. Come to think of it, hardware only uses matrices, so what the hell DOES a bone have length for?!?! This is very very stupid, as the convention makes no sense for any real application. Obviously you can display bones as octohedrons in reverse child->parent mode. This is trivial to do and would eliminate this horrid 'length' idea. Also, why the fuck is bone space so bizzare? What ever happened to consistent in +X forward, +Y left, +Z up? I really miss that idea, since it's correct for the hardware and avoids any confusion if it's all the same.
I don't think I'll ever stop being amazed that the more you know about something, the more flaws you can find.
! Oh shit, an icecream truck! GTG save it!
As a result, I haven't slept well since I started this, I keep having crazy dreams, and I was able to remember most of this one:
Dream was odd.
I remember going through a 1st/3rd person shooter where there were unusual zombies, not like normal zombies but something more similar to crazy possessed demon people. I remember one room I got too where I kept getting killed, it was a large room, with a small cubby on one side of it and had a stairway at the back, but to the side of that stairway was a small windowed room with metal walls, and a sealed metal door where the special weapon I was supposed to get was. The entire look ot the scene was dark and grimy, like RE5, but better looking. The lighting was sometimes dynamic, but the walls dripped with rust and grime, as if there had been blood but it dried. The smell was bad too, though I think was was psychologically imposed via my imagination. So I ran pas this guy in a plaid shirt with a large broken pipe, who was some crazy lumberjack like dude, and past this other kid with the typical NY punk ass look who had a knife, got into the room, grabbed this special weapon, but when I did, those two turned into these much larger bug mutant monsters, walking with reversed legs from their back and having 4 spindly ones in front with gnashing teeth and large red eyes. Not particularly scary or anything, but they were really fast and had a sort of mantis mentality, if they got close to you, their legs snapped out and yanked you into their jaws for a kill bite. Not much you could do there, but this special weapon was a wired plasma arc discharger, think of it like a gun that can shoot chainsaws. It was very effective, but you had only milliseconds to get off two EXACT shots to kill these bugs before you had to exactly run upstairs and barricade the door, which saved, then you turned around and blasted more human zombies and some ceiling bugs.
Of course, sinec it took me enough tries to get past that room (There were lots more before it, somewhat like a Super Half-life or something) the dream took a different turn, and I noticed I was in a restaurant. I ran through hit the first time though, noticing that there were odd pictures on the walls, but after I had ran through it, I found a pool of survivors, who, weirdly enough, were all the buddies I knew from Eka's, even some of them I had never met in real life. That stuck me as odd, and apparently there was some sort of crazy furry convention or something going on and they just happened to congregate there. I talked to them for a moment or two, being slightly blood splattered and worn from intense combat. Two of the wanted to help, but they had no weapons, so I had them go get some while the safe room music queued. I went back to the restaurant and it clicked; Apparently, the wall pictures were of a toon-Kami, which immediately raised my mental threat level to max, at least until I saw Ted sitting at a table with two other people I knew. I went over and sat down, and we had some sort of funny conversation about the restaurant, it kinda looked like a Captain D's which was equally ironic. The information I gathered there wasn't too useful, but it was greatly entertaining.
After a few drinks, I went back to the convention, and it was, of course, empty, they didn't make it. There were much stronger bug monsters, some that could fly, and I said 'aw fuck it' and saved the game and went back to the restaurant to get some food. Needless to say, in that particular establishment that's not exactly how it works, but goddamnit I tried.
I can't seem to remember too much of it, I've had long strings of dreams lately that involve me missing my good friends a lot, mostly goathouse members and lots and lots of drinking involved. I conclude that I must be severely depressed, and I can't blame me for that.
I guess you can't really be friends until you've seen the fires of hell as a team, eh?
Update on the format converter; Still trying to sort out textures, but guess what? Blender doesn't like the 394 material MetalGearRex model because it can only handle 16! So f***.
Here's a stupid screenshot with MetaRidely, King K. Rool, Mario, Luigi, Peach, and Link.
Sortof.
For those of you that care, I'm still getting the hang of the transforms down; They don't seem as bad as figuring out how to find which textures and which blending modes to use. Obviously it's a snap to manually assign textures, but this should do most of the job for us, right? I do seem to have the polygon data down perfectly, I am not trying to get any particular model, just reverse engineering their format so I can improve my own. It's bizzare, there is no good reason I can think of why this file needs to be this complex. You can do the same thing or better with a GRF/BRF setup, or hell, any other normal linear file. Honestly the only complex thing WOULD be the materials, and that's what I'm having trouble with...
Also as a side note, blender's bone system is SHIT, because you cannot have zero length bones or infinite length bones. Come to think of it, hardware only uses matrices, so what the hell DOES a bone have length for?!?! This is very very stupid, as the convention makes no sense for any real application. Obviously you can display bones as octohedrons in reverse child->parent mode. This is trivial to do and would eliminate this horrid 'length' idea. Also, why the fuck is bone space so bizzare? What ever happened to consistent in +X forward, +Y left, +Z up? I really miss that idea, since it's correct for the hardware and avoids any confusion if it's all the same.
I don't think I'll ever stop being amazed that the more you know about something, the more flaws you can find.
! Oh shit, an icecream truck! GTG save it!
2009-04-19
Super Smash Bros Brawl model format
So I have been exploring Brawl.
I've learned a little more about constructing armatured models, this is primarily useful for my art team in assisting their understanding of how professional projects handle their game media. Using references is extremely informative when you create your own models, as you get to learn from others mistakes more quickly, and see new ways to make special joints and features.
I'm doing this out of pure academic interest, as I found out there is not much difference between this and the melee formats. I hacked both, but brawl models in general look better.
So here's the Ridley Trophy in Blender, definitely not something desirable to wake up to:
And yeah, I still have that awesome little plastic Ridley figurine that Kelly let me have. He's quite happy guarding my desk!
Peace!
-Z
I've learned a little more about constructing armatured models, this is primarily useful for my art team in assisting their understanding of how professional projects handle their game media. Using references is extremely informative when you create your own models, as you get to learn from others mistakes more quickly, and see new ways to make special joints and features.
I'm doing this out of pure academic interest, as I found out there is not much difference between this and the melee formats. I hacked both, but brawl models in general look better.
So here's the Ridley Trophy in Blender, definitely not something desirable to wake up to:
And yeah, I still have that awesome little plastic Ridley figurine that Kelly let me have. He's quite happy guarding my desk!
Peace!
-Z
2009-04-11
2009-04-06
Lucid Dream
Because I was woken at 4 am, I had a terrible nights sleep. I knew I was falling asleep, but I remained conscious into the dream world. What that meant was I had full cognitive control over my actions and parts of the dream, however, here's how it went:
I wanted to go home. I wanted to see my old house and look up at the stars and pretend this world and it's species weren't fucked. So I did. I was lying down in a sleeping bag, alone in the upstairs room, looking out at the sky. It was too dim, realistically dim so I turned up the brightness to see galaxies. It was very beautiful. However, a small girl appeared beside me, holding her knees with a stuffed animal, looking frightened. I asked her what was wrong, and she told me aliens. That almost got me up, but I stayed dreaming and continued to ask her what they were like. I used generic grey's descriptions, and then asked if they were like the Reconi, but, she got some crayons that were on the floor and drew me a picture of them and told me their name, but since I had to work I forgot the words, It was unusual and I'll remember it later, but it was something with a 'ou' sound and a 'g'. I kept asking her questions, but by doing so my mind destroyed her, and she melted into a skeleton because that's apparently what I would like to do to so many people... Either way, after that I turned off the dream and tried to sleep instead of control the dream, for like 5 minutes before the alarm went off.
So, I'm not sure what this was about, I usually don't have dreams about non-fuzzy aliens, but whatever these things were they were NOT our friends or allies. Kinda crinkly if I remember right.
I'll try again later sometime. Peace!
-Z
I wanted to go home. I wanted to see my old house and look up at the stars and pretend this world and it's species weren't fucked. So I did. I was lying down in a sleeping bag, alone in the upstairs room, looking out at the sky. It was too dim, realistically dim so I turned up the brightness to see galaxies. It was very beautiful. However, a small girl appeared beside me, holding her knees with a stuffed animal, looking frightened. I asked her what was wrong, and she told me aliens. That almost got me up, but I stayed dreaming and continued to ask her what they were like. I used generic grey's descriptions, and then asked if they were like the Reconi, but, she got some crayons that were on the floor and drew me a picture of them and told me their name, but since I had to work I forgot the words, It was unusual and I'll remember it later, but it was something with a 'ou' sound and a 'g'. I kept asking her questions, but by doing so my mind destroyed her, and she melted into a skeleton because that's apparently what I would like to do to so many people... Either way, after that I turned off the dream and tried to sleep instead of control the dream, for like 5 minutes before the alarm went off.
So, I'm not sure what this was about, I usually don't have dreams about non-fuzzy aliens, but whatever these things were they were NOT our friends or allies. Kinda crinkly if I remember right.
I'll try again later sometime. Peace!
-Z
Labels:
lucid dream
2009-04-02
Tangent space normal maps
Alright, this is some useful stuff. I didn't find very many useful articles online about this, except for Blender.
The basic idea is, if you want to use bumpmapping/shiny/normal mapping, you can do this either for static objects (objects that NEVER have their mesh change, like trees, terrain, walls...) or dynamic objects (animated characters). For static objects, you can use what is called 'object space normals', aka, a texture with normal data relative to the object baked in. For dynamic objects, you are forced to use 'tangent space normals' where tangent vectors are calculated for each vertex each frame in the shader.
This works, because just like matrix palette deformations, you multiply a vertex by a matrix to transform it, either locally or globally. In this case, we have each vertex with a vertex normal, and a tangent, which means we know each verticies local space. This allows us to initially calculate better lighting parameters per-vertex using a vertex shader. As you know, Normal cross tangent or binormal will ive you the other missing vector in the 3x3 rotation matrix.
Now that you have a vertex shader that generates the parameters needed (has to send them via texture coords or other fragment parameters in the shader...) you can write a fragment shader that does your lighting computations, and calculates the per-pixel normal, tangent, and binormal, which then samples the normal map texture for the normal value at that pixel, thus resulting in normal mapped surface.
although this is trivial to do with shader parameters (add an extra array with tangent vectors) the fragment shader is annoying, because per fragment, you must renormalize the interpolated normal and tangent per vertex before applying the transformation to determine the normal to use for lighting equations.
All this blah and hooplah I did using fragment and vertex program. It's pretty kickass, and very simple.
Here is a example showing a generic 'snake' normal map on a realtime deformable tube using hemispherical lighting:
And here is no normal map applied using open GL lighting
This is the normal map, generated from Blender via 'Bake Selected to Active' (select all your scales and bumps, then the cylinder object which has the UV map you want to bake to, and done!)
And here's some nitty gritty low level shader code:
...vertex shader...
# ...pass normal & binormal to fragment as texture coords in 0 and 1
MOV oTex0.zw, vNorm.xyxy; #tex0.zy = normal.xy
MOV oTex1.x, vNorm.zzzz; #tex1.x = normal.z, tex1.yzw = binormal.xyz,
MOV oTex1.yzw, vBin.xxyz; #
MOV oTex0.xy, vTex0;
#...
...fragment shader...
!!ARBfp1.0
# Setup
ATTRIB fTex0 = fragment.texcoord[0]; #tex and normal
ATTRIB fTex1 = fragment.texcoord[1]; #Normal + Binormal
PARAM EyeDir = state.matrix.mvp.row[2]; #Get mvp/eye direction
PARAM Light0Dir = state.light[0].position; #state.light[0].spot.direction
PARAM HemiParam = program.local[4]; #{ 0.5, 0.5, 8.0, 0.125 }#Hemi Light Constants (darkness, 1-darkness, hemi_power, hemi_scale)
PARAM FlipValues = program.local[3]; #Direction flipping values
PARAM ColorAmb = state.material.front.ambient;
PARAM ColorDif = state.material.front.diffuse;
PARAM ColorSpec = state.material.front.specular;
PARAM ColorEmit = state.material.front.emission;
PARAM ColorShininess = state.material.front.shininess;
PARAM K = {1, 0.5, 0, 2.0};
TEMP vNorm, vBin, vTang, temp1, temp2, colTex;
#---Get texture normal (tangent space normal)---
TEX temp1, fTex0, texture[0], 2D; #Sample texture (ext normals)
TEX colTex, fTex0, texture[1], 2D; #Sample texture as color... rgb = xyz, a = ?ColorShininess? would be cool.
MAD temp1, temp1, K.w, -K.x; #Convert texnormal to normal [-1,1] (works)
DP3 temp1.w, temp1, temp1; #Normalize texnormal
RSQ temp1.w, temp1.w;
MUL temp1, temp1, temp1.w;
#---Calculate basis for tangent stuff (realtime, for deforming models. Static models can save the vectors and avoid this)---
MOV vNorm.xy, fTex0.zwxy; #Load in normal
MOV vNorm.z, fTex1.zwxy;
DP3 vNorm.w, vNorm, vNorm; #Normalize normal (correct it)
RSQ vNorm.w, vNorm.w;
MUL vNorm, vNorm, vNorm.w;
MOV vBin.xyz, fTex1.yzwx; #Load in binormal
DP3 vBin.w, vBin, vBin; #Normalize binormal (correct it)
RSQ vBin.w, vBin.w;
MUL vBin, vBin, vBin.w;
MUL vNorm, vNorm, FlipValues;
MUL vBin, vBin, FlipValues;
XPD vTang, vBin, vNorm; #Calculate tangent (pseudo-normalized)
#Make texture normal Global: ??? z/blue = out, y/up = down, x/left = right
MUL vNorm, temp1.z, vNorm;
MAD vNorm, temp1.x, vBin, vNorm;
MAD vNorm, temp1.y, vTang, vNorm;
#---Start of full hemi shading:---
#Req:
DP3 temp2, EyeDir, vNorm; #Eye dot normal = specref vector
MUL temp2, vNorm, temp2.w; #Scale normal by dp and 2.0
MUL temp2, temp2, K.w;
SUB temp2, EyeDir, temp2; #Sub to get specular normal
DP3 temp2.y, temp2, Light0Dir; #Specular dot produxt (specular normal dot light)
DP3 temp2.x, vNorm, Light0Dir; #Diffuse dot product (normal dot light)
#---Hemispherical lighting---
MAD temp2.x, temp2.x, HemiParam.x, HemiParam.y; #t = t*0.5 + 0.5 (hemispherical lighting = cool)
#---Scale the light to be the hemisphere---
POW temp2.x, HemiParam.z, temp2.x; #t = pow(t, hard), flip this to halo (A^B)
MUL temp2.x, temp2.x, HemiParam.w; #t *= spec
#---Calculate final hemi diffuse color---
LRP temp1, temp2.x, colTex, ColorAmb; #Interpolate color to ambient color (mult op)
#---Specular highlight---
MOV temp2.w, ColorShininess.x; #Load specular value into LIT vector... (0..127)
LIT temp2, temp2; #compute diffuse & specular coefficients
#---Calculate final diffuse + specular color---
LRP temp1, temp2.z, ColorSpec, temp1; #Interpolate diffuse to specular color (white = K.xxxx) based on specular component
#---Emissive color addition---
ADD temp1, temp1, ColorEmit; #Add in emission color
MOV result.color.xyz, temp1;
MOV result.color.w, fragment.color.w; #Load final color with initial color alpha
#---End of full hemi shading:---
END
Well, that's all. AS you can see, there is yet another 'art' component to matching good normal maps to good models, but hell, if the quality jumps this much using such a simple configuration, it'll be cakewalk to make next-gen looking characters, well, at least unrealistic ones.
Peace ya'll.
-Z
The basic idea is, if you want to use bumpmapping/shiny/normal mapping, you can do this either for static objects (objects that NEVER have their mesh change, like trees, terrain, walls...) or dynamic objects (animated characters). For static objects, you can use what is called 'object space normals', aka, a texture with normal data relative to the object baked in. For dynamic objects, you are forced to use 'tangent space normals' where tangent vectors are calculated for each vertex each frame in the shader.
This works, because just like matrix palette deformations, you multiply a vertex by a matrix to transform it, either locally or globally. In this case, we have each vertex with a vertex normal, and a tangent, which means we know each verticies local space. This allows us to initially calculate better lighting parameters per-vertex using a vertex shader. As you know, Normal cross tangent or binormal will ive you the other missing vector in the 3x3 rotation matrix.
Now that you have a vertex shader that generates the parameters needed (has to send them via texture coords or other fragment parameters in the shader...) you can write a fragment shader that does your lighting computations, and calculates the per-pixel normal, tangent, and binormal, which then samples the normal map texture for the normal value at that pixel, thus resulting in normal mapped surface.
although this is trivial to do with shader parameters (add an extra array with tangent vectors) the fragment shader is annoying, because per fragment, you must renormalize the interpolated normal and tangent per vertex before applying the transformation to determine the normal to use for lighting equations.
All this blah and hooplah I did using fragment and vertex program. It's pretty kickass, and very simple.
Here is a example showing a generic 'snake' normal map on a realtime deformable tube using hemispherical lighting:
And here is no normal map applied using open GL lighting
This is the normal map, generated from Blender via 'Bake Selected to Active' (select all your scales and bumps, then the cylinder object which has the UV map you want to bake to, and done!)
And here's some nitty gritty low level shader code:
...vertex shader...
# ...pass normal & binormal to fragment as texture coords in 0 and 1
MOV oTex0.zw, vNorm.xyxy; #tex0.zy = normal.xy
MOV oTex1.x, vNorm.zzzz; #tex1.x = normal.z, tex1.yzw = binormal.xyz,
MOV oTex1.yzw, vBin.xxyz; #
MOV oTex0.xy, vTex0;
#...
...fragment shader...
!!ARBfp1.0
# Setup
ATTRIB fTex0 = fragment.texcoord[0]; #tex and normal
ATTRIB fTex1 = fragment.texcoord[1]; #Normal + Binormal
PARAM EyeDir = state.matrix.mvp.row[2]; #Get mvp/eye direction
PARAM Light0Dir = state.light[0].position; #state.light[0].spot.direction
PARAM HemiParam = program.local[4]; #{ 0.5, 0.5, 8.0, 0.125 }#Hemi Light Constants (darkness, 1-darkness, hemi_power, hemi_scale)
PARAM FlipValues = program.local[3]; #Direction flipping values
PARAM ColorAmb = state.material.front.ambient;
PARAM ColorDif = state.material.front.diffuse;
PARAM ColorSpec = state.material.front.specular;
PARAM ColorEmit = state.material.front.emission;
PARAM ColorShininess = state.material.front.shininess;
PARAM K = {1, 0.5, 0, 2.0};
TEMP vNorm, vBin, vTang, temp1, temp2, colTex;
#---Get texture normal (tangent space normal)---
TEX temp1, fTex0, texture[0], 2D; #Sample texture (ext normals)
TEX colTex, fTex0, texture[1], 2D; #Sample texture as color... rgb = xyz, a = ?ColorShininess? would be cool.
MAD temp1, temp1, K.w, -K.x; #Convert texnormal to normal [-1,1] (works)
DP3 temp1.w, temp1, temp1; #Normalize texnormal
RSQ temp1.w, temp1.w;
MUL temp1, temp1, temp1.w;
#---Calculate basis for tangent stuff (realtime, for deforming models. Static models can save the vectors and avoid this)---
MOV vNorm.xy, fTex0.zwxy; #Load in normal
MOV vNorm.z, fTex1.zwxy;
DP3 vNorm.w, vNorm, vNorm; #Normalize normal (correct it)
RSQ vNorm.w, vNorm.w;
MUL vNorm, vNorm, vNorm.w;
MOV vBin.xyz, fTex1.yzwx; #Load in binormal
DP3 vBin.w, vBin, vBin; #Normalize binormal (correct it)
RSQ vBin.w, vBin.w;
MUL vBin, vBin, vBin.w;
MUL vNorm, vNorm, FlipValues;
MUL vBin, vBin, FlipValues;
XPD vTang, vBin, vNorm; #Calculate tangent (pseudo-normalized)
#Make texture normal Global: ??? z/blue = out, y/up = down, x/left = right
MUL vNorm, temp1.z, vNorm;
MAD vNorm, temp1.x, vBin, vNorm;
MAD vNorm, temp1.y, vTang, vNorm;
#---Start of full hemi shading:---
#Req:
DP3 temp2, EyeDir, vNorm; #Eye dot normal = specref vector
MUL temp2, vNorm, temp2.w; #Scale normal by dp and 2.0
MUL temp2, temp2, K.w;
SUB temp2, EyeDir, temp2; #Sub to get specular normal
DP3 temp2.y, temp2, Light0Dir; #Specular dot produxt (specular normal dot light)
DP3 temp2.x, vNorm, Light0Dir; #Diffuse dot product (normal dot light)
#---Hemispherical lighting---
MAD temp2.x, temp2.x, HemiParam.x, HemiParam.y; #t = t*0.5 + 0.5 (hemispherical lighting = cool)
#---Scale the light to be the hemisphere---
POW temp2.x, HemiParam.z, temp2.x; #t = pow(t, hard), flip this to halo (A^B)
MUL temp2.x, temp2.x, HemiParam.w; #t *= spec
#---Calculate final hemi diffuse color---
LRP temp1, temp2.x, colTex, ColorAmb; #Interpolate color to ambient color (mult op)
#---Specular highlight---
MOV temp2.w, ColorShininess.x; #Load specular value into LIT vector... (0..127)
LIT temp2, temp2; #compute diffuse & specular coefficients
#---Calculate final diffuse + specular color---
LRP temp1, temp2.z, ColorSpec, temp1; #Interpolate diffuse to specular color (white = K.xxxx) based on specular component
#---Emissive color addition---
ADD temp1, temp1, ColorEmit; #Add in emission color
MOV result.color.xyz, temp1;
MOV result.color.w, fragment.color.w; #Load final color with initial color alpha
#---End of full hemi shading:---
END
Well, that's all. AS you can see, there is yet another 'art' component to matching good normal maps to good models, but hell, if the quality jumps this much using such a simple configuration, it'll be cakewalk to make next-gen looking characters, well, at least unrealistic ones.
Peace ya'll.
-Z
Subscribe to:
Posts (Atom)