Page 3 of 5

Re: TerrainEditor Utility

Posted: 2010-11-14 21:31:58
by demer928
monster wrote:v3.2.0 is out, adding some ability to edit links. Hope you like it...
Excellent..................!!!!!!!!!!!!
5 Min's into it in IRAN and now I can show\erase the Error's of the past!!!!

http://i632.photobucket.com/albums/uu49 ... 8/te-1.jpg

Now we can see that the obj. links are to dense (HiLighted in Blue) the correct link's are HiLighted in Red.!!!
IF you give the GTM too many way's to get there then she get's confused and stall's\stutter's or CTD's......
We DONOT have to linlk every objective togather.We DO have to Link the Pri\Sec..........though.
AND remember ONLY city's\town's can be Pri\Sec.
The GTM will look out from there and see if that depot\ armybase\factory\etc ............ is worth capturing.
Hint.......RecalcParentDepth.

Enuff for now..........You'll get IT eventually.

THANK'S Monster.............Thank's again!!!!!!!!!!........you are almost there with this Tool!!!!! :)

Regard's
demer

Re: TerrainEditor Utility

Posted: 2010-11-14 22:30:52
by Luk
Thanks for the update Monster.
Is it possible to add one new feature into the next version please? :oops:
I would like to show selected objectives only. Perhaps add one more button -" show selected only" or something.

I started to make an "objectives table" in the past. But I realized, I must do it "tile related", not just "direction/junction type related". My problem is, that I have N-S one or two spanned bridge for example, but the objective did not match all tile types. It matches W-E plain river tile for example, but not W-E river in the city (it is located outside "bridge path" then - it is moved - half placed in water, half placed in the city for example). So I must use specific objective ID for river-in-the-city tile, and another for plain-river etc. The GU are stacked when bad objectives used.
It sounds simple, but I can not to check proper objectives in default AF Balkan/Korea - it is encrypted.
Ok, I can make some terrain test. I can fill the segment 16*16 with specific tile, then fill the area with various bridge objectives and check in F4 3D world. But it is VERY time consuming. (Imagine terrain compileing, changes, object placement...uff)

So I have tried to place many bridges in one tile(one over another). I launched your TE then. I can see bridge objectives, placed over my tile. The only problem is, I can see them all or none of them. But in case I would be able to turn some of them on/off, I can find the proper one!
I am sorry for long post. Just wanted to explain it is quite important for me...

Thanks again.
Luk

Re: TerrainEditor Utility

Posted: 2010-11-15 00:12:45
by monster
No problem Luk, that's easy... expect an update tomorrow... :D

Re: TerrainEditor Utility

Posted: 2010-11-15 00:21:38
by Luk
You are the Monster Superhero! :D
Luk

Re: TerrainEditor Utility

Posted: 2010-11-15 00:25:46
by Polak
No problem Luk, that's easy... expect an update tomorrow...
Tomorrow.... :roll: :roll: :roll:
What time you got in Europe now. Not too late to crank out something before sunset.... or sunrise at the worse. :mrgreen:

You are a real Champ monster and I cannot wait to grab some time to continue have a fun with your great and continuing to be even greater Tool.

Re: TerrainEditor Utility

Posted: 2010-11-15 01:33:20
by demer928
Luk wrote:Thanks for the update Monster.
Is it possible to add one new feature into the next version please? :oops:
I would like to show selected objectives only. Perhaps add one more button -" show selected only" or something.

I started to make an "objectives table" in the past.
Thanks again.
Luk
Why???
Placing a 3D model on the MAP has nothing to do with how the Code calculate's it!?!?!? It (the CODE) Does'nt care about the MODEL in the 2D World!!!!!!!!!!!!
Objective is an OJECTIVE word in Falcon!!!!!!!

jeez' where's ED1 when ya' need him???????????

demer

Re: TerrainEditor Utility

Posted: 2010-11-15 13:39:54
by Luk
Thanks Monster, it works great!

demer, we can continue there:
viewtopic.php?f=63&t=22318&p=185897#p185897

Luk

Re: TerrainEditor Utility

Posted: 2010-11-16 18:33:31
by monster
New version, adding the ability to open/edit/save Allied Force tac/cam files plus some bugfixes.

Re: TerrainEditor Utility

Posted: 2010-11-16 18:55:23
by Sherlock
monster wrote:New version, adding the ability to open/edit/save Allied Force tac/cam files plus some bugfixes.
Absolutely Wow! Thank you!

Re: TerrainEditor Utility

