AIPlayer Not Showing up in Interior
by PrvtHudson · in Torque Game Engine · 09/16/2006 (7:12 pm) · 17 replies
Hey
I had an AIPlayer spawned in a Cube (dif). The Cube had leaks that let in outside sunlight, so I built a new cube with no leaks and put my AIPlayer inside. I also put in a volume light.
The AIPlayer was invisible. If I move the AI so his bounding box touches a portal, the dts shows up.
I have another .dts in the room (not a player ) that IS visible.
I added an omni light to the dts. Lots of horrid looking light, but the dts is still invisible.
I added a sgUniversalStaticLight and the dts does not show up. I checked the "DTS objects" box.
My room is lit 100% with TLK lights and that's the way I would like to keep it. If I remove them, the room is black.
My Player avitar shows up fine. If I remove the portal to leak in some sunlight, the AIPlayer shows up fine.
If I add the AIplayer dts with the editor, it shows up ok.
If I change the .dts to Kork again ... I get the same behavior.
Any idea what I am doing wrong ?
Let me know if I can post anything that will help you.
I had an AIPlayer spawned in a Cube (dif). The Cube had leaks that let in outside sunlight, so I built a new cube with no leaks and put my AIPlayer inside. I also put in a volume light.
The AIPlayer was invisible. If I move the AI so his bounding box touches a portal, the dts shows up.
I have another .dts in the room (not a player ) that IS visible.
I added an omni light to the dts. Lots of horrid looking light, but the dts is still invisible.
I added a sgUniversalStaticLight and the dts does not show up. I checked the "DTS objects" box.
My room is lit 100% with TLK lights and that's the way I would like to keep it. If I remove them, the room is black.
My Player avitar shows up fine. If I remove the portal to leak in some sunlight, the AIPlayer shows up fine.
If I add the AIplayer dts with the editor, it shows up ok.
If I change the .dts to Kork again ... I get the same behavior.
Any idea what I am doing wrong ?
Let me know if I can post anything that will help you.
About the author
#2
I am still very green with the engine, but from what you have said, I think I should be debugging the SceneGraph ( scopeScene ) and learning what it does. Any tips would be appreciated.
09/17/2006 (11:20 am)
Thank you very much for the reply. I am still very green with the engine, but from what you have said, I think I should be debugging the SceneGraph ( scopeScene ) and learning what it does. Any tips would be appreciated.
#3
09/17/2006 (12:17 pm)
Can you post some screenshots of what you're doing? I'm having trouble following it from your text description.
#4
Here is a picture of the invisible AIPLayer

Here is a pic of of the AIPlayer lighting up when he touches the portal

Here is the light source. The pne in the pictures is a volume light and I read somewhere that they don't actually light the dts.

Here is the portal ... just because it's kinda fun posting pictures ...
09/17/2006 (12:49 pm)
Thanx Ben. Here is a picture of the invisible AIPLayer

Here is a pic of of the AIPlayer lighting up when he touches the portal

Here is the light source. The pne in the pictures is a volume light and I read somewhere that they don't actually light the dts.

