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.
#23
Your assistance of GuiObjectView will be very verify for me.
My TSE version is 2.0.
my address is ankus@gamehi.net
12/06/2005 (4:02 am)
Hi ErikYour assistance of GuiObjectView will be very verify for me.
My TSE version is 2.0.
my address is ankus@gamehi.net
#24
12/07/2005 (4:19 am)
E-mail sent
#25
12/15/2005 (6:57 pm)
Can I get one to? chriskuy@comcast.net
#26
Could you please send me your TSE port of the GuiObjectView control? The GuiPlayerView just doesn't cut it. Email also sent... Thank you...
John K.
12/17/2005 (6:38 pm)
Hi Erik,Could you please send me your TSE port of the GuiObjectView control? The GuiPlayerView just doesn't cut it. Email also sent... Thank you...
John K.
#27
I have a little problem with GuiObjectView : It doesn't show any shapes !
Any suggestion to make it work?
01/20/2006 (8:01 am)
Hi Erik, and thanks for your mail.I have a little problem with GuiObjectView : It doesn't show any shapes !
Any suggestion to make it work?
#28
I pretty much re-coded it like 3 times too, since I want to use the shape display for a number of important GUI elements, but I havn't been able to get it working. Mine shows black shapes no matter what I do.
edit: I think its related to something else in the engine, maybe the version. definitely lighting related (for me)
01/20/2006 (6:08 pm)
Hey Vincent, I've been playing with Erik's version of it for a long time now and it never worked for me either :/I pretty much re-coded it like 3 times too, since I want to use the shape display for a number of important GUI elements, but I havn't been able to get it working. Mine shows black shapes no matter what I do.
edit: I think its related to something else in the engine, maybe the version. definitely lighting related (for me)
#29
01/21/2006 (8:31 am)
@Max : Is it possible to have a look to your code? Maybe, I can find some things... to make it work.
#30
I've tested it on my project and a clean download of TSE, and it's given me the same problems both ways.
I've been removing the "DNA resource" code, and I don't have this "TLK," so I'm not using it in the same environment Erik is, but it looks like it works for other people, so I am totally confused.
Basically, here is the situation:
- If I put it on the main menu gui and load a model, (before I start a mission) it crashes the game. The crash happens because mesh was looking at the first light in the light manager (light 0, ambient/sun light).
- If I load a model while a mission is really running, nothing appears in the element. The only way to even know it is there is to run the GUI editor, and it sure is, it's just doing nothing. I can even switch to a different GUI (like the main menu) and plop it in. It won't crash, but it never shows anything. So it'll not crash (but still be broken) regardless of what else is being rendered, it just needs lights in the light manager in order to not crash.
I modified the Gui to include lights, as it did in TGE, and what I get out of that is just a different version of what I got before:
- Before loading the mission, the models render solid black, no matter how I light them. This is problematic, even ignoring the fact that the background on my main menu is black :P
- After loading the mission, it is the same as before. No mesh is rendered at all.
I debugged this more seriously before, and I went real deep into the mesh rendering step by step and found that it was having some problem with materials. I don't remember exactly though. I may try and step through that again, try to find that spot. It was setting some sort of "error" flag and going to a separate rendering method than the "normal" one.
Also, I'm almost entirely sure the render call is being done on the meshes when the game is running, they just don't show up.
01/21/2006 (12:28 pm)
Reading back through here, I see Azmodeus had the same problem as me. To sum up what I've tested:I've tested it on my project and a clean download of TSE, and it's given me the same problems both ways.
I've been removing the "DNA resource" code, and I don't have this "TLK," so I'm not using it in the same environment Erik is, but it looks like it works for other people, so I am totally confused.
Basically, here is the situation:
- If I put it on the main menu gui and load a model, (before I start a mission) it crashes the game. The crash happens because mesh was looking at the first light in the light manager (light 0, ambient/sun light).
- If I load a model while a mission is really running, nothing appears in the element. The only way to even know it is there is to run the GUI editor, and it sure is, it's just doing nothing. I can even switch to a different GUI (like the main menu) and plop it in. It won't crash, but it never shows anything. So it'll not crash (but still be broken) regardless of what else is being rendered, it just needs lights in the light manager in order to not crash.
I modified the Gui to include lights, as it did in TGE, and what I get out of that is just a different version of what I got before:
- Before loading the mission, the models render solid black, no matter how I light them. This is problematic, even ignoring the fact that the background on my main menu is black :P
- After loading the mission, it is the same as before. No mesh is rendered at all.
I debugged this more seriously before, and I went real deep into the mesh rendering step by step and found that it was having some problem with materials. I don't remember exactly though. I may try and step through that again, try to find that spot. It was setting some sort of "error" flag and going to a separate rendering method than the "normal" one.
Also, I'm almost entirely sure the render call is being done on the meshes when the game is running, they just don't show up.
#31
01/21/2006 (12:41 pm)
I think it's having problem with material too. In void GuiObjectView::meshObjects::load ....// Load the skin
/*if(dStrcmp(skin,"") != 0)
{
dSprintf(fileBuffer, sizeof( fileBuffer ), "%s", skin);
TextureHandle texture = TextureHandle(fileBuffer, MeshTexture, false);
TSMaterialList* materialList = mMesh[index].mesh->getMaterialList();
materialList->mMaterials[0] = texture;
}
// If a parent Index exists store it.
if(pIndex)
mMesh[index].parentIndex = pIndex;*/Material loading is totally disabled with this comment. If I uncomment this, I can't compile TSE. But I don't see how to put materials. Any Ideas?
#32
01/21/2006 (12:56 pm)
Edit: thought it wasn't loading materials. it is.
#33
01/21/2006 (1:07 pm)
@Max : Edit : OK
#34
It is loading materials.
The ones with loaded materials display black, even through if you check they have textures referenced correctly and everything.
Back to square one.
01/21/2006 (1:54 pm)
That's tsMesh.cpp.It is loading materials.
The ones with loaded materials display black, even through if you check they have textures referenced correctly and everything.
Back to square one.
#35
After removing the offending lines as suggested for the compile error: forceHidden is not a member of TSShapeInstance::MeshObjectInstance, it compiles, but crashes in-game.
02/11/2006 (6:37 pm)
Request: Could anyone post the guiObjectView.cpp and .h files that do not contain the DNA or other "mesh mods" that Erik left in? I cannot get this to compile correctly, and when I do, the game crashes when attempting to use it.After removing the offending lines as suggested for the compile error: forceHidden is not a member of TSShapeInstance::MeshObjectInstance, it compiles, but crashes in-game.
#36
03/04/2006 (5:47 am)
Nobody?
#37
If you have or plan to do so - was it on the line where it adds lights to the scene before rendering?
Edit: if this happens to you, you are in the same boat as me and vincent - ie, it just won't work.
I think this fix worked on an older version of the TSE code, because I cannot get it to work on my project or the latest version at all.
03/04/2006 (7:25 pm)
Have you tried running in debug mode and seeing what crashed it?If you have or plan to do so - was it on the line where it adds lights to the scene before rendering?
Edit: if this happens to you, you are in the same boat as me and vincent - ie, it just won't work.
I think this fix worked on an older version of the TSE code, because I cannot get it to work on my project or the latest version at all.
#38
Surprisingly, nothing at all shows up about the crash in DEBUG mode. o_O Console reports normal.
03/04/2006 (8:04 pm)
It must've worked on the older version of TSE, because back when I started using TSE it worked for me. I'll run in debug.Surprisingly, nothing at all shows up about the crash in DEBUG mode. o_O Console reports normal.
#40
03/08/2006 (6:01 pm)
If only it didn't crash, you would. ;)
Torque Owner Erik Madison