Matrix Games Forums

New Fronts are opening up for Commander: The Great WarCharacters of World War 1Sign of for the Pike and Shot Beta!More Games are Coming to Steam! Deal of the Week: Combat Command Return to the Moon on October 31st! Commander: The Great War iPad Wallpapers Generals of the Great WarDeal of the Week Panzer CorpsNew Strategy Titles Join the Family
Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

RE: Tree Improvement Project

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [Current Games From Matrix.] >> [Discontinued Games] >> Panzer Command: Kharkov >> Maps, Models and Mods >> RE: Tree Improvement Project Page: <<   < prev  1 [2] 3 4   next >   >>
Login
Message << Older Topic   Newer Topic >>
RE: Tree Improvement Project - 2/14/2009 11:47:59 PM   
benpark


Posts: 3791
Joined: 8/12/2002
From: New Haven, CT
Status: offline
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


(in reply to benpark)
Post #: 31
RE: Tree Improvement Project - 2/15/2009 1:21:06 AM   
Mad Russian


Posts: 12392
Joined: 3/16/2008
From: Texas
Status: offline
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 reply to benpark)
Post #: 32
RE: Tree Improvement Project - 2/15/2009 2:10:43 AM   
Erik Rutins

 

Posts: 32881
Joined: 3/28/2000
From: Vermont, USA
Status: offline
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
Director of Product Development


For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.

(in reply to Mad Russian)
Post #: 33
RE: Tree Improvement Project - 2/15/2009 2:25:23 AM   
benpark


Posts: 3791
Joined: 8/12/2002
From: New Haven, CT
Status: offline
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.

_____________________________

"Fear is a darkroom where the devil develops his negatives" Gary Busey


(in reply to Erik Rutins)
Post #: 34
RE: Tree Improvement Project - 2/15/2009 3:34:25 AM   
Mad Russian


Posts: 12392
Joined: 3/16/2008
From: Texas
Status: offline
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

(in reply to benpark)
Post #: 35
RE: Tree Improvement Project - 2/15/2009 4:22:33 AM   
Stridor


Posts: 5077
Joined: 9/8/2007
Status: offline
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.

(in reply to Mad Russian)
Post #: 36
RE: Tree Improvement Project - 2/15/2009 7:23:42 PM   
benpark


Posts: 3791
Joined: 8/12/2002
From: New Haven, CT
Status: offline
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?

_____________________________

"Fear is a darkroom where the devil develops his negatives" Gary Busey


(in reply to Stridor)
Post #: 37
RE: Tree Improvement Project - 2/15/2009 7:37:24 PM   
Mad Russian


Posts: 12392
Joined: 3/16/2008
From: Texas
Status: offline
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

(in reply to benpark)
Post #: 38
RE: Tree Improvement Project - 2/15/2009 9:20:20 PM   
Mraah

 

Posts: 1084
Joined: 2/20/2008
Status: offline
quote:

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.

quote:

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


< Message edited by Mraah -- 2/15/2009 9:22:24 PM >

(in reply to Mad Russian)
Post #: 39
RE: Tree Improvement Project - 2/15/2009 10:17:12 PM   
Mad Russian


Posts: 12392
Joined: 3/16/2008
From: Texas
Status: offline
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


< Message edited by Mad Russian -- 2/15/2009 10:18:11 PM >

(in reply to Mraah)
Post #: 40
RE: Tree Improvement Project - 2/15/2009 11:41:48 PM   
Lieste

 

Posts: 1815
Joined: 11/1/2008
Status: offline
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.

(in reply to Mad Russian)
Post #: 41
RE: Tree Improvement Project - 2/15/2009 11:48:53 PM   
Mraah

 

Posts: 1084
Joined: 2/20/2008
Status: offline
quote:

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.

quote:

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


< Message edited by Mraah -- 2/15/2009 11:49:51 PM >

(in reply to Mad Russian)
Post #: 42
RE: Tree Improvement Project - 2/16/2009 12:36:52 AM   
Erik Rutins

 

Posts: 32881
Joined: 3/28/2000
From: Vermont, USA
Status: offline
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
Director of Product Development


For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.

(in reply to Mraah)
Post #: 43
RE: Tree Improvement Project - 2/16/2009 12:53:52 AM   
Mraah

 

Posts: 1084
Joined: 2/20/2008
Status: offline

quote:

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

(in reply to Erik Rutins)
Post #: 44
RE: Tree Improvement Project - 2/17/2009 2:55:13 AM   
benpark


Posts: 3791
Joined: 8/12/2002
From: New Haven, CT
Status: offline
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.

Attachment (1)

_____________________________

"Fear is a darkroom where the devil develops his negatives" Gary Busey


(in reply to Mraah)
Post #: 45
RE: Tree Improvement Project - 2/17/2009 2:55:43 AM   
benpark


Posts: 3791
Joined: 8/12/2002
From: New Haven, CT
Status: offline
Image of what I'm rambling on about (note the horrible texture downsampling...):




