Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [Tier 2/ Linux] How to create an object from height map and texture it properly?

Author
Message
CodeTrasher
12
Years of Service
User Offline
Joined: 18th Jul 2012
Location: Tampere, Finland
Posted: 16th Jul 2017 08:45
I'd like to test my generated height maps in AppGameKit but I'm not sure what's wrong.

I'm trying to generate an object from height map but I've been unable to pinpoint the problem.

I've been generating RGB height map with my command line tool, which generates PNG images and power of two in size. The CreateObjectFromHeightMap isn't working, it prints "Image couldn't been found" on the console but the command still generates some sort of height data on the plane, it just doesn't match the image provided. And if I'm trying to texture it with some image in correct size, the plane seems to be drawn with a sort chessboard graphics on it with red color in the center of the plane.

I'm not on the PC right now so I can't provide screenshots, code or the height map images, but I can do it later today or tomorrow.

Thanks for helping!
Mah machine: Intel Xeon E3-1231v3 4x3.40GHz | CM Hyper 212 Evo | ASRock H97 Pro4 | 240GB SanDisk SSD | Sapphire Radeon R9 270X Dual-X 2048MB | Seagate HDD 1000GB |
8GB Crucial Ballistix Sport DDR3-1600
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 16th Jul 2017 13:12
Quote: "The CreateObjectFromHeightMap isn't working, it prints "Image couldn't been found""

Well this would be the problem.

The heightmap you're getting is probably a heightmap taken from the default image that AppGameKit uses when it fails to load an image, which like you say is a kind of checkerboard thing with a big cross through the middle.

Are you sure the CreateObjectFromHeightMap call is getting the correct path to the heightmap file?
CodeTrasher
12
Years of Service
User Offline
Joined: 18th Jul 2012
Location: Tampere, Finland
Posted: 16th Jul 2017 15:01
Well, in the C++project I had copied the same heightmap image into root, media and executable directories, and none of these worked. I haven't tried this on Windows, yet.
Mah machine: Intel Xeon E3-1231v3 4x3.40GHz | CM Hyper 212 Evo | ASRock H97 Pro4 | 240GB SanDisk SSD | Sapphire Radeon R9 270X Dual-X 2048MB | Seagate HDD 1000GB |
8GB Crucial Ballistix Sport DDR3-1600
BraindeaD
16
Years of Service
User Offline
Joined: 30th Mar 2008
Location:
Posted: 16th Jul 2017 17:48
If you are in Linux pay attention to capitals and lower letters in the filename

Best regards
CodeTrasher
12
Years of Service
User Offline
Joined: 18th Jul 2012
Location: Tampere, Finland
Posted: 17th Jul 2017 06:16
Hi BraindeaD,

I have file names hard-coded currently, do that shouldn't be the issue. Thanks for the tip, though.
Mah machine: Intel Xeon E3-1231v3 4x3.40GHz | CM Hyper 212 Evo | ASRock H97 Pro4 | 240GB SanDisk SSD | Sapphire Radeon R9 270X Dual-X 2048MB | Seagate HDD 1000GB |
8GB Crucial Ballistix Sport DDR3-1600
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 17th Jul 2017 07:41
In linux filename's are case sensitive so if you try to open "Map.png" and the file on disk is "map.png" then it will fail
CodeTrasher
12
Years of Service
User Offline
Joined: 18th Jul 2012
Location: Tampere, Finland
Posted: 17th Jul 2017 08:20
I think I got it sorted. Apparently I had to call
command and set it to media folder manually.
Mah machine: Intel Xeon E3-1231v3 4x3.40GHz | CM Hyper 212 Evo | ASRock H97 Pro4 | 240GB SanDisk SSD | Sapphire Radeon R9 270X Dual-X 2048MB | Seagate HDD 1000GB |
8GB Crucial Ballistix Sport DDR3-1600

Login to post a reply

Server time is: 2024-11-24 11:27:14
Your offset time is: 2024-11-24 11:27:14