Tree Improvement Project
Moderator: EagleMountainDK
RE: Tree Improvement Project
To improve the look of the low LOD trees, try applying a background of leaf or trunk colour & tone, rather than either 'sky' or 'black'
While this won't improve the quality of the alpha cutout, it will minimise the obviousness of the halo remaining.
While this won't improve the quality of the alpha cutout, it will minimise the obviousness of the halo remaining.
RE: Tree Improvement Project
ORIGINAL: Mad Russian
So, does that mean that summer trees block more LOS sight rays than winter trees?
Only if the summer trees had more vertical polygons ... In theory it should ... Most of the single model trees have the same mesh look (#). I noticed that the mesh for the "forests" (different mesh than the single tree models) contain more polygons for the trees.
ORIGINAL: Mad Russian
And a pine tree blocks less LOS sight rays the higher it goes instead of an oak for instance that would get thicker as it gained in height?
I haven't compared the pine with the oak ... If they are both the same mesh (#) then you brought up a good point.
The oak should have more polygons than the pine ... And the summer tree should have more than the winter.
This needs to be tested again to verify that it's using the ploygons as "per hit" items instead of the entire tree mesh. I say this because the manual uses the term "object" when it comes to the number of "per hits" when counting. The term "object" needs to be defined.
My theory is polygon ... because I've tested it ... the more hits through a single model the lower the LOS.
Koios' definition may be the entire model (which would mean that all hits through the model counts as 1-hit).
[&:] I really can't say for sure now.
Rob
- Erik Rutins
- Posts: 39640
- Joined: Tue Mar 28, 2000 4:00 pm
- Location: Vermont, USA
- Contact:
RE: Tree Improvement Project
As far as I know it's polygons, so that a single tree could cause more than one hit if you pass through two "planes" of leaves on the way.
Erik Rutins
CEO, Matrix Games LLC

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/
Freedom is not Free.
CEO, Matrix Games LLC

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/
Freedom is not Free.
RE: Tree Improvement Project
ORIGINAL: Erik Rutins
As far as I know it's polygons, so that a single tree could cause more than one hit if you pass through two "planes" of leaves on the way.
Thanks Erik ...
With Benparks new tree(s) this would help ... Even an extra "plane" of polygons to the cross-hatch model would help for the thicker forests.
Rob
RE: Tree Improvement Project
I nearly have a decent model. It's roughly <150 triangles, so it's lo-res. I'm having some issues with the way the they appear in the SE and in game, though. The right side (no matter how I move around the model) always vanishes.
All the faces are 2 sided, so the textures should be showing. Could this be an issue with the way alpha layers are displayed-ie., they block the background out?
MS3d model and textures attached for your amusement.
If we get this solved, I can start cranking these out for a whole new set of trees.
All the faces are 2 sided, so the textures should be showing. Could this be an issue with the way alpha layers are displayed-ie., they block the background out?
MS3d model and textures attached for your amusement.
If we get this solved, I can start cranking these out for a whole new set of trees.
- Attachments
-
- BenTrees.zip
- (116.38 KiB) Downloaded 6 times
"Fear is a darkroom where the devil develops his negatives" Gary Busey
RE: Tree Improvement Project
Image of what I'm rambling on about (note the horrible texture downsampling...):


- Attachments
-
- Untitled2.jpg (203.86 KiB) Viewed 408 times
"Fear is a darkroom where the devil develops his negatives" Gary Busey
RE: Tree Improvement Project
This is about final for the standard tree type. What it ends up looking like in the game will probably be a good deal different. It's 195 triangles, and there will eventually be an LOD (once I figure out how to do that...).
It doesn't load it's textures in game/SE, however- the problem I had with fM now is happening in MS3D with certain models. The one's that do work have the problem above. My brain is boggled.

It doesn't load it's textures in game/SE, however- the problem I had with fM now is happening in MS3D with certain models. The one's that do work have the problem above. My brain is boggled.

- Attachments
-
- Untitled1.jpg (136.16 KiB) Viewed 408 times
"Fear is a darkroom where the devil develops his negatives" Gary Busey
RE: Tree Improvement Project
Just before bed, and I had an idea- maybe if all of the faces that I duplicated (to make the branches) didn't have the textures actually assigned-even though I could see them in MS3D. So I selected them all and hit "assign", and I'm in luck. So the tree models not showing textures appears fixed.
The other problem above regarding the odd alpha channel is still in need of a fix, but this gets us closer. I still see that the right vertical face is not showing up on these models as well (the vert face of the "+" shaped form that the leaves make up with an alpha texture).

The other problem above regarding the odd alpha channel is still in need of a fix, but this gets us closer. I still see that the right vertical face is not showing up on these models as well (the vert face of the "+" shaped form that the leaves make up with an alpha texture).

- Attachments
-
- Untitled1.jpg (222.92 KiB) Viewed 408 times
"Fear is a darkroom where the devil develops his negatives" Gary Busey
RE: Tree Improvement Project
Looks like you're making progress though! Great!
Thanks
Rick
Thanks
Rick
- Erik Rutins
- Posts: 39640
- Joined: Tue Mar 28, 2000 4:00 pm
- Location: Vermont, USA
- Contact:
RE: Tree Improvement Project
That latest batch looks excellent, great work so far!
Erik Rutins
CEO, Matrix Games LLC

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/
Freedom is not Free.
CEO, Matrix Games LLC

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/
Freedom is not Free.
RE: Tree Improvement Project
Could it be that the game (or this type of thing in general) doesn't want to display 2 sided faces both sides at once? For example- do I have to have all of the surfaces facing the viewer using the same face? I tried using "face all to front", but this didn't make a difference.
None of the surfaces are showing as being black, so I know they are all 2 sided.
None of the surfaces are showing as being black, so I know they are all 2 sided.
"Fear is a darkroom where the devil develops his negatives" Gary Busey
RE: Tree Improvement Project
ORIGINAL: benpark
Could it be that the game (or this type of thing in general) doesn't want to display 2 sided faces both sides at once? For example- do I have to have all of the surfaces facing the viewer using the same face? I tried using "face all to front", but this didn't make a difference.
None of the surfaces are showing as being black, so I know they are all 2 sided.
Ben,
Looking at the examples you sent me I can see the problem.
On directX hardware there is no advantage to specing a double sided face. You can do it in some software packages but in reality at the engine hardware level the backfaces and backnormals just get duplicated from the front and rendered. Hence you won't have any render advantage to specing a double sided face as opposed to actually making the backface.
The PCK engine is pretty simple, I don't think it support double sided faces at the directX input level anyway so here is how to fix your problem (I did this in fM which is so good I have deleted MS3D from my drive [;)])
Load up your tree.
Ensure the select face tool is selected. Tick the select backfaces option (in the select face tool properties options)
The carefully draw a selection box around the bottom trunk of the tree so that the entire trunk (but none of the branches) are selected.
Pan around your tree and ensure that only the trunk and no branches have indeed been selected.
Now go Edit->Invert Selection->Faces (this will now deslect the trunk but select all the branches - which is what we want)
Now go Edit->Duplicate Mesh Selection (nothing will have appear to have happened but all those selected branch faces just got dulicated)
Now go Face->Reverse Vertex Order (this will flip all the faces as would have been done in the hardware anyway)
There you go now just export your tree as an X file (Fromat - whatever, Options Hierarchial Mesh, Matrix Keys)
And you are good. Here is a shot in the SE. The tree on the left I have set the display alpha to 0. The one on the right the display alpha = 255
Regards
S.
Just as an aside looking at the stock trees you will notice that the main part of the trees are double sided as above, but many of the smaller branches are only single sided so will disappear when you rotate the camera to look at back faces.

- Attachments
-
- Untitled.jpg (357.84 KiB) Viewed 411 times
RE: Tree Improvement Project
ORIGINAL: Erik Rutins
As far as I know it's polygons, so that a single tree could cause more than one hit if you pass through two "planes" of leaves on the way.
That method will have to be reconsidered in the light of faster hardware and modders like ben who want to make more complex trees (ie higher poly trees).
The same oak tree if a simple low poly model or complex hight poly model should block LOS the same. Not to mention what happens when the LOS ray goes through LOD versions of the same tree.
Regards
S.
- Erik Rutins
- Posts: 39640
- Joined: Tue Mar 28, 2000 4:00 pm
- Location: Vermont, USA
- Contact:
RE: Tree Improvement Project
ORIGINAL: Stridor
That method will have to be reconsidered in the light of faster hardware and modders like ben who want to make more complex trees (ie higher poly trees).
The same oak tree if a simple low poly model or complex hight poly model should block LOS the same. Not to mention what happens when the LOS ray goes through LOD versions of the same tree.
Definitely requires some thought. I would think that the method is still basically sound, but it will need some tweaking based on testing with whatever new set of trees we decide to put in the game. I think that for the most part it was balanced on one hit per tree, with the idea that heavier forests and more dense trees will cause more hits in a given area and thus block LOS more (and they'll also look like they should, making it intuitive for the player). The point about LOD versions is a good one, I'm not sure how that's dealt with at present but we'll take a look and see.
Regards,
- Erik
Erik Rutins
CEO, Matrix Games LLC

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/
Freedom is not Free.
CEO, Matrix Games LLC

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/
Freedom is not Free.
RE: Tree Improvement Project
ORIGINAL: Erik Rutins
ORIGINAL: Stridor
That method will have to be reconsidered in the light of faster hardware and modders like ben who want to make more complex trees (ie higher poly trees).
The same oak tree if a simple low poly model or complex hight poly model should block LOS the same. Not to mention what happens when the LOS ray goes through LOD versions of the same tree.
Definitely requires some thought. I would think that the method is still basically sound, but it will need some tweaking based on testing with whatever new set of trees we decide to put in the game. I think that for the most part it was balanced on one hit per tree, with the idea that heavier forests and more dense trees will cause more hits in a given area and thus block LOS more (and they'll also look like they should, making it intuitive for the player). The point about LOD versions is a good one, I'm not sure how that's dealt with at present but we'll take a look and see.
Regards,
- Erik
Erik,
Tweaking maybe, but the primary premise is just what it should be. ie denser forest --> or even just denser foliage, should result in reduced line of site.
Rick
RE: Tree Improvement Project
It is a "non-trivial" problem to solve for the grogs however.
A LOS ray which intersects a "branch" plane may block LOS 50%. The same ray which interestcs a "trunk" plane may black LOS 100%.
Not to mention that at the moment all the TCs focal planes are set at infinity with the enemy units having zero size extents.
Some type of compromise will have to be made. Perhaps plane hits / distance indexed to the terrain type?
Regards
S.
A LOS ray which intersects a "branch" plane may block LOS 50%. The same ray which interestcs a "trunk" plane may black LOS 100%.
Not to mention that at the moment all the TCs focal planes are set at infinity with the enemy units having zero size extents.
Some type of compromise will have to be made. Perhaps plane hits / distance indexed to the terrain type?
Regards
S.
- Erik Rutins
- Posts: 39640
- Joined: Tue Mar 28, 2000 4:00 pm
- Location: Vermont, USA
- Contact:
RE: Tree Improvement Project
ORIGINAL: Stridor
It is a "non-trivial" problem to solve for the grogs however.
A LOS ray which intersects a "branch" plane may block LOS 50%. The same ray which interestcs a "trunk" plane may black LOS 100%.
Right, but while the ray is a very precise way to measure LOS obstruction, it is also really just representative in effect. The actual TC or squad could probably see around either side of the trunk even if the ray passes right through it. However, if it's hitting multiple trunks then you're seeing an area that degrades LOS to where they could not see around or through, most likely. We treat "trunk" and "branches" and "leaves" as the same, as long as they're the same terrain type, figuring that there's already some error built into the precise location the ray is sent from and to vs. where the actual "eyes" of everyone in the spotting unit might be.
Not to mention that at the moment all the TCs focal planes are set at infinity with the enemy units having zero size extents. Some type of compromise will have to be made. Perhaps plane hits / distance indexed to the terrain type?
Not sure I follow you in entirety there, could you clarify and elaborate?
Erik Rutins
CEO, Matrix Games LLC

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/
Freedom is not Free.
CEO, Matrix Games LLC

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/
Freedom is not Free.
RE: Tree Improvement Project
Brilliant, Stridor. Thanks a million. I can now regrow the hair I had been pulling out over this.
After I crank out a bunch of new textures and turn the best existing model into a set of variations, I will post them up for testing.
My brief look into how the tree above worked in game showed that it didn't seem to be blocking LOS at the trunk. This was a very quick test, though. I would like these to add a realistic amount of cover as well as being a visual change.
I still have problems with textures not loading when exported from fM. I set the textures in "materials" and "textures". I select all the faces, then "assign material to selection". It shows up in the program, but not on export to the .x models.
After I crank out a bunch of new textures and turn the best existing model into a set of variations, I will post them up for testing.
My brief look into how the tree above worked in game showed that it didn't seem to be blocking LOS at the trunk. This was a very quick test, though. I would like these to add a realistic amount of cover as well as being a visual change.
I still have problems with textures not loading when exported from fM. I set the textures in "materials" and "textures". I select all the faces, then "assign material to selection". It shows up in the program, but not on export to the .x models.
"Fear is a darkroom where the devil develops his negatives" Gary Busey
RE: Tree Improvement Project
ORIGINAL: benpark
My brief look into how the tree above worked in game showed that it didn't seem to be blocking LOS at the trunk. This was a very quick test, though. I would like these to add a realistic amount of cover as well as being a visual change.
Remember .... Objects don't block LOS, they degrade the LOS by so many sighting factors based on the terrain type the ray crosses.
As an example, I'll go through a basic calculation on a sight ray passing in 1 hit, over light woods, woods, and heavy woods.
An infantry unit has 40 sighting factors (875m). The sighting rays (upper and lower) pass through 1 hit of blockage in the following trerrain type :
1. Light woods .... -2 per-hit ... new factor = 38 (750m)
2. Woods ........... -10 per-hit .. new factor = 30 (350m)
3. Heavy Woods . -15 per-hit .. new factor = 25 (225m)
As you can see, one tree model (single flat plane) in heavy woods won't block LOS until after 225 meter's. So, if you had 3 vertical planes for a tree model sitting in heavy woods you would degrade the sighting factor down by 45 points, which = 0 or 27 meters.
Anyway, IMO .... The more vertical planes the better!
In the screenshot below, if we were an infantry squad viewing the scene below, you can see how the trees block LOS. I can't estimate the range but you guys get the idea .... [:)].
Rob

- Attachments
-
- perhit.jpg (242.46 KiB) Viewed 411 times
RE: Tree Improvement Project
Ben,
Before you get finalized on your new tree models, I wanted to research the type of tree's you'll find in the Ukraine.
Below is a screenshot of the principal forest types in the Ukraine, also a percentage chart of where to find them.
I hope this helps [:)] ...

Before you get finalized on your new tree models, I wanted to research the type of tree's you'll find in the Ukraine.
Below is a screenshot of the principal forest types in the Ukraine, also a percentage chart of where to find them.
I hope this helps [:)] ...

- Attachments
-
- Ukraineforests.jpg (410.83 KiB) Viewed 411 times