My spaceships are falling apart!!!!

Blitz3D Forums/Blitz3D Programming/My spaceships are falling apart!!!!

Farflame(Posted 2003) [#1]
Odd problem I've just discovered. I have some really nice 3d models of spaceships, about 400-500 polygons each (I think) and I got them moving about in my space game, but they've started falling apart! For example, if they have two sets of wings (like an xwing), the top wing seems to go faster than the bottom wing and the ship loses it's shape. If I 'catch up' with the ship it reassembles itself - in other words, it hasn't actually fallen apart, it just looks like it has. I made a little program to check the models and they're fine, so I think it must be something to do with the lighting in my game or something. Could it be because my sun (the only lightsource) is set at a really long distance? It's not just a single wing, all parts of the ship seem to shift around, it's as though all the bolts keep falling off!


Farflame(Posted 2003) [#2]
Looking further at this, it reminds me very much of the 'popping' affect you see with 3d terrains. The model sort of changes shape, but as you get closer to it, it reassembles in the same way that terrains distort at a distance. What exactly causes popping and what's the solution? As I said above, I wrote another mini-program to get my ships to fly around the camera and they're absolutely fine, so something I'm doing with my camera and/or lights in my main program is obviously causing a problem.


_PJ_(Posted 2003) [#3]
Are your ships made out of separate parts parented together?
Perhaps the hierarchy may be responsible.

Also, not the sun being far away, but having a large camera range, could cause distortion in objects very close together.


Farflame(Posted 2003) [#4]
No, the ships are fine and they have no problem in other programs so it's something my main program is doing. It's probably the large camera range or something to do with the scaling. I'll experiment and see if I can work it out.


Farflame(Posted 2003) [#5]
It turns out it was because I was scaling the ships down, to make them small compared to the planets. I'd scaled them to 0.1 their original size and obviously Blitz didn't like it. So I'll just have to scale up the planets by 10 instead :)


_PJ_(Posted 2003) [#6]
Hope it works, although the scale is then still the same ratio.

i.e. 1/100 is the same ratio as 0.1/10


Farflame(Posted 2003) [#7]
Yep, working fine now. My planets are now massive but that's good, because they should be, and Blitz seems to have no problem with displaying a vast sphere at great range :)


LostCargo(Posted 2003) [#8]
ahh... farflame thanks for sharing the problem. I think i would have run into the same thing with some of my games too. Ill have to keep an eye on how i scale things. Ive been loading my meshes with a scale factor and disregarding the ratio.


jfk EO-11110(Posted 2003) [#9]
When you see sawtheeth then it's scaled too small. These are rounding Errors trough Bitrange Accuracy Limits (especially in 16 Bit Mode).