Here is the portal ... just because it's kinda fun posting pictures ...
#5
09/17/2006 (12:56 pm)
Is the camera actually inside the portalized zone?
#6
09/17/2006 (1:05 pm)
Yes, the camera ( player ) is inside the interior. I have not expilicitly declared any zones.
#7
I'd say if you want a quick fix, ditch the portal - otherwise you're gonna have to step through the zoning logic that the AIPlayer calls and see where it's going wrong; what zones it thinks it is in and why it's not rendering.
09/17/2006 (1:09 pm)
You surely did - that's what the portal does. :)I'd say if you want a quick fix, ditch the portal - otherwise you're gonna have to step through the zoning logic that the AIPlayer calls and see where it's going wrong; what zones it thinks it is in and why it's not rendering.
#8
09/17/2006 (1:19 pm)
Thanx allot Ben. I am going to step through the logic. I needed an excuse to get up close and friendly with the engine anways! Any tips are appreciated. I'll be posting proudly when I figure it out.
#9
09/17/2006 (2:11 pm)
I don't know what is wrong, but, THEM ARE SOME COOL LOOKIN' 3D MODELS :)
#10
09/17/2006 (3:10 pm)
Ahaha ... and I wish MINE looked that good. They are from the Soldier pack. Mine still look rather Picassoesque.
#11
turns out the problem was my dif was sealed to the outside world.
I ended up cutting a hole in some obscure place so things would spawn.
09/17/2006 (4:54 pm)
I had the same behavior using TGE. Invisible NPC. Collisions worked, but I could not see it.turns out the problem was my dif was sealed to the outside world.
I ended up cutting a hole in some obscure place so things would spawn.
#12
That shouldn't be a problem, though -- rather, sealed DIF files is a requirement to make use of the portaling system!
It seems as if there's some kind of problem when you attempt to spawn NPCs inside a DIF portaled zone. I can see a few possible causes:
1) Perhaps the NPC gets created in the "outside" zone, so it's not actually a part of the zone it's in, until it hits the portal.
2) Perhaps the observer camera is kept in the "outside" zone, and doesn't actually move inside the zone when you're attempting to view the NPC.
3) Perhaps the rendering code is confused until such an entity changes zones, or reaches the outside zone.
Tracing through the code in the C++ debugger ought to show you which one is the case.
09/17/2006 (7:07 pm)
Quote:turns out the problem was my dif was sealed to the outside world.
That shouldn't be a problem, though -- rather, sealed DIF files is a requirement to make use of the portaling system!
It seems as if there's some kind of problem when you attempt to spawn NPCs inside a DIF portaled zone. I can see a few possible causes:
1) Perhaps the NPC gets created in the "outside" zone, so it's not actually a part of the zone it's in, until it hits the portal.
2) Perhaps the observer camera is kept in the "outside" zone, and doesn't actually move inside the zone when you're attempting to view the NPC.
3) Perhaps the rendering code is confused until such an entity changes zones, or reaches the outside zone.
Tracing through the code in the C++ debugger ought to show you which one is the case.
#13
2) This could be, but it seems that the camera is properly placed - I'm assuming the character doesn't appear if you get the camera very very close to it.
3) Seems unlikely.
There are a variety of interior debug modes including several for visualizing zones. You might try using one of those to make sure that the zoning is at least set up properly.
09/17/2006 (9:35 pm)
1) Objects rezone every time they move, so if it's walking about then that shoudn't be a problem.2) This could be, but it seems that the camera is properly placed - I'm assuming the character doesn't appear if you get the camera very very close to it.
3) Seems unlikely.
There are a variety of interior debug modes including several for visualizing zones. You might try using one of those to make sure that the zoning is at least set up properly.
#14
2. The camera is in, the only, portalized zone.
3. I am leaning towards some sort of problem with the NPC object box being wrong or the interior's box being wrong. It fails when checking if he is in the interior's zone. Too tired to keep going tonight.
... Could you possibly point me at one of those debug modes?
thanx all.
09/17/2006 (10:03 pm)
1. This NPC just stands there ( a guard ). I can drag him out the portal or partially through a wall and he appears. I have seen him get "rezoned" in the sceneGraph.cc when he touches the outside zone. 2. The camera is in, the only, portalized zone.
3. I am leaning towards some sort of problem with the NPC object box being wrong or the interior's box being wrong. It fails when checking if he is in the interior's zone. Too tired to keep going tonight.
Quote:There are a variety of interior debug modes including several for visualizing zones. You might try using one of those to make sure that the zoning is at least set up properly.
... Could you possibly point me at one of those debug modes?
thanx all.
#15
09/18/2006 (1:11 am)
I believe hitting f9 in a debud build cycles through 'em.
#16
It looks like my interior's scopingState is being set wrong in interiorInstance.cc
My zones and sceneManagers seem ok. My NPC is in the correct zone. The zone just gets scoped out. There is allot more to figure out beyond this member, however, this hack got my up and running for now.
Thanx for pointing me in the right direction!
bool InteriorInstance::scopeObject(const Point3F& rootPosition,
const F32 /*rootDistance*/,
bool* zoneScopeState)
....
// Copy pInteriorScopingState to zoneScopeState
for (S32 i = 1; i < pInterior->mZones.size(); i++)
zoneScopeState[i + mZoneRangeStart - 1] = continueOut; // pInteriorScopingState[i]; <--- RGFIXSEP19
return continueOut;
09/19/2006 (8:22 pm)
Now there is a wild introduction to the engine ! It looks like my interior's scopingState is being set wrong in interiorInstance.cc
My zones and sceneManagers seem ok. My NPC is in the correct zone. The zone just gets scoped out. There is allot more to figure out beyond this member, however, this hack got my up and running for now.
Thanx for pointing me in the right direction!
bool InteriorInstance::scopeObject(const Point3F& rootPosition,
const F32 /*rootDistance*/,
bool* zoneScopeState)
....
// Copy pInteriorScopingState to zoneScopeState
for (S32 i = 1; i < pInterior->mZones.size(); i++)
zoneScopeState[i + mZoneRangeStart - 1] = continueOut; // pInteriorScopingState[i]; <--- RGFIXSEP19
return continueOut;
#17
09/19/2006 (9:14 pm)
That's deeply weird. I'd love to hear more about this bug if you find more - that's code that I don't think anyone here at GG has had to touch in literally years.
Torque Owner J "hplus" W