Page 1 of 1

The "arrowhead" in TestScene and other levels

Posted: Sat Feb 12, 2011 4:51 am
by machf
Do you want to get rid of that "paper-airplane"-shaped object that is visible in TestScene, Minilev and some other levels? Easy! Just add a directional light to your level, and... voilá! It's gone!
Why? Well, because that thing is actually the default directional light for a level, which Trespasser automatically adds when it loads a level and can't find one in it. That's also the reason why you can't find it in TresEd to get rid of it, it's simply because it isn't actually there!
So... now you know.

Re: The "arrowhead" in TestScene and other levels

Posted: Sat Feb 12, 2011 4:08 pm
by Nick3069
Finally! An explanation as to what the paper airplane is!
How did you figure it out?

Re: The "arrowhead" in TestScene and other levels

Posted: Sat Feb 12, 2011 4:37 pm
by machf
I had noticed in GUIapp that when you rotate it, the shadows on the ground shifted. Then I decided to import another light in order to be able to change the direction of the shadows in TresEd, and noticed it had vanished in-game. In GUIapp, you can find out its name (PRS-RPA-Con), which hapens to be a string in the Trespasser executable. And since when you first load GUIapp without any level it's already there, it's easy to make the connection...

Re: The "arrowhead" in TestScene and other levels

Posted: Sun Feb 13, 2011 1:14 am
by RexHunter99
machf wrote:I had noticed in GUIapp that when you rotate it, the shadows on the ground shifted. Then I decided to import another light in order to be able to change the direction of the shadows in TresEd, and noticed it had vanished in-game. In GUIapp, you can find out its name (PRS-RPA-Con), which hapens to be a string in the Trespasser executable. And since when you first load GUIapp without any level it's already there, it's easy to make the connection...
I figured that out a long time ago when we were fiddling with the lights and bumpmapping in GUIApp. However IIRC we could never get rid of the default one even when a standard light primitive was imported, the default light remained in Minilev.

Re: The "arrowhead" in TestScene and other levels

Posted: Sun Feb 13, 2011 3:21 am
by machf
Are you sure? Because when I import a directional light into Minilev, the "paper airplane" disappears... I just tried... had done it with the TestScene and some other levels before too...

What I notice is that when you load the level into GUIapp, it's still there, but once you hit F8, it vanishes. Resetting the level at that moment won't bring it back, either. And in-game, it doesn't show up anymore.

Re: The "arrowhead" in TestScene and other levels

Posted: Sun Feb 13, 2011 4:40 am
by RexHunter99
machf wrote:Are you sure? Because when I import a directional light into Minilev, the "paper airplane" disappears... I just tried... had done it with the TestScene and some other levels before too...

What I notice is that when you load the level into GUIapp, it's still there, but once you hit F8, it vanishes. Resetting the level at that moment won't bring it back, either. And in-game, it doesn't show up anymore.
Hmm weird, I definitely remember it not leaving the scene in-game. Maybe I forgot to save it? XD

Re: The "arrowhead" in TestScene and other levels

Posted: Sun Feb 13, 2011 6:42 am
by enigma
I thought you solved this long ago? I remember some discussion about it at least a year or a few months back, possibly before guiapp. :D

Re: The "arrowhead" in TestScene and other levels

Posted: Sun Feb 13, 2011 12:41 pm
by hppav
You can import lights? I would assume they don't work like they do in 3ds Max due to the fact the engine only renders one light (the sun) hence why the lights in ED and the God Beam in TestScene and the Alpha screens all are just objects scripted to render that way. Would then the direction of the directional light be the direction that the sunlight takes, like how the direction of the airplane affects the direction of the skylight? I never tried importing a light because I believe Remdul or Rebel back in '02 said that the engine wouldn't render them as lights.

Re: The "arrowhead" in TestScene and other levels

Posted: Sun Feb 13, 2011 5:26 pm
by LtSten
...I suppose a comprehensive answer to the question "How do/does light(s)(ing) in Trespasser work?" with all the information we "know" now would be useful..

Re: The "arrowhead" in TestScene and other levels

Posted: Sun Feb 13, 2011 9:35 pm
by machf
hppav wrote:You can import lights?
Well, I imported it from another level. If you mean from 3DS MAX, I guess we'd just need to change the TPM scripts to handle lights in a different way... in Trespasser they need to be specified as string class = "CLightDirectional"
I would assume they don't work like they do in 3ds Max due to the fact the engine only renders one light (the sun)
Actually, there are two light sources in a Trespasser level: the directional light used for the sunlight, and ambient light (equivalent to the scattered light from the sky, for comparison).
hence why the lights in ED and the God Beam in TestScene and the Alpha screens all are just objects scripted to render that way.
Would then the direction of the directional light be the direction that the sunlight takes,
Yes.
like how the direction of the airplane affects the direction of the skylight? I never tried importing a light because I believe Remdul or Rebel back in '02 said that the engine wouldn't render them as lights.
See above.

Re: The "arrowhead" in TestScene and other levels

Posted: Sun Feb 13, 2011 11:22 pm
by RexHunter99
hppav wrote:You can import lights? I would assume they don't work like they do in 3ds Max due to the fact the engine only renders one light (the sun) hence why the lights in ED and the God Beam in TestScene and the Alpha screens all are just objects scripted to render that way. Would then the direction of the directional light be the direction that the sunlight takes, like how the direction of the airplane affects the direction of the skylight? I never tried importing a light because I believe Remdul or Rebel back in '02 said that the engine wouldn't render them as lights.
Trespasser doesn't care what the instance was originally in max, it's how we handle the exportation of the data. A free-directional light from MAX would be the best solution as the Trespasser Directional lighting works the same (at least as far as I am aware and as far as I understand from all my research into 3-Dimensional graphics and lighting solutions)
Basically if we told the TPM Maxscript to also export instances of "Light" class, and then make it export some default light geometry for it too, then we would only need to TScript the instance with CLightDirectional as the class string, then the negative Z axis is the direction that the light "travels"
Where as Pointlights would have a range value attached to them. I wouldn't mind going back into GUIApp to fiddle with those some more...

Re: The "arrowhead" in TestScene and other levels

Posted: Mon Feb 14, 2011 2:13 am
by machf
Do Point and PointDirectional (Spot) lights actually work in Trespasser and/or GUIapp? Or were they left over but not implemented?

Re: The "arrowhead" in TestScene and other levels

Posted: Mon Feb 14, 2011 9:50 am
by RexHunter99
machf wrote:Do Point and PointDirectional (Spot) lights actually work in Trespasser and/or GUIapp? Or were they left over but not implemented?
IIRC either Rebel or Sam mentioned to me the got it working, so I went and too a whack at it myself, I think I remember getting point lights working in the debug build of GUIApp but they had to be mere millimetres away from the bumpmapped objects (and mind you they worked only on bumpmapped objects)