Aces High Bulletin Board

General Forums => Terrain Editor => Topic started by: F1Bomber on January 25, 2004, 09:09:42 PM

Title: AutoLevel Final Release
Post by: F1Bomber on January 25, 2004, 09:09:42 PM
Okay finaly finished up the autolevel program.

It will detect a object from the oba file, scan the elv file and apply the leveling of that terrian that the object is on.

This includes all objects.

The options that you can choose from are as follows.
Min atl ( Applys the lowest vertex to the square )
Max alt ( Apply the highest vertex to the square )
Average ( Adds up all vertex and then calcullates the average )
Middle Vertex ( Selects the middle vertex in the square and apply that alt to the rest )

You will need java Run time enviroment.

http://www.java.com

Its a exe so you dont need to worrie about command promt.

Comes with its own installer program.

Before testing out on your final map, make some test examples and see witch option you like for leveling. I personal recommend average because it makes it blend better into the terrian.

Download it here 6 megs.

http://www.bushtech.com.au/chads/install.exe

( If you want the source code send me off a email and i will send you the files )

( note. You accept the package as is )
Title: AutoLevel Final Release
Post by: United on January 25, 2004, 10:30:42 PM
Wonderful stuff youve got there.  I know it will get a lot of use from many mapmakers.  Good work! :) :)
Title: re: java runtime
Post by: reacher15 on February 03, 2004, 03:23:18 PM
when i try to install the auto leveler it wants a folder containing JRE 1.4.0_01....however when i went to the java web site it installed j2re 1.4.1_02 and i also have j2re 1.4.2_03 on  my system. can you let me know how to get that particular version.

Thanks

