Why when do i compile synapse do i loose my targa support?
by Corin · in · 04/13/2005 (6:50 am) · 15 replies
About the author
#2
How did you fix the errors? The errors were related to merging the Lighting Pack into an existing project and forgetting to add the Lighting Pack's source files to the project's make files (diff the Lighting Pack and stock TGE make files to see what I mean). If you've edited any of the source code to eliminate the errors you may have inadvertently removed the TGA resource.
-John
04/13/2005 (2:40 pm)
Hi Juan,How did you fix the errors? The errors were related to merging the Lighting Pack into an existing project and forgetting to add the Lighting Pack's source files to the project's make files (diff the Lighting Pack and stock TGE make files to see what I mean). If you've edited any of the source code to eliminate the errors you may have inadvertently removed the TGA resource.
-John
#3
I just tested the TGA support and it works fine for me, but I did need to add the fixes in the resource comments (which are not in the resource rar file). So try applying the rar file contents, making sure to add the cc files to the project and the patch file contents (make sure all of the changes take), then add in the fixes from the resource comments.
The Lighting Pack creates brighter more intense scenes than TGE, so you need to adjust the lighting a bit. Try lowering the brightness of the sun's color and ambient value (cut them in half and then increase them to your liking).
I checked out the wheeled vehicle shadow issue before (in this thread):
I think you are the someone - I remember the cool bike. :)
This is a TGE bug, basically wheeledVehicle bypasses the normal shapeBase rendering for its wheels, renders them manually, but without rendering the shadows. Because the wheels are rendered separately from the body and because the TGE shadow code uses a lot of guess work to place the shadow on the ground it's likely the wheel shadow won't properly line up with the body shadow.
I just checked out the TGE 1.4 code and the problem is still there. Try posting a thread in the TGE Bugs forum, maybe no one is aware of the problem and it can easily be fixed - it's worth a shot.
Let me know if this helps!
-John
04/14/2005 (10:29 am)
Hi Juan,I just tested the TGA support and it works fine for me, but I did need to add the fixes in the resource comments (which are not in the resource rar file). So try applying the rar file contents, making sure to add the cc files to the project and the patch file contents (make sure all of the changes take), then add in the fixes from the resource comments.
The Lighting Pack creates brighter more intense scenes than TGE, so you need to adjust the lighting a bit. Try lowering the brightness of the sun's color and ambient value (cut them in half and then increase them to your liking).
I checked out the wheeled vehicle shadow issue before (in this thread):
Quote:
I just checked it out, the player class uses different shadow code and settings than vehicle class (which derives its shadowing from ShapeBase, this is stock TGE code). Take a look at shapeBase.cc line 2487 for details, you'll want to debug the code to make sure your object is entering the shadow code, if not it's related to the engine prefs, otherwise the problem could be related to the object itself and I would try a different DTS as a test.
...
Someone was looking into why wheeled vehicles don't cast wheel shadows it's because wheeledVehicle class uses the underlying ShapeBase object to render the vehicle body (including the shadow) then wheeledVehicle manually renders the wheels without adding the shadows.
I think you are the someone - I remember the cool bike. :)
This is a TGE bug, basically wheeledVehicle bypasses the normal shapeBase rendering for its wheels, renders them manually, but without rendering the shadows. Because the wheels are rendered separately from the body and because the TGE shadow code uses a lot of guess work to place the shadow on the ground it's likely the wheel shadow won't properly line up with the body shadow.
I just checked out the TGE 1.4 code and the problem is still there. Try posting a thread in the TGE Bugs forum, maybe no one is aware of the problem and it can easily be fixed - it's worth a shot.
Let me know if this helps!
-John
#4
Does the goal have convex collision meshes on the posts and around the sign, and is it a TSStatic object (you can see the object type in the mission editor, find the object in the MissionGroup treeview, its entry will look like: "
04/15/2005 (9:21 am)
Sure thing, AIWheeledVehicle only adds path finding code to the vehicle classes, it still uses the vehicle and wheeledVehicle classes' rendering methods, so the AIWheeledVehicle will look the same and render the same as the vehicle and wheeledVehicle class.Does the goal have convex collision meshes on the posts and around the sign, and is it a TSStatic object (you can see the object type in the mission editor, find the object in the MissionGroup treeview, its entry will look like: "
#5
You need to add convex collision meshes to the TSStatic object in order for it to cast static shadows onto the interiors and the terrain.
-John
04/19/2005 (10:15 am)
Hi Juan,You need to add convex collision meshes to the TSStatic object in order for it to cast static shadows onto the interiors and the terrain.
-John
#6
Like I said that's a TGE bug, which may need a rework of the WheeledVehicle class.
-John
04/20/2005 (12:48 am)
Hi Juan,Like I said that's a TGE bug, which may need a rework of the WheeledVehicle class.
-John
#7
05/27/2005 (5:21 am)
The guys at GarageGames are busy people and most likely your problem has been seen but just not replied to. There's no need to ask other people to contact them for you as well. There are many other bugs around that needs fixes.
#8
In shapebase.cc, inside renderShadow(), look for this code block:
And replace it by this:
Be aware it's a quick fix of mine... it was not exhaustively tested.
05/27/2005 (8:19 am)
The shadow rendering code only renders whatever is mounted at slot 0, and ignores the other slots completly.In shapebase.cc, inside renderShadow(), look for this code block:
// We only render the first mounted object for now...
if (mMount.link && mMount.link->mShapeInstance)
{
Point3F linkScale = mMount.link->getScale();
maxScale = getMax(linkScale.x,getMax(linkScale.y,linkScale.z));
mShadow->selectShapeDetail(mMount.link->mShapeInstance,dist,maxScale);
mShadow->renderToBitmap(mMount.link->mShapeInstance,
mMount.link->getRenderTransform(),
pos,
linkScale);
}And replace it by this:
for (ShapeBase* itr = mMount.list; itr; itr = itr->mMount.link) {
if (itr->mShapeInstance)
{
Point3F linkScale = itr->getScale();
maxScale = getMax(linkScale.x,getMax(linkScale.y,linkScale.z));
mShadow->selectShapeDetail(itr->mShapeInstance,dist,maxScale);
mShadow->renderToBitmap(itr->mShapeInstance,
itr->getRenderTransform(),
pos,
linkScale);
}
}Be aware it's a quick fix of mine... it was not exhaustively tested.
#9
06/08/2005 (11:28 am)
'getRenderImageTransform' doesn't properly transform from the wheel's object space, through the vehicle's object space, and into screen space.
#10
07/19/2005 (10:59 pm)
I would also very much like to see a resolution to this problem.
#11
Targa support works great with the Lighting Pack (just make sure to apply all of the changes required for the targa resource).
As for TGE ignoring the wheeled vehicle shadows - it might show up in TGE 1.4.
Let me know if this helps!
-John
07/20/2005 (1:51 am)
Hi guys,Targa support works great with the Lighting Pack (just make sure to apply all of the changes required for the targa resource).
As for TGE ignoring the wheeled vehicle shadows - it might show up in TGE 1.4.
Let me know if this helps!
-John
#12
I checked out the latest TGE 1.4 code and vehicle wheel shadows are not included. Instead I've added wheel shadows to the Lighting Pack, here are a few shots:


I've posted info on the update in the Lighting Pack private forums.
-John
07/21/2005 (9:14 pm)
Hey guys,I checked out the latest TGE 1.4 code and vehicle wheel shadows are not included. Instead I've added wheel shadows to the Lighting Pack, here are a few shots:


I've posted info on the update in the Lighting Pack private forums.
-John
#14
07/22/2005 (4:38 am)
Sweet John. Still my favorite purchase since TGE.
Torque Owner Stefan Lundmark
You need to find your way around and reimplement the changes without breaking any of the two codepacks.