About Store Forum Documentation Contact
Donations:
289$/mo



Post Reply 
Area size in Terrain import
Author Message
rstralberg Offline
Member

Post: #1
Area size in Terrain import
Hi. More questions on terrain import.

I created a terrain in L3DT

Terrain size 256x256 with 1 meter resolution
That would then in E2 be with an area size of 64 be
256/64 = 4 areas if I have understod things correctly

[Image: e11.PNG]

Setting the SizeX = SizeY = 4 in the import dialog
gives 5 'steps' in the viewer. Is that correct.
I though each square would be 64 pixels.

[Image: e12.PNG]

The import goes well but I dont understand the
size=4 while its 5 in the viewer.
08-22-2014 03:23 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Zervox Offline
Silver Supporter

Post: #2
RE: Area size in Terrain import
if I am not mistaken this is due to 0 counting at area(0,0) so areas should be 3.
08-23-2014 12:07 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
RE: Area size in Terrain import
Hi,
It's because the formula is calculated like that in this case :
Area rect.max=rect.min+size;
And then the rect is processed with min and Max inclusive, so you end up with 1 more square.
I may adjust this behavior to ignore the last square for next release.
08-23-2014 02:02 AM
Find all posts by this user Quote this message in a reply
rstralberg Offline
Member

Post: #4
RE: Area size in Terrain import
Thank's for the explanation.
Then I understand why the area has to be one less then what it would be.
No problem with that when I know why smile
08-23-2014 10:14 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
RE: Area size in Terrain import
Thank you,
I've just commited a change to the source to make it more intuitive.
Now size=4 will affect only 4 squares.
08-24-2014 05:00 AM
Find all posts by this user Quote this message in a reply
rstralberg Offline
Member

Post: #6
RE: Area size in Terrain import
Yes. That makes more sense.
Thank's smile
08-24-2014 01:19 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply