dispgen - A New program for creating Displacements

C

CannonFodder

Guest
Dispgen will create a half-life2 displacement map from a height map image.
It can read common image formats along with 16bit grayscale tif and pgm images.

Download @ http://www.chaosincarnate.net/cannonfodder/cftools.htm

Here are some of the features of dispgen

All processing is done using 16 bit grayscale images. 8-bit images (including 24/32 bit fullcolor images,
are converted to 16 bit grayscale images before creating the terrain. All scaling and smoothing is done using 16 bit grayscale.
This can be used to eliminate the stair steps in generated terrain caused by having only 256 levels of gray.

I use a bicubic interpolation scaling algorithm. This generates a better image if the size of terrain is significantly
different from the size of the texture image.

Alpha maps can be generated using images, base on the height of the texture or based on the slope (0-90 degrees)

Dispgen includes an algorithm (pat. pending) for fixing texture stretching on the vertical parts of the terrain.
This can stretch the textures in weird ways, so you may or may not like it

dispgenrc1.gif


Dispgen contains an internal gaussian smoothing algorithm. If you read an 8 bit image and generate a terrain,
the terrain will have stairsteps. Dispgen converts all images to 16 bit grayscale and can run smoothing
on the image after the conversion. This will remove the steps in the terrain even when an 8-bit image is used.
The following image shows the results of running smooth on an standard 8-bit image.
Dispgen can also read 16-bit grayscale pgm and tif images. In this case no smoothing is required.

dispgenscaled.gif


Dispgen also includes an algorithm to fix texture stretching. As terrain rises vertically it stretches the texture so that the texture
looks lower resolution on hills than it does on the ground. Dispgen contains an algorithm which will adjust the terrain to minimize
stretching. The following image shows the results of terrain adjustment. This can do weird things to more complicated terrains, so use with care.

dispgendisplacement.gif


Here is a terrain I generated using this tool. This is 256 displacement maps and is 26Kx26K units in width
(The car in the front should give you an idea of scale).

crossfire.jpg


BTW, I know about Nem's tool. This is just another alternative.
 
looks pretty cool, except won't the maps be really slow with ultra smooth disp maps?
 
dispgen generates vis blocking, so like everything else it all depends on how you make your maps. My example ran above 100fps on a 9600xt (The picture is from a geforce2 card)
 
Hazar, Displacementmaps are *really* cheap on the engine.

That map you got there could be really really *really* fun with some custom vehicles (Brush?), a garage or two and some objectives.

Edit; Did I mention I'm impressed? Even if I don't have any use for this currently a *LOT* of mods out there will be happy. You should drop www.badgeofblood.com a line.
 
when i finally get off my ass to make a map ill probably use this to do displacement maps on them
 
only 18 downloads so far! i am appaled!


You've done great work and you truly are a god among men.


Oh, and i dont mean to hijack your thread or anything, if you want this removed just say, but WorldMachine would be a very good tool to use complimenterary with dispgen.
 
Any chance you could put the map up for download?

:D
 
Shens said:
Any chance you could put the map up for download?

:D

I already did. The heightmap used to generate that map is included in the examples directory. Just rebuild it yourself.
 
ok, that looks like amazing work you've done. I am no programmer so I dont know whether what I am about to suggest is feasable. But when I first saw the 3d skyboxes the first thing I thought of was seamlessly connecting the 3d skybox with the actual map. So that for instance you could have lower definition mountains in the distance in the skybox but then be able to drive there and climb them, but have the draw distance on the actual map lowish as to keep framerates good, and most of the long distance viewing in the skybox.

Thats an awful explanation, I might try to explain it better if you dont understand. but something that would generate 1/16 size low detail terrains from a set of linked fullscale ones would be handy maybe.
 
I don't believe that the skybox is ever accessable to the player. The 3d skybox is rendered from a virtual camera and is mapped over the skybox texture you put around your map. I'm not sure... but I think you could make the edges of your map meet the skybox model exactly(someone correct me if I'm wrong), but you can never actually touch it (not with the standard HL2/CS code at least).

Back to the thread, this awesome piece of program. I haven't tried it, but it looks very cool. I plan to try it out in the near future. Cheers, mate.
 
Yes, you can connect them seamlessly.

I've actually been thinking if you can combine the 3D skybox with the actual map, when it's about non-world (Detail) brushes of larger size...
 
this is really nice.. just one question..
i tried to create one of those bigass maps.. but im only geting the error, to many prop details... and then it cant continue... because it cant find myBigAssMap.bsp :/..
 
Christ on a bike, CannonFodder's outdone us all again.

Definately going to download this when I get on my modding computer.

Oh, and I'm deeply indebited to you for the MDL decompiler. Thanks to it, I've got Stalkers in my version of Half-Life that don't crash the game.

-Angry Lawyer
 
Amazing job, man!

You wouldn't be interested by any chance to join the Black Mesa: Source team ? IF you are, email me or denzil because we are currently without host :/
 
I'm still getting the mfc71.dll error after placing it into windows/system32...
 
Back
Top