Posted: 2010-11-16 19:24:35
by monster
Thanks Sherloc. :D

Rereading my previous post, I really hope I didn't give the impression that it can edit the whole tac/cam file. TerrainEditor only edits objectives data from tac/cam files, it's not a replacement for tacedit. Sorry for any misunderstanding.

Re: TerrainEditor Utility

Posted: 2010-11-17 23:31:26
by Fighting Falcon
hello monster as I feared .... I got to 256 in Set, from now on every set I enter all the tiles are mixed. :(
and really sad not to move this threshold :?
you can only replicate what we already .
you could add more in Set to freefalcon?


rudy

Re: TerrainEditor Utility

Posted: 2010-11-18 17:29:49
by monster
Unfortunately, although I could enter more than 256 sets in TerrainEditor without any problem, when I tried to fly in Falcon above the area of the new tiles I entered (these that belong to sets above 255), I got a CTD (in OF).

Variable wise, there shouldn't be any problems, because the variable that is used to store the number of sets, is long integer (4 bytes, 32 bits) with a theoretical maximum of 4.294.967.295 sets (or 68.719.476.720 tiles). What I believe is, that this value is limited in the code because of the L0 and L1 tile values.

The L1 tile values are calculated by adding 4.096 to the corresponding L2 tile value. For L0 the value to add is 8.192. I believe, the code checks if the value that is called to display is between the following ranges, to get the tile from the corresponding source:

Code: Select all

  0  <=  Tile   <  4096     -->    Gets the Tile from L2 (L*.dds)
4096 <=  Tile   <  8192     -->    Gets the Tile from L1 (M*.dds)
8192 <=  Tile   <  12288    -->    Gets the Tile from L0 (H*.dds)
So, as you can see, if you have a tile number bigger than 4095 (so it belongs to a set bigger than 255), Falcon assumes that it is a L1 tile, will subtract 4096 from the value, and try to load the corresponding M*.dds.

As an example, lets say we have tile 4099 (Set 256, fourth tile). When Falcon gets this number (when you enter the L2 radius), assumes L1 and tries to load the corresponding tile 4099-4096=3. If tile #3 is defined in theater.bin, you will see the M version of tile #3, otherwise a CTD. When you enter the L1 or L0 radius, you'll probably get a CTD.

I tested the above and actually saw tile #1 instead of #4097 and when I got closer I had a CTD. To conclude, of course this is an exe edit fix and has nothing to do with TerrainEditor.

Re: TerrainEditor Utility

Posted: 2010-11-19 09:27:01
by Luk
New version, adding the ability to open/edit/save Allied Force tac/cam files plus some bugfixes.
Does it mean it is able to open default AF (Balkan/Korea) tac file? :shock: Did not realized this patch is so breakthrough before!
I have got "Run-time error '9': Subscript out of range message, when doing so.
I am sure I had some similar (but perhaps different?) error message when tried to open European tac file (it is rather SP4 file). On the fifth try I was able to open it in the past (copied some additional files as idx, wch, thr and PAK into the campaign folder).
But now, I am opening the tac file located in the default campaign folder (full of files- all of them there).


Luk

Re: TerrainEditor Utility

Posted: 2010-11-19 14:27:50
by monster
The old error you are talking about makes sense, because, TerrainEditor needs other files as well to display a tac file.

The AF error, I don't know. I managed to open AF tac (version 83) and AF cam (version 84) files without any problem. Which theater are you talking about?

Re: TerrainEditor Utility

Posted: 2010-11-19 14:55:26
by Luk
The AF error, I don't know. I managed to open AF tac (version 83) and AF cam (version 84) files without any problem. Which theater are you talking about?
I tried basic Balkans te_new.tac - 390 135 sized, 3.11.- 2005 1:16 for example. But got the same error with other scenarios.
I will try to copy my DDS folder into the AF install. Perhaps full campaign folder is not enough (perhaps it looks even for something else..).

BTW Thank you very much for this feature. Can not wait to watch the objectives!!! :D
Luk

Re: TerrainEditor Utility

Posted: 2010-11-19 15:25:16
by Luk
WOW! Can not believe it!
BTW that AF icon is cool! :D

Sorry for silly questions, just wanted to know if it's really possible first.
I don't want to mod anything in default theaters(just watching), so no problem I opened installed theater.

thanks, thanks, thanks..........and thanks :!:
Luk

Re: TerrainEditor Utility

Posted: 2010-11-19 18:22:28
by monster
You' re welcome :D

I assume you managed to open it finally, correct?

One condition, in order to open a tac is to have opened first the corresponding theater. So to open an AF Balkans tac (or cam), you must select the AF Balkans theater at the beginning of the program. The reading of the tac is depending on the theater's database, that's why you should open the correct theater before.

Re: TerrainEditor Utility

Posted: 2010-11-19 19:20:29
by Luk
I assume you managed to open it finally, correct?
Yes.
One condition, in order to open a tac is to have opened first the corresponding theater. So to open an AF Balkans tac (or cam), you must select the AF Balkans theater at the beginning of the program. The reading of the tac is depending on the theater's database, that's why you should open the correct theater before.
I did it this way since beginning. Just copied the folders into the external HDD. I had TDFs, LST, full "objects", "terrain" and "campaign" folders. I was able to open the terrain and use all program's features except TAC loading. I don't know what files were missing.
So I have coppied DDS textures into the C: AF texture folder and opened the terrain from the install folder without problems . I wanted to avoid this for two reasons before - 1. my c: is chronically full, 2. I was feared for my AF install.
But OK, no problem - I used just search function and similar...and additional 56MB of DDS textures is not so big problem for my C: drive
:wink:

Luk

Re: TerrainEditor Utility

Posted: 2010-11-19 21:15:56
by monster
Nice to hear it Luk. But you were right the first time about the problem. I released v3.2.3 that fixes the previous bugs. Sorry about that. It seems that for Balkan and other Korean theaters, a separate 3d folder was used, apart from the normal object folder, and I wasn't taking it into account before. Now it should be ok.

You can copy the whole C:\Program Files\Lead Pursuit\Battlefield Operations folder into another drive and open that location with TerrainEditor. The program doesn't care about registry values etc (for AF, since you open it manually). You have to have a valid folder tree though, with the correct files in it, since TerrainEditor reads the theater definition file (tdf) and tries to find the assets it needs in the correct folders. The only exception for AF is that it looks for an additional texture folder with the DDS files (like OF-FF).

Re: TerrainEditor Utility

Posted: 2010-11-20 00:11:06
by demer928
BTW You can use SeasonSwitcher to convert the .pcx to .dds that TE use's............... :wink:

Now, about that darn .uni file........HUH???? How you coming with that????
HAHAHA!!!!...just kidd'n!!! :mrgreen:
AWESOME tool M8!!!

Many,Many Thank's Again,
demer

Re: TerrainEditor Utility

Posted: 2010-11-29 08:53:49
by Fighting Falcon
hi Monster,

your utility and really very useful we have ended the new ground of the Balkanis,
but we have a small problem, on the elevations airport 3d.

the airports and the tracks are almost all lifted by earth

which the best solution for us?

the elevations of the track and in LOD 0?

Thanks monster for what you are doing. :)

Re: TerrainEditor Utility

Posted: 2010-11-29 19:50:00
by monster
Hi Fighting Falcon,

If I understood correctly, you have a problem with the airports, not being on the ground. You should try and level the terrain that airports are occupying. This should be done at L0 but it's better to be done for all Lxs as well. If you are building the terrain with MakeTerrain, you can edit the L0 and create a Fixed Elevation File, to apply the same elevation to the specific area(s) in all Lxs.

Re: TerrainEditor Utility

Posted: 2010-11-29 22:10:35
by Fighting Falcon
ok thanks monster solved ....... :D

Re: TerrainEditor Utility

Posted: 2010-11-30 10:49:44
by Luk
Hi Monster. How to update all terrain LODs using L2 file please?
I have the complete terrain stored/setted for Terrain editor. I can mod it via graphic UI, fly in 3D. Everything works fine.

But I still use old TV program as well. I copied my latest L2 file into the terrain folder, TE uses. So now, I have latest L2 file mixed with the older Lx files. I want to update all the LODs using the L2(similar to old SPTinstall process). I looked at "make/mod terrain" interface - it is lookingfor "component" files or L0 file.
Is it possible to do what I wanna please?
I want to use a simple linear algoritmus for vertex interpolation.

Sorry for stupid question.

Thanks
Luk

Re: TerrainEditor Utility

Posted: 2010-11-30 20:59:18
by monster
Do you want to rebuild the whole terrain folder? Which Falcon setup are you using? Do you want to make fartiles as well?

Normally, MakeTerrain is the one you need but I need more info to tell you exactly what to do.

PS. There are no stupid questions AFAIK, only stupid answers. :D

Re: TerrainEditor Utility

Posted: 2010-11-30 21:20:51
by Luk
Do you want to rebuild the whole terrain folder?
Yes.
Which Falcon setup are you using?
AF
Do you want to make fartiles as well?
Yes.
I want ti fix the normals as well.
:D

Thanks

Luk

Re: TerrainEditor Utility

Posted: 2010-12-01 11:38:29
by monster
Unfortunately, the things are a bit difficult for AF. There is no way at this point to make the fartiles for it and that's the only problem. You could take a look in here to make L0-2 and use the No Fartiles option in MakeTerrain, but you won't get the L3-5.

Maybe your best shot is to go with standard tools like SPTInstall and SeasonSwitcher, or any version of them suitable for AF.

Re: TerrainEditor Utility

Posted: 2010-12-01 14:32:25
by Luk
OK Monster, I will try it. Lx and fartiles processing is not so big problem. It is quite fast even if older utils used(SPTinstall). But normal fixes are the most time consuming (besides it is limited to 128 theater only if lxnormalfix used - no comments please) .
The task is just to fix normals.
----------
All right, then SPT installed terrain files placed into the active folder (besides t2,L0 and tga files*) and maketerrain started(no fartiles, fix normals checked)- the result would be fixed normals for L0-L2. But here are still ufixed L3-5 files if I understand you correctly.

*- extracted from my previously SPTinstalled terrain

- I guess simple Mean Method is linear interpolation ??? - my L2 elevations should not be affected then, Ok?.

Is it possible to fix L3-L5 normals separately? I guess "Yes", via the modterrain program.
--------------

OR perhaps the best is to fix all LOD files via mod terrain. No need to use Maketarrain. :idea:

The mentioned Maketerrain process would be used, if advanced LO elevations used only.


Luk

Re: TerrainEditor Utility

Posted: 2010-12-01 14:47:31
by Sherlock
Just to add my 2 cents in.

Remember that normals for AF are calculated differently than those for OF and FF. In AF the normal values (X3 in TerrainView) range from 0-255 while in OF/FF they range from 0-90. That is why Fred (aka BaldEagle) had to add the functionality to LxNormalFix to do AF terrain.

Re: TerrainEditor Utility

Posted: 2010-12-01 16:13:20
by monster
If you have all Lxs made by SPTInstall, you can use ModTerrain to just fix normals. Just select the Fix Normals option with all Lxs selected,

BUT!!!!

As Sherlock said (thanks for the info Sherlock), the normals would be wrong for AF, since ModTerrain uses the FF/OF normal calculation procedure.

@Sherlock. Are you sure for OF/FF the limit for X3 is 90. I thought it is 63.

Re: TerrainEditor Utility

Posted: 2010-12-01 17:56:24
by Luk
In AF the normal values (X3 in TerrainView) range from 0-255 while in OF/FF they range from 0-90.
Do we need program update?
Or - is it possible just to fill higher number into the "Max Normal Angle" field?

For OF/FF the default (prefilled) valueis 52 (max is 63 or 90).
Wild thaught - what about 220 for AF terrain. It is possible to fill such a high value.

Luk

Re: TerrainEditor Utility

Posted: 2010-12-01 19:32:46
by Sherlock
monster wrote:@Sherlock. Are you sure for OF/FF the limit for X3 is 90. I thought it is 63.
@Monster: You are correct. My notes were unclear on whether it was 63 or 90 and it's been over 3 years since I looked at the subject so I couldn't remember for sure. Thanks for clarifying that.

Re: TerrainEditor Utility

Posted: 2010-12-01 20:56:12
by monster
No Luk, that 52 value is a different thing, so I guess we need a program update :D .

From ModTerrain readme:

Code: Select all

2.4 Normals for a tile, is normally a vector, perpendicular to the surface of 
    the tile. While this usually is expressed as the length of the projection of
	the vector on each axis (Nx, Ny	and Nz), in Falcon is expressed as two 
	angles, theta and phi (spherical coordinates). The theta value is the angle 
	of the added Nx and Ny projections with the West-East axis, as 	we see it 
	looking the terrain from above. The phi angle, is the angle produced from the 
	normal vector with the Up-Down axis, as we look from the side. Both theta and
	phi angles are "normalized" to fit in a single byte. The theta angle (range 
	0 to 2*pi rads) is normalized to a value from 0-255. The phi angle (range 0 
	to pi/2 rads) is normalized to a value from 0-63. During my tests, I found 
	out that the original Korea theater, uses a range for phi angle between 0 to
	0.52 rads (about 30 degrees) to normalize from 0-63. All values above 0.52 
	rads is converted to 63. With this in mind, I added a parameter for this 
	MAX_PHI value which replaces the 0.52 rad value. This is evaluated when the 
	program is calculating the terrain normals and ranges between 0.02 rad (1 deg)
	and 1.57 rad (90 deg). The actual parameter for the program is this value in
	rads, multiplied by 100 (e.g. for 1.57 rads you should put in the parameter 
	157)