Reacher
Title: AutoLevel Final Release
Post by: Dux on February 03, 2004, 04:15:41 PM
That's fantastic, F1. I'm going to definitely check this out (tho I'm a complete newbie/idiot when it comes to Java).

Question: how hard would it be to program a similar utility that would detect roads, the source altitude, and the destination altitude, and apply an even slope between them?
Title: AutoLevel Final Release
Post by: artik on February 04, 2004, 01:16:40 AM
Where can I get exactly descriptions of formats of elv, obj files and other file formats in AH TE.
I think it will not be too hard even to make program that will put automaticly all spawn points between bases or even will make random base layout with zones and start objects when you will give as parameter the distances between bases etc. (for MAs not historical maps). I would really like to have and automatically spawn point maker or other feachers that could be usefull.
Auto altitude maker for MA maps etc..

So can I find exectly specifications of formats of these files?

Thank you
Title: re: java file
Post by: reacher15 on February 04, 2004, 09:56:31 AM
i found it and installed it. the program loaded no prob....first attemps don't seem to have an effect. i'll keep messing with it.

Reacher
Title: AutoLevel Final Release
Post by: F1Bomber on February 05, 2004, 06:06:10 AM
Sorry chaps i didnt know if anyone replyed to this theat until i actualy came back and had a look again.

Okay to answere some of the questions

the *.elv file is a array of 2 short.

for example.

short array[][]

Personal note that the elv file is actualy written little indian instead of big indian.

For example, C programs write data to the file little idian first, were java writes data big indian first.

So lets say you have a short data type.
C writes it out like 1000
Java Writes it out like 0001

C read it in like 0001
Java Reads it in like 1000


little indian = First Bit is the leading bit.
Big Indian = last bit is the leading bit.

I hope i got that correct.

Okay moving onto the *.oba file.
the oba file is basicaly ascii characters.

==============================

In reply to the actual spawn points and other matters, i am going to start writing my own terrian editing program. it includes the following abilitys.

AutoLevel Object on Terrian.
AutoAdd Spawn Points ( base on radar range )
AutoWeave and place Rivers and Roads.
GUI ( OpenGL 3D world editor )

===============

Going to have a look at the Installer again later today to make it more user friendly sorry for the late reply.
Title: AutoLevel Final Release
Post by: F1Bomber on February 05, 2004, 06:07:53 AM
Dux it would be pretty simple to make auto spawn points and auto resupply system done.
Title: AutoLevel Final Release
Post by: F1Bomber on February 05, 2004, 08:02:34 AM
Okay guys i found a better way of getting the program to you guys at a lower bandwidth consumption.

Download java any runtime enviroment.
http://www.java.com

Download the New EXE file.
http://www.bushtech.com.au/chads/AutoLevel.exe

If you have installed java it should run fine. Please post any suggestions for the program. I may be able to implment all of the above before aces high 2 comes out.

F6Bomber.
Title: AutoLevel Final Release
Post by: artik on February 05, 2004, 08:35:51 AM
Quote
Originally posted by F1Bomber
Sorry chaps i didnt know if anyone replyed to this theat until i actualy came back and had a look again.

Okay to answere some of the questions

the *.elv file is a array of 2 short.

for example.

short array[][]

Personal note that the elv file is actualy written little indian instead of big indian.

For example, C programs write data to the file little idian first, were java writes data big indian first.

So lets say you have a short data type.
C writes it out like 1000
Java Writes it out like 0001

C read it in like 0001
Java Reads it in like 1000


little indian = First Bit is the leading bit.
Big Indian = last bit is the leading bit.

I hope i got that correct.

Okay moving onto the *.oba file.
the oba file is basicaly ascii characters.

==============================

In reply to the actual spawn points and other matters, i am going to start writing my own terrian editing program. it includes the following abilitys.

AutoLevel Object on Terrian.
AutoAdd Spawn Points ( base on radar range )
AutoWeave and place Rivers and Roads.
GUI ( OpenGL 3D world editor )

===============

Going to have a look at the Installer again later today to make it more user friendly sorry for the late reply.

Thank you but some more questions.
oba file format.
It is text file - what each field means for object? Name, Index position etc. what coardinates do you have any spec?
Ground cover?
A lot of other things?

HITECH probably you have spec of these files?
Because just trying on blind - do not worst it?
Can you post specs of these files? Or it is private information of HTC?
Title: AutoLevel Final Release
Post by: F1Bomber on February 05, 2004, 09:06:20 AM
WATER 0, GRASS 1, GRASSY_ROCK 2, FARM 3, ROCK 4, and FOREST 5

Thats the DataTypes for the *.typ File.

I havent debuged the oba file as of yet.

But i will try.


C01VOD000,      city,     42272.031,         0.000,   -918865.268, 0.0000, 0.0000, 0.0000,      2560,    0,    0,   -1.00,    -1.0,        -1,   0,    0,    0,    0

Lets look at the first Data.

C01
This is what i am assuming for all of them.
C01 is the Field Number.

VOD is the Type of object

000 Is the number of objects on that Field.

So you have.
C01VOD000
C01VOD001
C01VOD002
C01VOD003
C02VOD000
C02VOD001
C02VOD002
C02VOD003

Okay next data.

City
Dont know about that one.

Okay next Data.
42272.031  = x position

Okay next Data.
 0.000 = alt

Okay next.
-918865.268 = y position.


6th 0.00000 = roll Each Degree is approximately 0.0174533
7th 0.0000 = Tilt Each Degree is approximately 0.0174533
8th 0.0000 = Rotate Each Degree is Approximately 0.0174533

There is a direct Corrilation between the array index and oba x and y posiitions.

Here is how you calculate the object double value down to the array middle even index.

Copy and past from autolevel program.

== Covert Array *.elv Index into object double position ==

if( ( row > 512) & ( col > 512) ){
realrow = (row - 512) * 2640;
realcol = (col - 512) * 2640;
System.out.println( row );
System.out.println( col );
}

if( ( row < 512) & ( col < 512) ){
realrow = (row - 512) * -2640;
realcol = (col - 512) * -2640;
System.out.println( row );
System.out.println( col );
}

if( ( row > 512) & ( col < 512) ){
realrow =(row - 512) * 2640;
realcol =(col - 512) * -2640;
System.out.println( row );
System.out.println( col );
}

if( (row < 512) & (col > 512) ){
realrow =(row - 512) * -2640;
realcol =(col - 512) * 2640;
System.out.println( row );
System.out.println( col );


== Covert Double object position back to *.elv array index==

public void convertback( double row, double col ){
   double realrow = 0;
   double realcol = 0;

   if( ( row > 0) & ( col > 0) ){
   realrow = (row / 2640 ) + 512;
   realcol = (col / 2640 ) + 512;
   }

   if( ( row < 0) & ( col < 0) ){
   realrow = ( row / 2640) + 512;
   realcol = ( col / 2640) + 512;
   }

   if( ( row > 0) & ( col < 0) ){
   realrow = ( row / 2640) + 512;
   realcol = ( col / 2640) + 512;
   }

   if( (row < 0) & (col > 0) ){
   realrow = ( row / 2640) + 512;
   realcol = ( col / 2640) + 512;
   }
Title: AutoLevel Final Release
Post by: F1Bomber on February 05, 2004, 09:08:27 AM
I built another program that converted a bmp image into the typ file, not that hard really.

Everthing is currently on hold until aces high 2 comes out. Then i will start making the new java GUI 3D Terrian Editor.
Title: AutoLevel Final Release
Post by: F1Bomber on February 05, 2004, 09:11:44 AM
Okay on the mission for dux.

0,Type
2,Flags
-1,ResourceType
161,DestFieldIndex
-1,SourceFieldOrObjectIndex
26400.000000,SrcRadius
26400.000000,DestRadius
Road to F162
6,PntCnt
241560,0,-99000
241560,0,-88440
225720,0,-88440
225720,0,-83160
215160,0,-83160
215160,0,-72600

Dux it seems pretty easy actualy to do this, dont know if you want it done rgiht now but i will go though it with ya.

6,PntCnt = number of roads.

241560,0,-99000
241560,0,-88440
225720,0,-88440
225720,0,-83160
215160,0,-83160
215160,0,-72600

Roads Terrian Index.
x,alt,y

So actualy this would be very easy to actualy do.

Here is a picture without editing code what the results will be like before and after applying the average with the autolevel.

http://www.bushtech.com.au/chads/Typicaly.JPG
http://www.bushtech.com.au/chads/After.JPG

http://www.bushtech.com.au/chads/Typicaly2.JPG
http://www.bushtech.com.au/chads/After2.JPG

Just wondering do you want it to automaticaly add the rivers and roads in or, just level them off.
Title: AutoLevel Final Release
Post by: F1Bomber on February 05, 2004, 09:41:06 AM
Just re-read your post.

Very easy dux. i will get onto it when i get some free time, let you know when i get around to it.
Title: AutoLevel Final Release
Post by: Dux on February 05, 2004, 10:37:01 AM
That's just amazing, F1. :)

At this moment, I was just curious about whether it could be done or not. I wouldn't need anything right away, so don't rush on anything for me.

btw, I've been able to open TYP files in Photoshop, using "Open As... RAW". It works really well, especially when you can overlay it on the elevation map to assist in assigning ground textures.
Title: AutoLevel Final Release
Post by: F1Bomber on February 05, 2004, 10:55:54 AM
Personaly I think all of these options should of allready been pre-programed into the terrian editor of aces high. Its the main reason why we dont see many Map in rotation. The editor is very hard and very repeative somthing that a machine does 10 times better than a human.

But alas, I think when i was building the donut map for the MA that most of my time was spent doing the following.

Leveling terrian.
Bluring and re-leveling terrian.
Seeing if those roads go into the rivers.

WHY OF (**@#U$( GOD doesnt it detect a 10 feet elivation change with object on it.

manualy placing tile types, did this for 24hrs and then found out an easyer way of doing it.

Re-applying hieghtmaps.

Placing fields and spawn points.

255 * 3 spawn points each = 765 different spawn points to place.

The tottal sum of making a map is bellow.

Okay i got acouple of questions about map making lets do some of the maths first.
 
Each square is 1X1 mile in area.
 
Each square contains 9 vertexes.
 
+-----+-----+
-      -       -
+     +      +
-      -       -
+-----+------+
 
As the above diagram shows.
 
Now to place a field you need to do this.
 
Click objects.
Click Group to place.
Click on map were to place Field.
Click Add Group.
Select Field Number.
Select Zone Number.
 
To place the next field you have to.
Click map location.
Click add group.
Select Field number.
Select Zone Number.
 
So thats on average 5 Clicks to place 1 field.
Now there is about 250 fields on each map.
 
250 * 5 = 1250 Clicks.
 
Next you need a terrian for your map. So you build one with a 2D editor like photoshop. You finaly agree on your design and you import it into aces high.
 
Now each objects needs to be placed on a level Terrian or your map wont work.
 
This means the following.
Field
Town
Strat Targets
VH
 
Each town, field and strat targets, vh need to be level.
To level 1 town, you need to do the following.
 
Check all 9 vertexes in the square, decide on a average number for them.
So 9 clicks there.
Next Apply the vertext, Select all vertex and click apply.
 
You got about 3 objects to a field.
(10 * 250 ) * 3) = 7500 clicks.
 
 
Next you need to add gv spawn points.
 
Select EntPnt.
 
Click Add Group.
Click Field Number
Click Zone Number
Click object Type = Select gv entry.
 
Clicks = 4
 
250 fields, all have about 3 spawn points each.
 
250 * 3 = 750.
 
Finaly tottal without worring about zone problems and other things is a net result of.
 
7500 + 2500 + 1250 = 11,250

 
So if you want to be a map maker, Sit down open up the first picture look at it constantly and click 11,250 times. And mabe at the end of it all you may have a terrian to look at.
 
I have killed 2 mouses during the map project the other one its ball inside the mouse actualy broke into 2 pieces.

all.
Title: AutoLevel Final Release
Post by: Raptor on April 03, 2004, 08:18:50 PM
Im having a bit of trouble with the auto level. I have successfully used it before without problems, but now it is not working. I read the java script thing that said to go to mpower.net/executor/ and I downloaded the demo. On its "how to" file it told me to click and drag it on my other Java file which I did, it opened up the auto leveler and still does not work. It is telling me it leveled the terrain but on my actual map nothing has changed when I open it.
Title: AutoLevel Final Release
Post by: F1Bomber on April 06, 2004, 08:33:28 AM
Okay i got reports of people having problems with it working then not working again.

Did you leave 1 square distance from the Main Field, Vh, and the town?
Title: AutoLevel Final Release
Post by: Raptor on April 07, 2004, 12:01:50 AM
ah thats probably it. I thought it was something to do with my java program. Great program! really makes ya lazy:aok
Title: AutoLevel Final Release
Post by: F1Bomber on April 07, 2004, 01:29:45 AM
Actualy i am working on a new 3D world editor for making aces high terrieans.

Still in beta phase but its coming along nicly.

Same interface as the current aces high editor but with some major overhaul of the way things are done but still it makes terrieans like the old one.

you can pain the water and it will level the water and the seroundings land. You can even paint water and it wont level it to 0 instead it will give you an option to level at different alts. So rivers and other things flowing through mountains become much easer to do.

Much easyer building and development interface.

The hightmap is done is 2 different stages. first you can import a dem file and use it as a layer, like photoshop editing. You creat the terriean base on layers and you can easy move a whole mountain by creating it on a single layer then move that layer around and copy and past if you wish.

So i am hoping this will help people develop terrieans. They could, when the program is finished. Creat about 20 layers of different landmasses and then merge them all into 1 single map by just moving it around by the 3D world.

Though, i rather shut my trap just now dont want to give up anyones hope on it.

Doing this and doing my degree in Computer Science, only this year to go before i get my computer science. This is the reason why i have been slow doing any more development work on this.

Dont want to get hitech and crew a wrong assumption that i may get this finish, its a project and i am hoping i will complete it.

f1bomber.
Title: AutoLevel Final Release
Post by: straffo on May 07, 2004, 04:00:57 AM
F1Bomber the trial period of the installer you used has expired.
Title: AutoLevel Final Release
Post by: F1Bomber on May 10, 2004, 01:32:42 AM
ouch!

Will see what i can do.

Pretty bzy right now so may take me acouple of days to get it updated.

Wonder if anyone actualy uses this anymore?
Title: AutoLevel Final Release
Post by: straffo on May 10, 2004, 01:44:55 AM
I didn't use the installer , it was just a reminder :)

I'm trying to build a MA map but the Editor keep crashing and crashing and ....

I guess I'll give up quite fast !
Title: AutoLevel Final Release
Post by: NHawk on May 10, 2004, 08:31:33 AM
Quote
Originally posted by straffo
I didn't use the installer , it was just a reminder :)

I'm trying to build a MA map but the Editor keep crashing and crashing and ....

I guess I'll give up quite fast !
At what point does it crash?

Be sure all of your tiles/textures are 256 color 8 bit. And be sure your terrain name is all small letters and 8 characters in length.
Title: AutoLevel Final Release
Post by: BenDover on May 10, 2004, 08:40:05 AM
and no dots before the .extenstion either.

found out the hard way ah doesn't like dots.
Title: AutoLevel Final Release
Post by: detch01 on May 10, 2004, 09:32:04 AM
Quote
Originally posted by F1Bomber
ouch!

Will see what i can do.

Pretty bzy right now so may take me acouple of days to get it updated.

Wonder if anyone actualy uses this anymore?


Bomber, go to inno setup (http://www.innosetup.com)  for a freeware install builder. I've used it and it's not too bad.


Cheers,
Title: post it
Post by: DOODY on May 16, 2004, 07:27:18 PM
f1 why not publish it on ah-terrains.com?