Tree Improvement Project
Moderator: EagleMountainDK
RE: Tree Improvement Project
Rick- I'm going to have to compare them, but it's my goal to keep them as low as I can. These are just the first steps.
"Fear is a darkroom where the devil develops his negatives" Gary Busey
RE: Tree Improvement Project
Alright, I have a day to deal with this again (and maybe part of Sunday).
After looking at a few schemes, I think the complex 3D model of the tree isn't working. The lighting ends up reflecting in odd ways on the planar "leaves", and we risk taking a bit of a hit for the lower end users with little return.
I am trying different textures on the existing 2-plane rectangular models we now have, and they look good in fM so far. If anyone knows the answer to these following problems, it would help a great deal:
I am having some issues with the way the game handles alpha channels. In fM, you can set the color for a transparent area. Does this over-ride any alpha settings? Or is it better to just do the alpha channel in PSD? If PSD is the solution, what are the best settings to save as- .bmp, .dds etc. PzC has 3 different texture types for trees(!), though one must be the LoD one.
After looking at a few schemes, I think the complex 3D model of the tree isn't working. The lighting ends up reflecting in odd ways on the planar "leaves", and we risk taking a bit of a hit for the lower end users with little return.
I am trying different textures on the existing 2-plane rectangular models we now have, and they look good in fM so far. If anyone knows the answer to these following problems, it would help a great deal:
I am having some issues with the way the game handles alpha channels. In fM, you can set the color for a transparent area. Does this over-ride any alpha settings? Or is it better to just do the alpha channel in PSD? If PSD is the solution, what are the best settings to save as- .bmp, .dds etc. PzC has 3 different texture types for trees(!), though one must be the LoD one.
"Fear is a darkroom where the devil develops his negatives" Gary Busey
RE: Tree Improvement Project
ORIGINAL: benpark
Alright, I have a day to deal with this again (and maybe part of Sunday).
After looking at a few schemes, I think the complex 3D model of the tree isn't working. The lighting ends up reflecting in odd ways on the planar "leaves", and we risk taking a bit of a hit for the lower end users with little return.
I am trying different textures on the existing 2-plane rectangular models we now have, and they look good in fM so far. If anyone knows the answer to these following problems, it would help a great deal:
I am having some issues with the way the game handles alpha channels. In fM, you can set the color for a transparent area. Does this over-ride any alpha settings? Or is it better to just do the alpha channel in PSD? If PSD is the solution, what are the best settings to save as- .bmp, .dds etc. PzC has 3 different texture types for trees(!), though one must be the LoD one.
Ben,
The reason why PzC has some many different texture types is the following.
The game engine wants everything in dds (DXT1 bit alpha) for video memory reasons. However as you have noticed this is a compressed format which does some compression damage to your original pure/pristine source textures. For this reason K released the source textures as bmps and pngs so users would have their original source to make changes to.
Unfortunately this really swelled the size of PC for very very little benefit (most true moders are gonna start from scratch anyway).
So in terms of the engine you want do all transparency in your dds (eg via your nvidia photoshop plugin). However make sure you set your fM material settings correctly:
Diffuse 0xFF FF FF FF
Ambient 0xFF FF FF FF
Specular 0xFF 00 00 00
Emissive 0xFF 00 00 00
Shininess 1
Transparency 0%
This way it will be consistent with all the new model lighting and work in different lighting conditions.
As a special note lets assume that you were building a House which had lights on in the window at night. Then you would define a window material as
Diffuse 0xFF FF FF FF
Ambient 0xFF FF FF FF
Specular 0xFF 00 00 00
Emissive 0xFF 7F 7F 40
Shininess 1
Transparency 0%
This would give a slight yellow glow to the window at night!
Likewise lets assume you wanted to do a factory fresh tank which was shiny from the factory then
Diffuse 0xFF FF FF FF
Ambient 0xFF FF FF FF
Specular 0xFF FF FF FF
Emissive 0xFF 00 00 00
Shininess 32
Transparency 0%
This will give the tank strong highlights on its textures! (or you could do this for a window or bino glass, etc)
Howvever as no stock model (or mod model) has yet done any of that, and there were lots of emissive and specular errors in the code, my fix up program basically defaulted all the materials to the very first set of numbers so at least everything was reasonable and consistent and worked in different lighting conditions. However a good texture/material designer can do better for the future I think.
Regards
S.
RE: Tree Improvement Project
Thanks for that, it will help keep the trees from looking like they are made of shiny tin!
The .dds processing is brutal on the sharpening. I'm trying to get rid of as much black background "fringe" around the model as possible, but the .dds plugin keeps resharpening it back. I've tried multiple blurs on alpha layers to try to fool it, but it keeps coming back. The picture below is the best I could get it thus far.
These are the two intersecting, very low poly tests. Rick, these are probably going to run faster than the current ones, as those utilize 3 or more extra faces.
I fired up CM last night, and re-noticed that the trees look pretty good as plain billboards (as another possible option). There are lots of ways to do this, so I will get some more done then put up samples for gauging what people prefer in the future (as my schedule will allow).

