T3D 1.1 final at last, but .... :( Edit : )
by Richard Marrevee · in Torque 3D Professional · 06/07/2011 (10:15 am) · 11 replies
Here it is Torque 3D 1.1 final. A great job, but introducing a lot of unwanted and unexpected behaviors :((
First:
StaticTSObjectType has disappeared!! This seems to be replaced with StaticShapeObjectType. So now it is impossible in script to distinguish staticShapes and TSStatic from eachother with $typeMask...
Changing this back to the state it was in T3D 1.1 Preview (with StaticTSObjectType) the TSStatics don't render!!!!
Second and Third:
SetMeshHidden and SetAllMeshesHidden don't hide collision meshes. Big problem when using doors and false walls and more of this stuff. This behavior is introduced in Final.
Running into this problems when just started porting from 1.1 Preview to 1.1 Final doesn't make me feel good for the rest of it (just discovered an issue with GuiTextListCtrl).
For me, the issue where the collision meshes can't be hidden is very annoying.
It makes game development with T3D somewhat counter-productive, checking and re-checking everything that worked, because it might not work with a new release. It makes me feel very, very sad
Edit:
See last Post
First:
StaticTSObjectType has disappeared!! This seems to be replaced with StaticShapeObjectType. So now it is impossible in script to distinguish staticShapes and TSStatic from eachother with $typeMask...
Changing this back to the state it was in T3D 1.1 Preview (with StaticTSObjectType) the TSStatics don't render!!!!
Second and Third:
SetMeshHidden and SetAllMeshesHidden don't hide collision meshes. Big problem when using doors and false walls and more of this stuff. This behavior is introduced in Final.
Running into this problems when just started porting from 1.1 Preview to 1.1 Final doesn't make me feel good for the rest of it (just discovered an issue with GuiTextListCtrl).
For me, the issue where the collision meshes can't be hidden is very annoying.
It makes game development with T3D somewhat counter-productive, checking and re-checking everything that worked, because it might not work with a new release. It makes me feel very, very sad
Edit:
See last Post
About the author
Started programming in 1984 on an Oric, when time progressed switched to MSX, Amiga and finally the Windows PC with T3D. Now developing an epic fantasy game: The Master's Eye. Creator of the DoorClass pack and VolumetricFog pack @ richardsgamestudio.com
#1
06/07/2011 (11:39 am)
Richard, you should open each of these problems under the Bugs section for T3D so they can be properly addressed.
#2
06/07/2011 (12:01 pm)
I know, but it might be smart to open up a 1.1 final Bug section.
#4
06/07/2011 (12:50 pm)
It should be easy enough to add your own object type back in if your code relies on it. They've reduced them down (a good move for clarity IMO)
#5
Not 100% the case. A StaticShape has ShapeBaseObjectType set, a TSStatic hasn't.
Also, you can simply use the classes to further filter queries down.
06/07/2011 (1:50 pm)
Quote:So now it is impossible in script to distinguish staticShapes and TSStatic from eachother with $typeMask...
Not 100% the case. A StaticShape has ShapeBaseObjectType set, a TSStatic hasn't.
Also, you can simply use the classes to further filter queries down.
initContainerTypeSearch( $TypeMasks::StaticShapeObjectType );
while( true )
{
%obj = containerSearchNext();
if( %obj $= "" )
break;
// Skip shapes that aren't TSStatics.
if( !%obj.isMemberOfClass( "TSStatic" ) )
continue;
// ...
}
#6
It just worked that way in preview and before, and it worked great for me as I may say. My problem is as follows with this. In some places I have doors which are staticshapes with an open and a close animation and 2 collisionmeshes, 1 named Col(-1 the door in closed position, and animated) and the other one ColOpen(-1 when door is opened this represents the door in open position so you cannot run through this door). Now before final release, ColOpen was hidden when the door was closed and unhidden when the door had opened so you could only walk through the opening and not through the door itself. Using sethidden completely removes this staticshape from the scene and the only thing I am looking for is to disable one part of the collision mesh system.
06/07/2011 (2:17 pm)
Thanks for all the information guys. The typeMask issue is not a big problem for me, I have changed some things and it is now working as I would have it working.Quote:2. That was not how mesh hiding was supposed to work, it was just supposed to hide visibility... setHidden(bool) is specially designed for collision, it takes the object off the server.
It just worked that way in preview and before, and it worked great for me as I may say. My problem is as follows with this. In some places I have doors which are staticshapes with an open and a close animation and 2 collisionmeshes, 1 named Col(-1 the door in closed position, and animated) and the other one ColOpen(-1 when door is opened this represents the door in open position so you cannot run through this door). Now before final release, ColOpen was hidden when the door was closed and unhidden when the door had opened so you could only walk through the opening and not through the door itself. Using sethidden completely removes this staticshape from the scene and the only thing I am looking for is to disable one part of the collision mesh system.
#7
Are these supposed to be like that?
Also another way to get class:
06/07/2011 (2:57 pm)
technically staticShapes are dynamicShapes ...StaticShape::StaticShape()
{
mTypeMask |= StaticShapeObjectType | StaticObjectType;//< --------------- ????
mDataBlock = 0;
}
//...
TSStatic::TSStatic()
{
mNetFlags.set(Ghostable | ScopeAlways);
mTypeMask |= StaticObjectType | StaticShapeObjectType;//< --------------- ????
//...
}Are these supposed to be like that?
Also another way to get class:
if(%obj.getClassName() $="staticShape")
#8
Yep. For the most part, type masks represent intent and meaning rather than technical ability. StaticObjectType and StaticShapeObjectType indicate that this is stuff that is *supposed* to be static during gameplay which can then be used for find stuff that constitutes level geometry as opposed to dynamic geometry like players.
06/07/2011 (8:17 pm)
Quote:Are these supposed to be like that?
Yep. For the most part, type masks represent intent and meaning rather than technical ability. StaticObjectType and StaticShapeObjectType indicate that this is stuff that is *supposed* to be static during gameplay which can then be used for find stuff that constitutes level geometry as opposed to dynamic geometry like players.
#9
The cause was not setMeshHidden but lays in the animation of the TSShape located in void TSShapeInstance::animateVisibility(S32 ss)
in TSAnimate.cpp, where the forceHidden flag was completely ignored. I changed it back as it was in 1.1 preview and my problem was solved.
If anybody needs this fix, just drop a message and I will post it.
06/10/2011 (4:36 am)
My problem regarding the SetMeshHidden is solved :).The cause was not setMeshHidden but lays in the animation of the TSShape located in void TSShapeInstance::animateVisibility(S32 ss)
in TSAnimate.cpp, where the forceHidden flag was completely ignored. I changed it back as it was in 1.1 preview and my problem was solved.
If anybody needs this fix, just drop a message and I will post it.
#10
06/10/2011 (11:43 pm)
Hey Richard, please do ;)
#11
The fix!
In TSAnimate.cpp locate the function
void TSShapeInstance::animateVisibility(S32 ss)
which is around line 641.
Now find (line 655...)
and change it into this:
rebuild the engine and it should now work as expected.
06/17/2011 (7:21 am)
Sorry for the late response, but my daily job did take more of my time than I expected.The fix!
In TSAnimate.cpp locate the function
void TSShapeInstance::animateVisibility(S32 ss)
which is around line 641.
Now find (line 655...)
// set defaults
S32 a = mShape->subShapeFirstObject[ss];
S32 b = a + mShape->subShapeNumObjects[ss];
for (i=a; i<b; i++)
{
if (beenSet.test(i))
mMeshObjects[i].visible = mShape->objectStates[i].vis;
}
// go through each thread and set visibility on those objects that
// are not set yet and are controlled by that thread
for (i=0; i<mThreadList.size(); i++)and change it into this:
// set defaults
S32 a = mShape->subShapeFirstObject[ss];
S32 b = a + mShape->subShapeNumObjects[ss];
for (i=a; i<b; i++)
{
// If the forced hidden flag is on then hide
// the mesh regadless of the animation state.
if ( mMeshObjects[i].forceHidden )
mMeshObjects[i].visible = 0.0f;
else if (beenSet.test(i))
mMeshObjects[i].visible = mShape->objectStates[i].vis;
}
// go through each thread and set visibility on those objects that
// are not set yet and are controlled by that thread
for (i=0; i<mThreadList.size(); i++)rebuild the engine and it should now work as expected.
Associate Steve Acaster
[YorkshireRifles.com]
2. That was not how mesh hiding was supposed to work, it was just supposed to hide visibility... setHidden(bool) is specially designed for collision, it takes the object off the server.