Okay, another day, another question from me.
This one's a nit more nebulous, and I'm happy to just walk away from it if everyone draws a blank. But here's the deal:
I wa experimenting with ways to make shadows, and I decided to try a method where the a second camera hovered above the main camera, pointing down towards it. The idea being, this second camera would take a snapshot of everything around the main camera. While it did so, the terrain and the plane for the sea would be hidden, lights dropped to nothing and the background made plain white. This bird's-eye two-tone image of the area around the camera would then be copied onto a texture layer of the terrain. This texture layer would basically involved a small texture that moved along the terrain via UV co-ordinates calculated from the position of the main camera.
So far, so complicated.
Thing is, it almost worked. I expected to be able to figure out the oddness that left me with a shadow that was always too big and always ahead of the player's ship. No, that part didn't bother me. What did bother me was that when it came time to hide the terrain and the sea, the HideEntity command would not work. Or rather, it worked badly. I'll try and explain the effects of hiding these two entities:
1) Using HideEntity sea: Just to make sure the command was being read, I tried deliberately leaving it hidden. The result was that the sea was still there, but the two scrolling textures on it were stationary. When I used HideEntity on the terrain, it wasn't hidden.
2) Using Rotateentity sea,180,0,0: This is where it gets wierd. In a fit of desperation, I tried just turning the plane over 180 degrees. Since it isn't double sided, it should appear invisible from the top. Same effect as HideEntity. Then I tried Rotating the sea 90 degrees. And this was really wierd. The "frozen" sea plane was still visible, but there was a second sea plane that was turned 90 degrees. It had the animated scrolling texture layers on it too, but it was missing the base layer, which was blue. So it was basically a sea plane containing most of my sea effect, on it's side, and a frozen replica sitting on the original spot. Here's a screenie to illustrate.
[img]http://www.hailofbullets.co.uk/dirty/plane-problem.jpg[/img]
I tried the same thing without the layers of texture, just a simple blue one on the water, and the above screenshot was similar, except the sidewayes water was completely black. Those two planes are definitely the same plane somehow being drawn twice, since taking the layers off the original one affected both.
Now, I appreciate this is hard to follow, and I know you might well be thinking "his game's just buggy" and that's I've somehow got two planes for my sea and don't realise it. I'm convinced I'm doing things right, and that something else is afoot here. But the reason I've made this post is in case someone else recognises these odd symptoms. Maybe it's a well-known fact that Blitz has trouble hiding/rotating planes and terrains. Maybe I've forgotten an obvious command. Either way, if this is ringing bells with anyone, please do try and save my sanity and let me know.
This one's a nit more nebulous, and I'm happy to just walk away from it if everyone draws a blank. But here's the deal:
I wa experimenting with ways to make shadows, and I decided to try a method where the a second camera hovered above the main camera, pointing down towards it. The idea being, this second camera would take a snapshot of everything around the main camera. While it did so, the terrain and the plane for the sea would be hidden, lights dropped to nothing and the background made plain white. This bird's-eye two-tone image of the area around the camera would then be copied onto a texture layer of the terrain. This texture layer would basically involved a small texture that moved along the terrain via UV co-ordinates calculated from the position of the main camera.
So far, so complicated.
Thing is, it almost worked. I expected to be able to figure out the oddness that left me with a shadow that was always too big and always ahead of the player's ship. No, that part didn't bother me. What did bother me was that when it came time to hide the terrain and the sea, the HideEntity command would not work. Or rather, it worked badly. I'll try and explain the effects of hiding these two entities:
1) Using HideEntity sea: Just to make sure the command was being read, I tried deliberately leaving it hidden. The result was that the sea was still there, but the two scrolling textures on it were stationary. When I used HideEntity on the terrain, it wasn't hidden.
2) Using Rotateentity sea,180,0,0: This is where it gets wierd. In a fit of desperation, I tried just turning the plane over 180 degrees. Since it isn't double sided, it should appear invisible from the top. Same effect as HideEntity. Then I tried Rotating the sea 90 degrees. And this was really wierd. The "frozen" sea plane was still visible, but there was a second sea plane that was turned 90 degrees. It had the animated scrolling texture layers on it too, but it was missing the base layer, which was blue. So it was basically a sea plane containing most of my sea effect, on it's side, and a frozen replica sitting on the original spot. Here's a screenie to illustrate.
[img]http://www.hailofbullets.co.uk/dirty/plane-problem.jpg[/img]
I tried the same thing without the layers of texture, just a simple blue one on the water, and the above screenshot was similar, except the sidewayes water was completely black. Those two planes are definitely the same plane somehow being drawn twice, since taking the layers off the original one affected both.
Now, I appreciate this is hard to follow, and I know you might well be thinking "his game's just buggy" and that's I've somehow got two planes for my sea and don't realise it. I'm convinced I'm doing things right, and that something else is afoot here. But the reason I've made this post is in case someone else recognises these odd symptoms. Maybe it's a well-known fact that Blitz has trouble hiding/rotating planes and terrains. Maybe I've forgotten an obvious command. Either way, if this is ringing bells with anyone, please do try and save my sanity and let me know.