The .dds processing is brutal on the sharpening. I'm trying to get rid of as much black background "fringe" around the model as possible, but the .dds plugin keeps resharpening it back. I've tried multiple blurs on alpha layers to try to fool it, but it keeps coming back. The picture below is the best I could get it thus far.
These are the two intersecting, very low poly tests. Rick, these are probably going to run faster than the current ones, as those utilize 3 or more extra faces.
I fired up CM last night, and re-noticed that the trees look pretty good as plain billboards (as another possible option). There are lots of ways to do this, so I will get some more done then put up samples for gauging what people prefer in the future (as my schedule will allow).

- Attachments
-
- Untitled1.jpg (89.17 KiB) Viewed 335 times
"Fear is a darkroom where the devil develops his negatives" Gary Busey
RE: Tree Improvement Project
Hey - thanks Ben! - one of these days I'll reak down and buy a faster rig.
Rick
RE: Tree Improvement Project
Edit- never mind, I figured it out. Like most problems, it was the user.
When facing the camera, the billboard test looks pretty good. I wonder if the simplest solution isn't maybe the best in this case. We gain lots on the processing for lower spec comps, the tree models don't look like a vehicle after an accident and they are (fairly) simple to make.
When facing the camera, the billboard test looks pretty good. I wonder if the simplest solution isn't maybe the best in this case. We gain lots on the processing for lower spec comps, the tree models don't look like a vehicle after an accident and they are (fairly) simple to make.
"Fear is a darkroom where the devil develops his negatives" Gary Busey
RE: Tree Improvement Project
The same tree, billboard version:


- Attachments
-
- Untitled1.jpg (90.55 KiB) Viewed 338 times
"Fear is a darkroom where the devil develops his negatives" Gary Busey
RE: Tree Improvement Project
Last for today- a version that is made up from 4 faces. I must have changed the lighting between the first and second two screen shots, but this gives an impression of what the basic shapes might be.


- Attachments
-
- Untitled1.jpg (178.8 KiB) Viewed 338 times
"Fear is a darkroom where the devil develops his negatives" Gary Busey
RE: Tree Improvement Project
ORIGINAL: benpark
The same tree, billboard version:
Ben,
The trees are looking good.
You may want to test the "billboard" trees in the game ... I don't know how the dynamic LOS would behave when it's a rotating flat plane. I'm thinking it would block LOS in reference to it's initial palcement on the map ... and 90 degrees from that facing it wouldn't block LOS.
[&:]
Rob
RE: Tree Improvement Project
Hmmm. Good point.
Maybe the models need be adapted in some fashion to allow more LOS around the trunk area, and less in the leafy area. Like a "T" shape. I've seen some of the models have this form, so I'll try some tests on those in a few days.
Maybe the models need be adapted in some fashion to allow more LOS around the trunk area, and less in the leafy area. Like a "T" shape. I've seen some of the models have this form, so I'll try some tests on those in a few days.
"Fear is a darkroom where the devil develops his negatives" Gary Busey
RE: Tree Improvement Project
I seem to have forgotten how to make a plane two-sided in MS3D (and fM) so that both sides can be textured. Anyone know?
"Fear is a darkroom where the devil develops his negatives" Gary Busey
- Mad Russian
- Posts: 13255
- Joined: Sat Mar 15, 2008 9:29 pm
- Location: Texas
RE: Tree Improvement Project
Now understand I have no idea how this all works....but could you have the tree be in the program but not displayed in 3D?
In other words, could you have the tree in the computer but have it display as a billboard? Would that save on anything or would that be too complicated?
Good Hunting.
MR
In other words, could you have the tree in the computer but have it display as a billboard? Would that save on anything or would that be too complicated?
Good Hunting.
MR
The most expensive thing in the world is free time.
Founder of HSG scenario design group for Combat Mission.
Panzer Command Ostfront Development Team.
Flashpoint Campaigns: Red Storm Development Team.
Founder of HSG scenario design group for Combat Mission.
Panzer Command Ostfront Development Team.
Flashpoint Campaigns: Red Storm Development Team.
- Erik Rutins
- Posts: 39637
- Joined: Tue Mar 28, 2000 4:00 pm
- Location: Vermont, USA
- Contact:
RE: Tree Improvement Project
Regarding your lighting/reflection issues with the trees, IIRC we had to turn that off for the trees in order to get them to look decent, while keeping it on for other models. Keep at it, I agree that trees are one of the visual weak spots in the original release.
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
Thanks, Erik. This is a tough balance between keeping the models low triangle/poly and making something that actually look realistic.
MR, everything that we see in the game itself must exist as a 3d model or texture that gets loaded into our computers memory in order for it to show up in the game and allow interaction. The billboard method (that CM uses) looks pretty good, but we have a problem in the way that LoS is traced.
It's actually a good problem to have regarding game-play, as each tree blocks LoS (if I understand correctly). In CM, an entire area would be designated as "woods", and individual "trees" exist only as eye pleasing representations of an abstract idea.
In PzC, we have a bit of specificity of where trees actually are, married with some of the abstract idea of an entire "woods" area (simulating things like brush etc. So WYSIWYG is a bit more true for this aspect of PzC, but there is some imagination required when picturing a wooded area.
At least this is my understanding of it through making maps and models. I may be incorrect on any number of aspects.
MR, everything that we see in the game itself must exist as a 3d model or texture that gets loaded into our computers memory in order for it to show up in the game and allow interaction. The billboard method (that CM uses) looks pretty good, but we have a problem in the way that LoS is traced.
It's actually a good problem to have regarding game-play, as each tree blocks LoS (if I understand correctly). In CM, an entire area would be designated as "woods", and individual "trees" exist only as eye pleasing representations of an abstract idea.
In PzC, we have a bit of specificity of where trees actually are, married with some of the abstract idea of an entire "woods" area (simulating things like brush etc. So WYSIWYG is a bit more true for this aspect of PzC, but there is some imagination required when picturing a wooded area.
At least this is my understanding of it through making maps and models. I may be incorrect on any number of aspects.
"Fear is a darkroom where the devil develops his negatives" Gary Busey
- Mad Russian
- Posts: 13255
- Joined: Sat Mar 15, 2008 9:29 pm
- Location: Texas
RE: Tree Improvement Project
That's my understanding of the differences in how the two systems work as well. What I'm asking is can you do the trees where the computer sees them to do the LOS checks but have them display as billboards?
Or is there even any value in doing it that way?
Good Hunting.
MR
Or is there even any value in doing it that way?
Good Hunting.
MR
The most expensive thing in the world is free time.
Founder of HSG scenario design group for Combat Mission.
Panzer Command Ostfront Development Team.
Flashpoint Campaigns: Red Storm Development Team.
Founder of HSG scenario design group for Combat Mission.
Panzer Command Ostfront Development Team.
Flashpoint Campaigns: Red Storm Development Team.
RE: Tree Improvement Project
Just use LODS!
Billboards are broken in the game, they work on in SE but not in the game.
Needs to be patched.
Regards
S.
Billboards are broken in the game, they work on in SE but not in the game.
Needs to be patched.
Regards
S.
RE: Tree Improvement Project
The LOD models that are in the PzC folder seem to be just one plane. If the engine doesn't utilize billboards, how should I go about making them? A smaller replica of the original? Making two separate models for each tree is going to be more work than I can do at this point (until the summer). If it's a single plane for the LOD or a simple resize of the original, no problem. As is, we need about 10-15 different tree types to create a decent forest.
How big can the up close models be without lower spec users having a slow down? How far off unti these cut out to the LOD models?
How big can the up close models be without lower spec users having a slow down? How far off unti these cut out to the LOD models?
"Fear is a darkroom where the devil develops his negatives" Gary Busey
- Mad Russian
- Posts: 13255
- Joined: Sat Mar 15, 2008 9:29 pm
- Location: Texas
RE: Tree Improvement Project
Are all trees in PC the same height?
Does the game only check LOS through the trunk or do the leaves interrupt LOS as well?
Good Hunting.
MR
Does the game only check LOS through the trunk or do the leaves interrupt LOS as well?
Good Hunting.
MR
The most expensive thing in the world is free time.
Founder of HSG scenario design group for Combat Mission.
Panzer Command Ostfront Development Team.
Flashpoint Campaigns: Red Storm Development Team.
Founder of HSG scenario design group for Combat Mission.
Panzer Command Ostfront Development Team.
Flashpoint Campaigns: Red Storm Development Team.
RE: Tree Improvement Project
ORIGINAL: Mad Russian
Are all trees in PC the same height?
No .... The Pck trees have 2 or 3 heights. The _a after the name is usually the tallest .... _c is the smallest. The _b varient sometimes is different.
EDIT : If the tree is "taller" it will block higher than a smaller tree ... yes.
ORIGINAL: Mad Russian
Does the game only check LOS through the trunk or do the leaves interrupt LOS as well?
I've been told this and tested it too ...
It checks LOS through the model polygons ... or polygon plane. A basic tree model is like the cross hatched look ... # ... viewed from top.
The image on the polygon isn't considered.
The LOS check (I'm told) starts by seeing what the underlying A/I map color is. Then, it checks "vertically" to see if there is a polygon passing through through the sight ray.
In the case where it looks like the LOS is blocked by the trunk and not the leaves it's because the leaves "might" not have any A/I color under them since they overhang a "clear" part of the map. I say "might" because I'm not too sure ... It appears to behave in that manner, from my observations.
Hope that explains it [&:],
Rob
- Mad Russian
- Posts: 13255
- Joined: Sat Mar 15, 2008 9:29 pm
- Location: Texas
RE: Tree Improvement Project
So, does that mean that summer trees block more LOS sight rays than winter trees?
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?
Good Hunting.
MR
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?
Good Hunting.
MR
The most expensive thing in the world is free time.
Founder of HSG scenario design group for Combat Mission.
Panzer Command Ostfront Development Team.
Flashpoint Campaigns: Red Storm Development Team.
Founder of HSG scenario design group for Combat Mission.
Panzer Command Ostfront Development Team.
Flashpoint Campaigns: Red Storm Development Team.