PlayerModel.setModel is bugged/doesnt work
by Azmodeus · in Torque Game Engine Advanced · 08/18/2005 (9:21 pm) · 66 replies
Just browsing at the code, most of it is commented out, so I'm guessing this is still bugged. Any eta on when it will be fixed? I would really like to have GUI's with models in them.
Yes, I have tried to use it, and it just doesnt display. No errors logged, just no model shows up.
Yes, I have tried to use it, and it just doesnt display. No errors logged, just no model shows up.
#42
The model remain black !! Why ?
Can everyone help us ?
Why you don't make a Tutorial on how to code good project ?
Thanks
^_^
03/21/2006 (11:19 am)
We have the problem with viewing model !!!The model remain black !! Why ?
Can everyone help us ?
Why you don't make a Tutorial on how to code good project ?
Thanks
^_^
#43
after the setup of your SceneState.
This does the setup of fog texture, needed when rendering materials.
-- Markus
04/11/2006 (3:39 pm)
If the model is rendered black you have to add:gClientSceneGraph->buildFogTexture(pBaseState);
after the setup of your SceneState.
This does the setup of fog texture, needed when rendering materials.
-- Markus
#44
Thank you very much !!!
Now we can see model with texture !!!! ^_^
Good Work !!!
Thank you again !!!
Bye
04/15/2006 (1:20 am)
Yeah !!!!!!!!!Thank you very much !!!
Now we can see model with texture !!!! ^_^
Good Work !!!
Thank you again !!!
Bye
#45
05/10/2006 (12:53 pm)
Can I get the TSE guiobjectview as well, warvstar@gmail.com.
#48
Whenever I end mission and try to load another mission, the GuiObjectView doesn't render the object.
Any ideas?
05/21/2006 (6:34 pm)
Hi guys,Whenever I end mission and try to load another mission, the GuiObjectView doesn't render the object.
Any ideas?
#49
Can't you just re-load the shape object (in script)?
05/21/2006 (10:24 pm)
I assume that's because of how it loads the shape resources Haider.Can't you just re-load the shape object (in script)?
#50
can i get GUIobjectview.cpp ported in tse . pls mail this to sknathan@carbonon.com
thanks in advance!
07/30/2006 (9:25 pm)
Hi!can i get GUIobjectview.cpp ported in tse . pls mail this to sknathan@carbonon.com
thanks in advance!
#51
08/14/2006 (12:58 am)
Is it just me or is the GuiObjectView code no longer working with TSE Milestone 3.5? For me, the same code works great for MS 3 but not in MS 3.5. At runtime, there are no errors in the console.log file, just nothing appears. I'm wondering if some of the new 3.5 rendering code changes may require some new modifications to the GuiObjectView control, here's renderWorld() method...void GuiObjectView::renderWorld( const RectI &updateRect )
{
if (!(bool)mMeshObjects.mMainObject)
return;
GFX->clear( GFXClearZBuffer, ColorI(0,0,0), 1.0f, 0);
GFX->setZEnable(true);
GFX->setZWriteEnable(true);
GFX->setZFunc(GFXCmpLessEqual);
GFX->setLightingEnable(true);
GFX->setAmbientLightColor(ColorF(0.3f, 0.3f, 0.3f));
LightManager *lightManager = NULL;
LightInfo light;
if(lightManager)
{
light.mType = LightInfo::Ambient;
light.mDirection = VectorF(0.57735f, 0.57735f, -0.57735f);
light.mColor = ColorF(1.0f,1.0f,1.0f);
light.mAmbient = ColorF(1.0f, 1.0f, 1.0f);
lightManager->setMaxGLLights(1);
lightManager->addLight(&light);
lightManager->installGLLights(Box3F(-1, -1, -1, 1, 1, 1));
}
// Determine the camera position, and store off render state...
MatrixF modelview;
MatrixF mv;
Point3F cp;
modelview = GFX->getWorldMatrix();
mv = modelview;
mv.inverse();
mv.getColumn(3, &cp);
// Set up the base SceneState.
F32 left, right, top, bottom, nearPlane, farPlane;
RectI viewport;
GFX->getFrustum( &left, &right, &bottom, &top, &nearPlane, &farPlane );
viewport = GFX->getViewport();
SceneState* pBaseState = new SceneState(NULL,
0,
left, right,
bottom, top,
nearPlane,
farPlane,
viewport,
cp,
modelview,
2000,
2000,
ColorF(0.1,0.1,0.1),
0,
NULL,
1);
pBaseState->mFlipCull = false;
TSMesh::setSceneState( pBaseState );
TSMesh::setRefract(false);
for (S32 i=0; i<33; i++)
{
if (mMeshObjects.mMesh[i].mesh)
{
// Animate and render
if(mMeshObjects.mMesh[i].mode == 1)
{
S32 time = Platform::getVirtualMilliseconds();
S32 dt = time - mMeshObjects.mMesh[i].lastRenderTime;
mMeshObjects.mMesh[i].lastRenderTime = time;
F32 fdt = dt;
mMeshObjects.mMesh[i].mesh->advanceTime( fdt/1000.f, mMeshObjects.mMesh[i].thread );
mMeshObjects.mMesh[i].mesh->animate();
}
// If this is a mounted object transform to the correct position
if (mMeshObjects.mMesh[i].parentNode != -1)
{
MatrixF mat;
getObjectTransform( &mat, i );
GFX->pushWorldMatrix();
GFX->multWorld(mat);
mMeshObjects.mMesh[i].mesh->render();
GFX->popWorldMatrix();
}
else
{
mMeshObjects.mMesh[i].mesh->render();
}
}
}
TSMesh::setSceneState( NULL );
delete pBaseState;
if (lightManager)
{
lightManager->uninstallGLLights();
lightManager->removeLight(&light);
}
GFX->setLightingEnable(false);
GFX->setZEnable(false);
GFX->setClipRect( updateRect);
GFX_Canonizer("GuiObjectView", __FILE__, __LINE__);
}
#52
08/14/2006 (7:15 am)
Same issue John. (Just a confirmation)
#53
I don't know enough directX to see what's wrong.
CAF
09/04/2006 (12:47 am)
Same here, it worked nicely till latest TSE upgrade.I don't know enough directX to see what's wrong.
CAF
#55
Thx ;-)
02/09/2007 (6:49 am)
Just wondering if anyone has this working for TGEA 4.2, dying to get my hands on it.Thx ;-)
#56
just sent you an email:-) would be awsome if oyu could send me the guiobjectview ressource too:-)
03/18/2007 (7:45 am)
Hi Erik just sent you an email:-) would be awsome if oyu could send me the guiobjectview ressource too:-)
#57
just sent you an email:-) would be awsome if oyu could send me the guiobjectview ressource too:-)
03/18/2007 (7:47 am)
Hi Erik just sent you an email:-) would be awsome if oyu could send me the guiobjectview ressource too:-)
#59
06/06/2007 (7:46 pm)
Email sent thanks Erik!
#60
06/14/2007 (5:14 pm)
Email sent. :) *crosses fingers*
Torque Owner Azmodeus