Game Development Community

Forest Pack Q&A

by Kyle Carter · in Torque Game Engine · 10/27/2007 (1:50 am) · 196 replies

In followup to my blog post, please post any questions about the Forest Pack release here.
Page«First 4 5 6 7 8 9 10 Next»
#181
08/17/2008 (11:05 pm)
@Alan

Thank you for that new model. That did the job! It seems to be working pretty well now. See for yourself!

img295.imageshack.us/img295/4934/screenshot3wd2.th.jpg
img294.imageshack.us/img294/9188/screenshot2mg9.th.jpg
img174.imageshack.us/img174/7451/screenshot1ti3.th.jpg


Now if you look at the first screenshot, it looks weird. I have the view distance to 100 and the fog to 50. You can see the fog is fine on the dif building but not the trees. Actually the trees are not effected by the fog from what it looks like.
#182
08/18/2008 (3:41 am)
Well I did some more testing and I still have the fog bug. When I rotate the player around the trees flicker from normal then to the color of the fog and with a black spot on the ground where the player's shadow is.
#183
08/18/2008 (11:49 am)
Now here's a screenshot of what happens when I just have the plain code and no fixes besides the ".cs"

img107.imageshack.us/img107/5885/freshinstallvx8.th.jpg

You can see that the trees are working with the fog in the distance but up close sometimes they turn that pink color. Another other with the plain code the textures on the textures are not showing up.

EDIT: I want to say that when I'm just looking at the trees, the fog is fine just the tree textures aren't showing up. But with I look at any fxShape/foliage replicator I get that pink color with the trees which you can see in the screenshot.
#184
08/18/2008 (12:19 pm)
Okay I think I finally got the Forest Pack working. I applied just a few fixes and it seems to work just fine now. See for yourself.

img125.imageshack.us/img125/4359/muchbetterox4.th.jpg

So here's the changes I made.

line 140 of forestRender.cc in Forest::initMaterials(), added

LightManager::sgSetupExposureRendering(); // <- potentially missing line

Then I also added Karens fix

LightManager::sgResetExposureRendering(); // **** add this magic line


Line 930 of forestRender.cc, added

glEnable(GL_LIGHTING);

Now with those 3 fixes, the trees show up correctly with the textures and fog but when I have any fxShape / foliage replicators in the mission I get that pink color on the trees.

So does anyone know what that is?
#185
08/18/2008 (12:36 pm)
Well I narrowed the problem down a little more. It's the fxShapeReplicator that is causing the pink tree bug. The fxFoliage works perfectly fine but no the shapes.

img143.imageshack.us/img143/6506/foliageworksno3.th.jpg

So I tried Tony Richards fix, but I don't think that's it.

if (TSShapeInstance::smRenderData.fogTE != TSShapeInstance::smRenderData.baseTE) // add this
#186
08/19/2008 (11:46 am)
Thanks for narrowing this down, Tek0. This probably explains why I was never able to get the problem to repro on my end back when I was trying to debug it. This should be a BIG clue for anybody who's still working on this problem!

I am currently under some deadlines at work. (Like getting ready for two talks I'm giving at Austin GDC, come see me!) But if you e-mail me a reminder in a month or so I might be able to do another pass and possibly even fix the issue. :)
#187
08/19/2008 (11:53 am)
Thanks Ben, Well I hope in a month the problem will be fixed. But on the plus side, I only changed those third lines to get the forest pack working. By the way, I have been using the debug build.

But since I narrowed the problem down and have been testing with the editor and clients (my other computers) the forest pack works great as long as there is no fxShapeReplicators in the mission.
#188
08/19/2008 (5:08 pm)
Actually, fxreplicators work fine with the forest pack.

Forest Pack alone:
i167.photobucket.com/albums/u143/heretek/torque/screenshot01_forestonly.png
Forest Pack with 1 replicator for some extra trees:
i167.photobucket.com/albums/u143/heretek/torque/screenshot02_forestw1rep.png
Forest Pack with 1 replicator for extra trees + 2 more replicators for rocks:
i167.photobucket.com/albums/u143/heretek/torque/screenshot03_forestwith2rep.png
Oh yeah, it works fine with the modernization kit also.

The lighting/fogging bug is a tree by tree thing, but it's not the only problem I've seen with some of the trees. I've had some trees that were rotated 90 degrees and other's that were completely inverted, but they would work fine as staticshapes or through the fxreplicator, I always figured it was a LOD problem or an export incompatible with the code.

EDIT: fixed one image tag
#189
08/19/2008 (5:38 pm)
@silentMike

Are you using AFX Pack?
#190
08/20/2008 (10:00 am)
No AFX in TGE for me. I'm using 1.5.2 with the Modernization kit and some custom shaders, Forest Pack, polysoup, 3d Diggers Horse Pack, and a few other minor changes to the source.
#191
08/20/2008 (10:07 am)
I see, well I have the forest pack working just fine but when I have fxShapeReplicators in the mission and have both in my screen the trees turn a pink color. Now I can have the fxFoliageReplicator and the trees in the same screen and work fine. It's just something with the fxShapeReplicator.
#192
08/20/2008 (12:35 pm)
The MK actually modifies a bunch of rendering code. So it's at least as big a change as AFX, really probably much more. In other words, it probably doesn't prove anything about the functioning of fxShapeReplicators in plain old TGE. :)
#193
08/20/2008 (5:03 pm)
Ben had a good point so I went back and tried the Forest Pack in plain ole TGE 1.5.2, and the replicators still worked fine. But I did want to point out some oddities that some trees have, other than the lighting, fog, missing texture bugs.

Here I'm using the so old "it looks like a Tribes tree" tree that comes with Torque and the FTREE02.dts, which is one of the newer ones. Notice the upside down trees? Those are the FTREE02's.
i167.photobucket.com/albums/u143/heretek/torque/cleanFP_upsidedownFTREE02.jpg
And with a replicator just to show that same FTREE02.dts:
i167.photobucket.com/albums/u143/heretek/torque/cleanFP_replicatedFTREE02.jpgIt looks like the Forest Pack pushes the trunk upwards and places the foliage at the ground.

And another one that shows a few more oddities.
i167.photobucket.com/albums/u143/heretek/torque/cleanFP_90DEGtrees.jpgNotice that the trees in the background have their trunks rotated 90 degrees and the foliage is just hanging in the air? And see those deadtrees on the left of the crosshair, again rotated 90 degrees? The one on the right shows how it's supposed to appear.

There are a few other examples that do this, some that don't even show up, yet some trees work fine. And when it works, it works beautifully; even with fxreplicators thrown into the mix.
#194
10/09/2009 (7:14 pm)
@Michael, Would it be possible to post your ForestPack files, there are so many fixes that I have tried and most either are already in, conflict with another or don't work at all.

I never had the rotation problems, but other then that I basically had all the same problems you had: Lighting, Fog and tree texture issues.(tree texture issues only started after lighting fix)

This would be great to have for all TGE owners, however it doesnt seem many have been able to correctly implement this, it would be great to have a working version. (or at least better working then the beta2 "2007" update, in which other then the Rot bug you seem to have had the closest working version)

Appreciate the help.
#195
12/22/2009 (10:40 pm)
Bump.

Yes, I too would be interested in the posting of your ForestPack files.
#196
12/23/2009 (9:25 pm)
Well you are in luck, because I released it all several years ago.
Page«First 4 5 6 7 8 9 10 Next»