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.
#102
The light dark thing in the above video was somehow waterblock related. Remove the waterblock and it removed the overbrightness. I know that's not a solution but it's just another symptom...maybe.
Here's another that I'm stumped by. Level runs smoothly, decent framerate (considering both the number of trees and the 100000 foliage replications):

crest the hill and a SINGLE .DIF, a cube basically and check out the framerates:

And move where the .DIF is out of view, the framerate still stays low:
In levels without the forest I have had up to fifteen or twenty .DIFs with little frame drop. Don't know what it means, just thought I'd put it out there...
11/24/2007 (6:01 pm)
OK,The light dark thing in the above video was somehow waterblock related. Remove the waterblock and it removed the overbrightness. I know that's not a solution but it's just another symptom...maybe.
Here's another that I'm stumped by. Level runs smoothly, decent framerate (considering both the number of trees and the 100000 foliage replications):

crest the hill and a SINGLE .DIF, a cube basically and check out the framerates:

And move where the .DIF is out of view, the framerate still stays low:
In levels without the forest I have had up to fifteen or twenty .DIFs with little frame drop. Don't know what it means, just thought I'd put it out there...
#103


Setting the singleBlock field to "0" causes trees to appear again and the light/dark anomaly to go away.
11/24/2007 (8:46 pm)
I noticed a similar issue with light/dark patches on the terrain, so I thought I would just point it out. The problem only occurs if I set the "singleBlock" field in the Forest object to "1" -- no trees appear at all, and I get the weird terrain light/dark anomalies shown below:

Setting the singleBlock field to "0" causes trees to appear again and the light/dark anomaly to go away.
#104
Also, the thread that talks about only missions with water in them isn't true for me eather. I have 5 levels, all have the lighting anomaly to one extreme or another, but only 1 has water.
11/25/2007 (10:43 am)
Quote:Setting the singleBlock field to "0" causes trees to appear again and the light/dark anomaly to go away.That didn't work for me. :-/
Also, the thread that talks about only missions with water in them isn't true for me eather. I have 5 levels, all have the lighting anomaly to one extreme or another, but only 1 has water.
#105
Thanksgiving was a bigger time hit than anticipated. :) I'll be putting some time into this soon, but no update today. I've been intermittently seeing the bright-square issue, too, think it's related to detail textures.
Not sure about that DIF issue, but I'll drop a DIF in my test mission and see what I can find. Do your profiler numbers turn anything interesting up? Do you see any rendering artifacts?
Ben
11/25/2007 (5:53 pm)
Hey guys,Thanksgiving was a bigger time hit than anticipated. :) I'll be putting some time into this soon, but no update today. I've been intermittently seeing the bright-square issue, too, think it's related to detail textures.
Not sure about that DIF issue, but I'll drop a DIF in my test mission and see what I can find. Do your profiler numbers turn anything interesting up? Do you see any rendering artifacts?
Ben
#106
No artifacts that I've noticed, here's the Profiler dump, not sure what any of it means but this is from the 13fps image area in the mission screenshot above:
www.reallyreallygoodthings.com/resources/DIF-FOREST_Profiler.txt
*Note* This build does have the 1.5.2 version of the MK in, but DIFs are definitely not a problem with it, it's just in the missions with forests.
11/27/2007 (7:26 pm)
Hey Ben (or anyone who might understand what the profiler dump is saying);No artifacts that I've noticed, here's the Profiler dump, not sure what any of it means but this is from the 13fps image area in the mission screenshot above:
www.reallyreallygoodthings.com/resources/DIF-FOREST_Profiler.txt
*Note* This build does have the 1.5.2 version of the MK in, but DIFs are definitely not a problem with it, it's just in the missions with forests.
#107
11/28/2007 (10:55 am)
Hmmm... Weird, the forest is definitely eating your time but it's unclear why. What's the tree count in your forest?
#108
If so, the forestCount = "4324"; is listed.
Correct me if I'm wrong on that, but don't smirk too much. =)
11/28/2007 (6:09 pm)
OK, this might sound stupid but the tree count is saved dynamically in the mission file correct, based on the painted terrain texture that the trees are spawned on and the distance between trees? If so, the forestCount = "4324"; is listed.
Correct me if I'm wrong on that, but don't smirk too much. =)
#109
11/28/2007 (6:21 pm)
Nah - you have to update that number manually (but you're right, it SHOULD be the forest count). The number I'm curious about is the one in the console when the forest object initializes.
#110
anyway here from the console:
CreateShapeInstances in 0.09 seconds.
(newForest) Forest grew - itemIdx: 4324 numOfItemsBefore: 4324 numOfItemsAfter: 9324
---- End createForest: RandomSeed: 100 Forest Array Size: 9324 Num ForestItems: 4324 Number of ShapeInstances: 3
Forest Created in 0.20 seconds.
I'm a little reluctant to note that this was right before these lines...again if it's desperate...try not to make me feel like an...oh, nevermind I already feel like an idiot:
Missing file: newForest..cs!
11/28/2007 (6:30 pm)
Well that was sure a weird number for me to pick then...=Panyway here from the console:
CreateShapeInstances in 0.09 seconds.
(newForest) Forest grew - itemIdx: 4324 numOfItemsBefore: 4324 numOfItemsAfter: 9324
---- End createForest: RandomSeed: 100 Forest Array Size: 9324 Num ForestItems: 4324 Number of ShapeInstances: 3
Forest Created in 0.20 seconds.
I'm a little reluctant to note that this was right before these lines...again if it's desperate...try not to make me feel like an...oh, nevermind I already feel like an idiot:
Missing file: newForest..cs!
#111
11/28/2007 (6:33 pm)
Speaking of which, what's the difference between the forest array size and the num forestItems?
#112
Quote by Stephan (viKKing) Bondier
That will fix the missing newForest..cs. 9at least it takes out one of the periods)
11/28/2007 (6:38 pm)
Alan, as has been posted above:Quote by Stephan (viKKing) Bondier
Quote:
Forest.cc
line 539 change
dSprintf(forestFile,sizeof(forestFile),"%s.%s", getName(), ".cs");
into
dSprintf(forestFile,sizeof(forestFile),"%s.%s", getName(), "cs");
That will fix the missing newForest..cs. 9at least it takes out one of the periods)
#113
I mean things seem to be working generally - abliet with the noted performance issues in certain circumstances -- but not having it named that specific name, would it cause any problems -- other than the obvious cosole error?
(not that it would be an issue to change it, it just seems I ended up with that name)
.
11/28/2007 (6:52 pm)
I guess the other question I would have is does it make any difference that my forest script is called forest.cs and not newforest.cs? I mean things seem to be working generally - abliet with the noted performance issues in certain circumstances -- but not having it named that specific name, would it cause any problems -- other than the obvious cosole error?
(not that it would be an issue to change it, it just seems I ended up with that name)
.
#114
Also, on my side the change at line 539 did not solve the missing script message.
But that's a long time I have not been playing with it, so I may have to check again, because I may have been tired when I last tested it. 8-P
11/28/2007 (11:43 pm)
@Alan: the script filename much match this declaration: new Forest(newForest) {Also, on my side the change at line 539 did not solve the missing script message.
But that's a long time I have not been playing with it, so I may have to check again, because I may have been tired when I last tested it. 8-P
#115
Any update on the lighting issues? I am having similar issues...
When in third person mode and I rotate the camera so that the sun is directly behind my character, his shadow becomes a dark square on the terrain plan the fades slowly back to original shadow. When this happens the trees all light up.
I wish I could send a screen shot, but I am at work right now, I'll try to send one later this morning :o) I have made all of the necessary changes including the correction of the 2x multiplier.
I know that it's currently the holidays so no need to get back quickly on this.
Thank you all in advance,
RT
12/30/2007 (10:40 pm)
Hi all,Any update on the lighting issues? I am having similar issues...
When in third person mode and I rotate the camera so that the sun is directly behind my character, his shadow becomes a dark square on the terrain plan the fades slowly back to original shadow. When this happens the trees all light up.
I wish I could send a screen shot, but I am at work right now, I'll try to send one later this morning :o) I have made all of the necessary changes including the correction of the 2x multiplier.
I know that it's currently the holidays so no need to get back quickly on this.
Thank you all in advance,
RT
#116

Then I rotated the camera towards the ground and all was fine again. This happens everytime I use the forest resource. I have gonna back and attempted the implementation, prolly 5 times. And I had my project partner also review it. Looks like everything is implemented fine.

Thanks for you help again!
RT
01/29/2008 (8:42 am)
Wow, it's been a while since my last post. We've just given berth to our third child, Xavier, so time is quite difficult to come by :o) As promised, here are a couple of screen shots. I took the first one when I noticed the problem.
Then I rotated the camera towards the ground and all was fine again. This happens everytime I use the forest resource. I have gonna back and attempted the implementation, prolly 5 times. And I had my project partner also review it. Looks like everything is implemented fine.