Attachment (1)

< Message edited by benpark -- 2/17/2009 2:56:31 AM >


_____________________________

"Fear is a darkroom where the devil develops his negatives" Gary Busey


(in reply to benpark)
Post #: 46
RE: Tree Improvement Project - 2/17/2009 5:56:34 AM   
benpark


Posts: 3791
Joined: 8/12/2002
From: New Haven, CT
Status: offline
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.




Attachment (1)

< Message edited by benpark -- 2/17/2009 6:01:02 AM >


_____________________________

"Fear is a darkroom where the devil develops his negatives" Gary Busey


(in reply to benpark)
Post #: 47
RE: Tree Improvement Project - 2/17/2009 6:12:17 AM   
benpark


Posts: 3791
Joined: 8/12/2002
From: New Haven, CT
Status: offline
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).




Attachment (1)

< Message edited by benpark -- 2/17/2009 6:23:04 AM >


_____________________________

"Fear is a darkroom where the devil develops his negatives" Gary Busey


(in reply to benpark)
Post #: 48
RE: Tree Improvement Project - 2/17/2009 7:22:35 AM   
Rick

 

Posts: 12072
Joined: 4/20/2000
Status: offline
Looks like you're making progress though! Great!

Thanks
Rick

(in reply to benpark)
Post #: 49
RE: Tree Improvement Project - 2/17/2009 12:42:04 PM   
Erik Rutins

 

Posts: 32881
Joined: 3/28/2000
From: Vermont, USA
Status: offline
That latest batch looks excellent, great work so far!

_____________________________

Erik Rutins
Director of Product Development


For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.

(in reply to Rick)
Post #: 50
RE: Tree Improvement Project - 2/17/2009 3:24:12 PM   
benpark


Posts: 3791
Joined: 8/12/2002
From: New Haven, CT
Status: offline
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.

_____________________________

"Fear is a darkroom where the devil develops his negatives" Gary Busey


(in reply to Erik Rutins)
Post #: 51
RE: Tree Improvement Project - 2/17/2009 11:24:53 PM   
Stridor


Posts: 5077
Joined: 9/8/2007
Status: offline
quote:

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.




Attachment (1)

< Message edited by Stridor -- 2/17/2009 11:27:11 PM >

(in reply to benpark)
Post #: 52
RE: Tree Improvement Project - 2/17/2009 11:31:28 PM   
Stridor


Posts: 5077
Joined: 9/8/2007
Status: offline

quote:

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.


(in reply to Erik Rutins)
Post #: 53
RE: Tree Improvement Project - 2/18/2009 12:18:47 AM   
Erik Rutins

 

Posts: 32881
Joined: 3/28/2000
From: Vermont, USA
Status: offline

quote:

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
Director of Product Development


For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.

(in reply to Stridor)
Post #: 54
RE: Tree Improvement Project - 2/18/2009 12:37:37 AM   
Rick

 

Posts: 12072
Joined: 4/20/2000
Status: offline

quote:

ORIGINAL: Erik Rutins


quote:

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

(in reply to Erik Rutins)
Post #: 55
RE: Tree Improvement Project - 2/18/2009 12:56:04 AM   
Stridor


Posts: 5077
Joined: 9/8/2007
Status: offline
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.



(in reply to Rick)
Post #: 56
RE: Tree Improvement Project - 2/18/2009 2:05:54 AM   
Erik Rutins

 

Posts: 32881
Joined: 3/28/2000
From: Vermont, USA
Status: offline
quote:

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.

quote:

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?




< Message edited by Erik Rutins -- 2/18/2009 3:00:01 AM >


_____________________________

Erik Rutins
Director of Product Development


For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.

(in reply to Stridor)
Post #: 57
RE: Tree Improvement Project - 2/18/2009 6:43:25 AM   
benpark


Posts: 3791
Joined: 8/12/2002
From: New Haven, CT
Status: offline
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.

< Message edited by benpark -- 2/18/2009 7:11:43 AM >


_____________________________

"Fear is a darkroom where the devil develops his negatives" Gary Busey


(in reply to Erik Rutins)
Post #: 58
RE: Tree Improvement Project - 2/18/2009 7:56:16 AM   
Mraah

 

Posts: 1084
Joined: 2/20/2008
Status: offline
quote:

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




Attachment (1)

(in reply to benpark)
Post #: 59
RE: Tree Improvement Project - 2/18/2009 8:01:20 AM   
Mraah

 

Posts: 1084
Joined: 2/20/2008
Status: offline
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 ...




Attachment (1)

< Message edited by Mraah -- 2/18/2009 8:02:06 AM >

(in reply to benpark)
Post #: 60
Page:   <<   < prev  1 [2] 3 4   next >   >>
All Forums >> [Current Games From Matrix.] >> [Discontinued Games] >> Panzer Command: Kharkov >> Maps, Models and Mods >> RE: Tree Improvement Project Page: <<   < prev  1 [2] 3 4   next >   >>
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.113