Map Database  •  FAQ  •  RSS  •  Login

Load image in Kroms

<<

Ben

User avatar

Former Site Admin

Posts: 3814

Joined: 08 Jan 2009, 23:00

Location: California - Pacific Time (UTC -8/-7 Summer Time)

Post 13 Apr 2009, 18:06

Load image in Kroms

Okay, in Kroms map editor, you can use 'load image' under relief to elavate the map. It doesn't work to well for me. Does anyone have any ideas on how to use this?

Thanks.
I used to spam this forum so much...
<<

Krom

User avatar

Knights Province Developer

Posts: 3281

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 13 Apr 2009, 18:16

LOL, it does work well for me, does anyone knows what am I doing wrong?
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 13 Apr 2009, 18:21

Works for me..
But it does work a bit strangely, when I dumped all height data from a map into a picture and loaded it as heightmap, the height ended up being different
Not what I expected...
<<

Krom

User avatar

Knights Province Developer

Posts: 3281

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 13 Apr 2009, 18:39

Since I never planned support for height dumpers .... perhaps you messed ushort with 0..100 KaM range byte...
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 13 Apr 2009, 18:53

I just ripped them from a map and put them into a bitmap like so:

byte height = readbyte();
pixture.setPixel(x,y,new Color(height,height,height));

for every pixel
<<

Krom

User avatar

Knights Province Developer

Posts: 3281

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 13 Apr 2009, 19:21

Shame on you if you can use dumper, but can't figure out how to recreate height data :wink:
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 13 Apr 2009, 19:22

Yea I guess but how do I do it then? What value does the heightmap reader use?
<<

Krom

User avatar

Knights Province Developer

Posts: 3281

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 13 Apr 2009, 19:30

Ghm... should I suggest you to try 0..255 gradient? Thats easiest way to fugure it out :wink:
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

Ben

User avatar

Former Site Admin

Posts: 3814

Joined: 08 Jan 2009, 23:00

Location: California - Pacific Time (UTC -8/-7 Summer Time)

Post 13 Apr 2009, 23:43

I still don't get it. Could someone show me a picture so I can see what you are talking about?
I used to spam this forum so much...
<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 13 Apr 2009, 23:55

Converted to PNG for web - convert back to BMP for Kroms editor
Image

Idea for Krom: also support PNG please? Or do you read the picture manually?
<<

Krom

User avatar

Knights Province Developer

Posts: 3281

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 14 Apr 2009, 04:34

Idea is that lighter color means higher elevation, and each pixel represents one tile of terrain. Bitmap should match map size, but that's not mandatory, you still can experiment with smaller/bigger bitmaps. To be honest I didn't tried to recreate elevation patterns in Photoshop and apply them to terrain, otherwise I would have written a tutorial. Still thats a feature and with some skill it can be used to advantage.

@Harold: I use Grpahics.TBitmap.LoadFromFile, it reads most of BMP formats well. I could add Jpeg, but that would be stupid, cos it's a lossy format and we have pixel data here. PNG - I don't have png loader for Delphi, but even if I had - there's not much gain in using it for 144x144x8 pics.
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 14 Apr 2009, 11:51

Ok anyway, what's the deal here, you divide the height from the bitmap by 2.5 or something? Why? You just lose precision and range that way..
<<

Krom

User avatar

Knights Province Developer

Posts: 3281

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 14 Apr 2009, 12:03

Maybe because KaM uses 0..100 range for height and I like to keep it that way :wink:
Do you want me to clip it to 0..100 or what?
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 14 Apr 2009, 12:08

Lol no that would be worse :lol:
edit: no forget that, I thought about it again and I think clamping it to 0..100 would make it easier
So ok. I guess the exact multiplier is 2.55, correct?
Oh and there is a feature that would be much nicer than PNG support.. Loading the height map at a different tile than left top. Mainly for mountains which are hard to draw by hand..
<<

Ben

User avatar

Former Site Admin

Posts: 3814

Joined: 08 Jan 2009, 23:00

Location: California - Pacific Time (UTC -8/-7 Summer Time)

Post 08 Oct 2009, 03:00

You mean I actually have to DRAW that? Ouch well never mind then won't be using load image :lol:
I used to spam this forum so much...

Return to “General Talk”

Who is online

Users browsing this forum: No registered users and 0 guests