Thanks for you help again!
RT
#117
The reason for the gap here in updates is that I tried to get a contractor on board to finish it, but they ended up getting hired and not having time to complete it. Eek. If you happen to know someone good who can help get this thing beaten into shape, drop me an e-mail!
Meanwhile, I'm getting ready for GDC (I'm giving a talk this year!). Expect more progress after Feb 22 (unless I get ahold of a contractor).
01/29/2008 (1:57 pm)
Oh interesting. It's like the alpha blend is being disabled. I've reviewed the implementation several times myself and don't see any obvious errors.The reason for the gap here in updates is that I tried to get a contractor on board to finish it, but they ended up getting hired and not having time to complete it. Eek. If you happen to know someone good who can help get this thing beaten into shape, drop me an e-mail!
Meanwhile, I'm getting ready for GDC (I'm giving a talk this year!). Expect more progress after Feb 22 (unless I get ahold of a contractor).
#118
@Ben - Awesome! I finally get to go to my first GDC this year. Which talk are you doing? I don't wanna miss it.
01/29/2008 (3:29 pm)
@Jean-Pierre - CONGRATS! =)@Ben - Awesome! I finally get to go to my first GDC this year. Which talk are you doing? I don't wanna miss it.
#119
https://www.cmpevents.com/GD08/a.asp?option=C&V=11&SessID=6457
01/29/2008 (3:59 pm)
I'll be doing Tamarin: A Free, Fast, Open Scripting Runtime on Friday.https://www.cmpevents.com/GD08/a.asp?option=C&V=11&SessID=6457
#120
01/30/2008 (1:52 pm)
That's the same problem I've been having with it. I've never figured out how to fix it tho.
Torque Owner Mike Rowley
Mike Rowley