Thanks to Sherlock for spotting the difference for AF (I never thought about it) and verifying the 63 value.

Re: TerrainEditor Utility

Posted: 2010-12-02 00:39:55
by demer928
monster wrote:No Luk, that 52 value is a different thing, so I guess we need a program update :D .

..and that would include a GroundUnit interface................ :?:


Just kidd'n.......great work as it is!!!!!!

demer
(Just a thought though, could you add a Links On\Links Off Switch.......?)
Doooh!!!!Just found it..........man I'm gett'in old!!!!!!......now about those pesky GU's......HUH,HUH...... :mrgreen:

Re: TerrainEditor Utility

Posted: 2010-12-02 07:32:36
by Fighting Falcon
Hi Monster,

I have corrected elevations of 21 aereoportis.
other tracks year elevations of various level disarranged....hard job to systematize.
would visualizare be possible 3d in lod 0?

to systematize and to fly every time and frustrating..
if you have a suggestion and welcome.
just systematized elevations aereoporto release the Balkanis theater.
hi to everybody.

Ps: Hi Demer...... when we fly in sieme???? :mrgreen:

Re: TerrainEditor Utility

Posted: 2010-12-05 17:58:25
by monster
@Fighting Falcon,

Sorry but I could not understand the problem. You can preview in 3d the L0. When you hit the Terrain 3d button and you are in L0/ELV mode, the data that are displayed are from L0. Otherwise the elevation data are from L2. Additionally, if you have the objectives loaded and displayed, they will be displayed in 3d as well (e.g. the airports) as lines on the terrain, so you can see where your objectives are.

Re: TerrainEditor Utility

Posted: 2010-12-05 18:00:17
by monster
New version out there, 3.2.4 (No GU yet, sorry... :D ).

Some features were added. Luk you can try now to calculate the normals with ModTerrain in AF.

Re: TerrainEditor Utility

Posted: 2010-12-05 19:37:46
by Fighting Falcon
monster wrote:@Fighting Falcon,

Sorry but I could not understand the problem. You can preview in 3d the L0. When you hit the Terrain 3d button and you are in L0/ELV mode, the data that are displayed are from L0. Otherwise the elevation data are from L2. Additionally, if you have the objectives loaded and displayed, they will be displayed in 3d as well (e.g. the airports) as lines on the terrain, so you can see where your objectives are.

hi monster.
I have all the lifted aereoportis and I don't know how come..
I would want to put again a new elevation but they stay always lifted.. I have exported file.e0 and imported with the command.. and shared with all the lods but nothing...
what and sucesso?
how am I able rimrttere of the spot-on elevasionis?

thanks...

Ps: to care the lods 2 as it was lod zero and possible?

Re: TerrainEditor Utility

Posted: 2010-12-05 21:26:30
by demer928
@FightingFalcon,
The 6 to 9 Airbase Tiles that the Airbase model sits on need to be all at the same elevation.For good measure I level the 12 to 16 surrounding tile's to that of the AB tile's... :wink: Falcon is sensitive to TRANSITIONS, be it Elevation's\Path's ...etc. in the terrain wire frame.Dunno why,just MHO.
Also are your AirBase Objective Flags set correctly????? (In TacEdit)

Just some thought's to maybe help,
demer

@Monster....COOL Ruler!!!!!! Will be VERY useful in establishing a 2 Fronted War!!!! i.e. #set MinDistance for FLOT or whatever the H*ll that externalised Bool duz' ..........HAHAHAHA!!!! 8-)

Re: TerrainEditor Utility

Posted: 2010-12-06 15:55:05
by Fighting Falcon
hi monster.

I have made some tests and install balkans pmc originalever ver.1

after I have made a change and referred the whole ground.

the result and that after having referred the ground downfall,they break in various parts, some aereoportis in elevation.

I have tried both in RMS method, w.it interpolates, angle 52
but the problem remains. :?
the problem sebra lelaborazione of the elevations

this and that that I can tell you, thanks

hi monster