Skip to main content
GameDev.net gamedev.net
🔒 Locked

creating .raw

Started by jreh Oct 17, 2005 at 10:48 PM 4 replies 850+ views
Original Post
jreh
jreh
I was wondering how to create a .raw file for a height map. I've looked around on the web and am still unsure. What programs? Share/freeware if possible.
Daaark
Daaark
.raw is just raw data. PSP can create them. The filetype contains exactly what the extension says, raw data. Just dump your data into a file, and you have a .raw file.
jfclavette
jfclavette
If what you want is a real simple image format, you can look into PPM
I teleported home one night; With Ron and Sid and Meg; Ron stole Meggie's heart away; And I got Sydney's leg. <> I'm blogging, emo style
skullbonez
skullbonez
You can use photoshop to edit/create these. Here is an example of how they are used:

http://www.simoneschbach.com/Data/SkullbonezCore/SkullbonezCoreSource.zip
T1Oracle
T1Oracle
A .raw file just has the raw pixel data, it doesn't contain the dimensions, the number of colors (or bits per pixel), or anything else. If you have a chunk of pixel data, just dump it into a file, add the .raw extension and you have a .raw file. If you want to create your own format, I think the simpliest setup is creating a header that has the width, height, and the bits per pixel. After that header you could dump in the pixel data just as it occurs in RAM. So your file would have 3, 32-bit unsigned ints, followed by a stream of unsigned 8-bit bytes. You don't need to include the size because width*height*bits_per_pixel/8 = number of bytes of pixel data.
Programming since 1995.
codehunter13
codehunter13
with terragen ,you can create a landscape and export it as a raw heightmap

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.