DSP(5)
π DSP(5) β the displacement map file format, bestie edition
okay so before we even start: this is a page from the User Commands manual, section 5, and it's about the dsp file format. buckle up, it's actually so simple it's iconic. π
β¨ NAME β¨
dsp β the DSP binary file format, aka your displacement map. periodt. π
πΈ FORMAT πΈ
so a dsp (displacement map) file is literally just sequences of cells (points) that make up a rectangular grid of network unsigned short ints living in the X-Y plane. every single cell's value tells you that cell's height above Z = 0 β like a little topographic vibe check for every point. π¦
each cell value ranges from 0 to 65535. no cap, that's the whole range.
the first cell in a dsp file is the lower left corner of the grid of cells. then the cells go left to right across each row, and the rows themselves get written from the bottom to the top of the grid. so it's bottom-left, scoot right, next row up, scoot right again β like reading a book but the book is upside down and also a heightmap. π
grid dimensions are:
- width β the number of cells in the X direction
- length β the number of cells in the Y direction
β οΈ important heads up: dsp grids are rectangular, but the dimensions cannot be determined by the file size. like, the file literally will not tell you. rude of it, honestly.
so the common practice (and honestly the slay-est move) is to include the grid dimensions in the filename, like this:
dsp-1-20W30L.dsp
see what they did there? 20 wide, 30 long. iykyk. π
and at some time in the future, dsp files may get self-typing headers so that parameters such as their dimensions can be automatically determined by using programs. future us is eating good, but current us is stuck naming files. π
π FILES π
file.dsp
π¦ SEE ALSO π¦
asc2dsp(1)pix(5)- and above named programs.
π AUTHOR π
the BRL-CAD Team. legends, honestly. π«Ά
π COPYRIGHT π
This software is Copyright (c) 2012-2026 United States Government as represented by the U.S. Army Research Laboratory.
π BUG REPORTS π
found a bug? a problem? something lowkey not slaying? reports of bugs or problems should be submitted via electronic mail to:
devs@brlcad.org
okay bye bestie, go forth and heightmap responsibly π
β¨ β this has been the BRL-CAD DSP(5) page, section 5, see you in the next one π§πΈ
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms