Jump to content
MarkusR

Terrain Height

Recommended Posts

why did the min height not allowed negative values?

can not make a hole in my current level for the new water plane.

Share this post


Link to post

Because the terrain heightmap is a gray scale image ranging from 0 (black) to 255 (white). 0 is the lowest height level therefore you cant go in reverse (lower than that). The only thing you can suggest is an initial height setting which would put the ground at 127 (middle height) for instance. This way you can sculpt both up and down from the initial height.

Share this post


Link to post

hmm ok, i had expected a heightmap is only used to create the initial mesh.

i think i can export the heightmap image, change it and import it again, then pull the scene up.

Share this post


Link to post

I would create a mid-tone (127 gray) bitmap and always import it before starting a new terrain.

  • Upvote 2

Share this post


Link to post

hm, i can load this raw file into my graphics app but the raw save file i can not load back into engine...

also seems bmp is not supported at import. because 8bit only.

Share this post


Link to post

@gamecreator,in photoline it looks good, i made it brighter there but the raw export there is more a camera format.

Share this post


Link to post

You may want to give another program a try, like Gimp. Maybe XnView does it too. I'm also happy to convert it for you after work if you want to PM me an image file.

 

One thing you can also check is to make sure the raw file from Leadwerks matches the size of the one from your program. It should be the same exactly.

Share this post


Link to post

@gamecreator, thanks for your offer. i wrote a simple converter for level up my map.

 

(source code in monkey)

Import mojo
Import brl
Import brl.FileSystem
Function Main:Int()
Local f:FileStream
Local f2:FileStream
f=FileStream.Open("monkey://data/hmap.r16", "r" )
f2=FileStream.Open("monkey://internal/hmout.r16", "w" )
Print f.Length()
Local short:Int
While Not f.Eof()

short=f.ReadShort()
short=short+1024
f2.WriteShort( short )
Wend
f.Close()
f2.Close()
Return 1
End

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...