Wierd player shadow.
by Ryan Stroup · in Torque Game Engine Advanced · 03/24/2009 (6:47 pm) · 20 replies
I just downloaded TGEA 1.8.1 MAC and my player models have the strangest shifting rectangular shadows. They are different each time and sometimes they have text on them. What is going on?
#2
I don't know what that means or how to fix it?
What to do?
03/25/2009 (10:29 am)
thanks for the rply.I don't know what that means or how to fix it?
What to do?
#3
First bug on the page, including a fix!
-Dan
03/27/2009 (4:38 pm)
www.garagegames.com/community/forums/viewthread/84943First bug on the page, including a fix!
-Dan
#4
Unfortunately it isn't the bug I'm referring to.
The fix doesn't fix.
03/28/2009 (8:21 am)
Thanks Dan,Unfortunately it isn't the bug I'm referring to.
The fix doesn't fix.
#5
[IMG]http://img141.imageshack.us/img141/1305/picture1asu.th.png[/IMG]
03/28/2009 (8:35 am)
my problem[IMG]http://img141.imageshack.us/img141/1305/picture1asu.th.png[/IMG]
#6
03/28/2009 (2:44 pm)
Try pinging Alex S. on it? He's the Mac guru around the Garage. He's probably really busy right now with GDC and all that, but it doesn't hurt to try. :)
#7
What graphics card do you have, and what version of OS X are you running?
03/28/2009 (2:56 pm)
That screenshot is consistent with what the fix is supposed to, well, fix.What graphics card do you have, and what version of OS X are you running?
#8
OS X version 10.5.6
NVIDIA GeForce 9400M
after I change:
GFXGLTextureInternalFormat[GFXFormatD16] = GL_DEPTH_COMPONENT16;
to:
GFXGLTextureInternalFormat[GFXFormatD16] = GL_DEPTH_COMPONENT;
in the gfxGLEnumTranslate.cpp and save it, is there anything else I need to do?
Thanks Stefan and Alex
03/28/2009 (5:15 pm)
OS X version 10.5.6
NVIDIA GeForce 9400M
after I change:
GFXGLTextureInternalFormat[GFXFormatD16] = GL_DEPTH_COMPONENT16;
to:
GFXGLTextureInternalFormat[GFXFormatD16] = GL_DEPTH_COMPONENT;
in the gfxGLEnumTranslate.cpp and save it, is there anything else I need to do?
Thanks Stefan and Alex
#9
Sorry if it's a stupid question, but are you re-compiling after you make the change?
03/28/2009 (6:16 pm)
Quote:
after I change:
[...]
in the gfxGLEnumTranslate.cpp and save it, is there anything else I need to do?
Sorry if it's a stupid question, but are you re-compiling after you make the change?
#10
03/29/2009 (4:18 am)
Definatly don't forget to recompile. ;)
#11
searching for the gfxGLEnumTranslate.cpp file,
deleting the 16 from the line-
"GFXGLTextureInternalFormat[GFXFormatD16] = GL_DEPTH_COMPONENT16;"
Then right clicking on the gfxGLEnumTranslate.cpp file and selecting "compile".
When it is all done it says "build succeded", then I launch template and... no change.
If I choose build and go it crashes and says something about how the textures need to be the same dimension or something.
If I just open the template build file in xcode and choose build and go I get the same crash and errors.
"build failed (338 errors 1 warning)"
03/30/2009 (6:15 am)
What I'm doing is opening the template build file in xcode,searching for the gfxGLEnumTranslate.cpp file,
deleting the 16 from the line-
"GFXGLTextureInternalFormat[GFXFormatD16] = GL_DEPTH_COMPONENT16;"
Then right clicking on the gfxGLEnumTranslate.cpp file and selecting "compile".
When it is all done it says "build succeded", then I launch template and... no change.
If I choose build and go it crashes and says something about how the textures need to be the same dimension or something.
If I just open the template build file in xcode and choose build and go I get the same crash and errors.
"build failed (338 errors 1 warning)"
#12
That silly cubemap assert is annoying, I took it out of there, but instead of doing Build & Go, just go to the Build menu and choose Build, that should build the executable. It should build with the name Template_DEBUG in your game folder.
If you get errors on the build you'll have to look at the errors and see what they are :P
03/30/2009 (6:24 am)
Okay, I'm sorta new to XCode too but I'm guessing that right-clicking on the cpp file and doing compile is just compiling an object file for that cpp and not building the executable.That silly cubemap assert is annoying, I took it out of there, but instead of doing Build & Go, just go to the Build menu and choose Build, that should build the executable. It should build with the name Template_DEBUG in your game folder.
If you get errors on the build you'll have to look at the errors and see what they are :P
#13
MAC:
Bad shadows?
[IMG]http://img141.imageshack.us/img141/1305/picture1asu.th.png[/IMG]
In Xcode:
Open TorqueGameEngineAdvancedSDK-Mac-1-8-1/Projects/Template(or yourgame)/buildFiles/Xcode/Template.xcodeproj...
Search "gfxGLEnumTranslate.cpp" find the line:
GFXGLTextureInternalFormat[GFXFormatD16] = GL_DEPTH_COMPONENT16;
change it to:
GFXGLTextureInternalFormat[GFXFormatD16] = GL_DEPTH_COMPONENT;
Choose "Build" from the file menu and choose "Build" (not build and go).
Find and launch ...Projects/Template(or yourgame)/Game/Template_DEBUG (or yourgame_debug).
Ignore the cubemap assert:
[IMG]http://img293.imageshack.us/img293/4803/picture2f.th.png[/IMG]
by clicking "cancel" then "cancel" again.
Your shadows "should" be fixed:
[IMG]http://img135.imageshack.us/img135/6033/picture3d.th.png[/IMG]
Thanks everyone.
03/30/2009 (7:21 am)
Sweet Gerald.MAC:
Bad shadows?
[IMG]http://img141.imageshack.us/img141/1305/picture1asu.th.png[/IMG]
In Xcode:
Open TorqueGameEngineAdvancedSDK-Mac-1-8-1/Projects/Template(or yourgame)/buildFiles/Xcode/Template.xcodeproj...
Search "gfxGLEnumTranslate.cpp" find the line:
GFXGLTextureInternalFormat[GFXFormatD16] = GL_DEPTH_COMPONENT16;
change it to:
GFXGLTextureInternalFormat[GFXFormatD16] = GL_DEPTH_COMPONENT;
Choose "Build" from the file menu and choose "Build" (not build and go).
Find and launch ...Projects/Template(or yourgame)/Game/Template_DEBUG (or yourgame_debug).
Ignore the cubemap assert:
[IMG]http://img293.imageshack.us/img293/4803/picture2f.th.png[/IMG]
by clicking "cancel" then "cancel" again.
Your shadows "should" be fixed:
[IMG]http://img135.imageshack.us/img135/6033/picture3d.th.png[/IMG]
Thanks everyone.
#14
[IMG]http://img293.imageshack.us/img293/4803/picture2f.th.png[/IMG]
03/30/2009 (7:25 am)
How do i get rid of the cubemap assert which opens upon launch?[IMG]http://img293.imageshack.us/img293/4803/picture2f.th.png[/IMG]
#15
in GFXGLCubemap::fillCubeTextures.
And just comment out that line.
03/30/2009 (7:46 am)
Open gfx/gl/gfxGLCubemap.cpp and find the line that reads:AssertFatal((faces[i]->getWidth() == reqWidth) && (faces[i]->getHeight() == reqHeight), "GFXGLCubemap::fillCubeFaces - All textures must have identical dimensions!");
in GFXGLCubemap::fillCubeTextures.
And just comment out that line.
#16
Is this the best way to fix this problem or are there other ways?
03/30/2009 (8:26 am)
Thanks Gerald.Is this the best way to fix this problem or are there other ways?
#17
03/30/2009 (8:39 am)
I think the problem is that one of the textures for the default skybox is 256x256 while the rest are 1024x1024. I haven't bothered trying it yet, but I suspect that if you resize data/skies/skybox_5.jpg to 1024x1024 it will shut up too. I really don't know what the implications are for the assert, since the skybox seems to work fine if you ignore it, but there must be some reason for it, so resizing the image is probably the safest bet.
#18
All cubemap faces must be the same dimension, otherwise the cubemap is invalid and probably won't work.
03/30/2009 (9:58 am)
The skybox cubemap is used for water, not for the skybox.All cubemap faces must be the same dimension, otherwise the cubemap is invalid and probably won't work.
#19
Why is the cubemap yelling at me?
Should I comment it out?
03/30/2009 (10:14 am)
Do I need to change the cubemap face dimensions somewhere?Why is the cubemap yelling at me?
Should I comment it out?
#20
04/04/2009 (12:25 pm)
I actually posted about this but it's the sky_z_neg.jpg texture that's 4x4 whereas the others are 256x256, I just resized that jpg and no more assert.
Torque Owner Stefan Lundmark