Dissapearing projectiles (DTS)
by James Laker (BurNinG) · in Torque Game Engine Advanced · 07/03/2007 (2:36 am) · 11 replies
For some reason my projectiles doesnt show up when I'm not close to "0 0 0". When I'm talking close I mean talking about 2000-3000m. The particles still show up.
Has anyone ran into this bug?
Has anyone ran into this bug?
#2
07/03/2007 (4:07 am)
What I mean is that the Projectile dissapears when 2000-3000m from "0 0 0".... I'm flying right behind it so it is in my view.
#3
07/05/2007 (8:03 am)
We have a similar problem with dis-appearing projectiles, but its intermittent. It started around the 1.1 code drop. The problem is however intermittant, some maps do it and others dont. Larger maps seem to be more prone than smaller ones which is probably because we are further away from the origin (0,0,0)
#4
One time I was working on a fishing game in which the fishermen wore life-vests which were separate geometry. We had very large maps, and when boating too far away from 0,0,0 the depth sorting started to break down and the render could no longer sort the vest correctly. We ended up switching to a system that would slide the world around now and then so that the player was always within a safe distance of the origin.
This also came up when I was rigging models for a rendered DVD movie (not realtime). For this project they built very large worlds off a common coordinate system. We were using Maya for this and we found that in scenes that took place for from the origin, Maya's weighted mesh skinning system would start to break down and introduce terrible distortions in models that were fine near 0,0,0. It was quite difficult to explain to the project's non-technical producers that the problem came from their choice to construct scenes far away from 0,0,0 and not from problems in our models.
If you're lucky, there is a different reason for the disappearing projectiles. If it is a numerical precision problem, the only real fix is to devise a way to stay within a safe distance of 0,0,0.
07/05/2007 (8:27 am)
It would take some experimentation to determine if you are far enough away for this to be the issue, but it's a basic fact in computer science that floating point numbers (at least the standard representations) loose precision the farther the values are away from zero. You can work in almost any system of 3D graphics and you'll find at some point, as you move further and further away from zero, the mathematics will start to break down in various sub-systems. One time I was working on a fishing game in which the fishermen wore life-vests which were separate geometry. We had very large maps, and when boating too far away from 0,0,0 the depth sorting started to break down and the render could no longer sort the vest correctly. We ended up switching to a system that would slide the world around now and then so that the player was always within a safe distance of the origin.
This also came up when I was rigging models for a rendered DVD movie (not realtime). For this project they built very large worlds off a common coordinate system. We were using Maya for this and we found that in scenes that took place for from the origin, Maya's weighted mesh skinning system would start to break down and introduce terrible distortions in models that were fine near 0,0,0. It was quite difficult to explain to the project's non-technical producers that the problem came from their choice to construct scenes far away from 0,0,0 and not from problems in our models.
If you're lucky, there is a different reason for the disappearing projectiles. If it is a numerical precision problem, the only real fix is to devise a way to stay within a safe distance of 0,0,0.
#5
Even though I havea space game, the worlds are sinlge not-that-big maps... So I dont see the problem you're talking about Jeff.
I'll take some screenshots tonight.
07/05/2007 (8:44 am)
I'm still working on TGEA 1.0. I'm not sure if we're talking about the same problem though. Mine always shows up in a certain area of the map.... And theres a HARD dissapearance. When Im outside this "area" my missles doesn't show until they reach the area... And vica versa..Even though I havea space game, the worlds are sinlge not-that-big maps... So I dont see the problem you're talking about Jeff.
I'll take some screenshots tonight.
#6
07/05/2007 (9:06 am)
With a hard disappearance you could be right. I just have this "red alert" alarm that goes off whenever I hear about strange behavior that occurs far away from 0,0,0.
#7
07/05/2007 (10:33 am)
This issue has been resolved in our internal version. The problem is with the selectCurrentDetail TS function. If I remember right, the Projectile render is generating an object matrix (for Render Instance) but the detail level function wants a world matrix.
#8
Thats great news.
Any chance of posting a fix, so I dont have to wait till TGEA 1.0.3?
07/05/2007 (11:00 am)
Hey Robert... Thats great news.
Any chance of posting a fix, so I dont have to wait till TGEA 1.0.3?
#9
07/09/2007 (9:34 am)
Too much changed to just post a fix here. You can temporarily "fix" it by just manually setting the detail level for now, mShapeInstance->setCurrentDetail(0)
#10
I'm asking because I'm about to make a lot of changes to my TGEA v1.0.1 and I don't know if I should hold off and wait for TGEA v1.0.2 or just apply all the fixings to TGEA v1.0.1. I guess it depends if it's about a week around the corner or not.
Any help on this is greatly appreciated. Thanks.
07/09/2007 (12:32 pm)
Robert, I know you're probably not supposed to give us any possible release dates for TGEA v1.0.2, but we promise we won't tell! We'll keep the secret in this thread. Any news on a possible release? As in, days? weeks? months?I'm asking because I'm about to make a lot of changes to my TGEA v1.0.1 and I don't know if I should hold off and wait for TGEA v1.0.2 or just apply all the fixings to TGEA v1.0.1. I guess it depends if it's about a week around the corner or not.
Any help on this is greatly appreciated. Thanks.
#11
Anyway, guess a clean build wuold be nice.
07/09/2007 (12:39 pm)
I have LOTS of changes. Moving to a new build is going to be challenging for me. Anyway, guess a clean build wuold be nice.
Torque Owner Stefan Lundmark
I've had numerous of times where projectiles have been close to 0 0 0 (or even directly at it, as that's usually when we spawned them to test different effects) and they do not disappear. Have you tried with the standard crossbow bolt? Could be that the shape is getting culled because of LOS - since the particle emitter is there and all.