From World Machine to 3D Studio MAX in 16-bit via TIFF/PNG

Hi all
This being my first post here I would like to congratulate all the people involved (especially Stephen Schmitt) in making an outstanding product!

Now over to the purpose of this post.
I use 3D Studio MAX v.8 on a daily basis and wanted to take advantage of the 16-bit accuracy that WM provides. Since none of the formats in WM 1,2 outputs are directly usable in MAX, I have found a little workaround to convert the PGM format into a 16-bit Tiff or PNG(the option to output to PGN is for some reason grayed out…) using Photoshop CS and a free plug-in which can read PGM files.

Tutorial follows:
First off you output your height map for WM to the 16-bit PGM (ASCII) format.
Then you go this web site: http://www.richardrosenman.com/photoshop.htm
Press CRTL+F and type in “PGM” to scroll down to the PGM filter (it’s free).
Download it, unzip and put the file “pixmap.8bf” into your Photoshop plug-in folder.
Most likely it will be like this:
C:\Program Files\Adobe\Photoshop CS\Plug-Ins
You might want to make a folder called PGM and put it in there.

Open/start Photoshop. Press CTRL+N to open the dialog box for creating a new image.
Set the Width and Height in pixels the same as your output from WM.
Set Color Mode to Grayscale (since that PGM file contains no colors)
Set from 8 Bit to 16 Bit(because we want all the 16-bit goodness!)
Click OK to crate the empty image.

Now go to: Filter > Richard Rosenman > Portable PixMap Importer/Exporter…
Select the PGM file you outputted from WM
Once it’s in Photoshop you can save it as a TIFF or PNG.

Now it is ready to be used by 3D Studio MAX.
Make a plane primitive, switch over to the Mental RAY renderer and put your height map in the displacement map channel.
You can scale the height differences by simply adjusting the “Output Amount”, found at the bottom of the Bitmap parameters.

Good luck!

Hi there,

This is a succinct little tutorial, I like it! I’m going to sticky this for a while.

Regards

Let me add a few things:

First, while it’s a good find, you shouldn’t need the PGM filter with CS2. A normal RAW16 file will import just fine without. Just drag the file into the Photoshop window or use “Open As”, and set filter to “Photoshop Raw”

Make sure to set the file import parameters correctly, same as you already wrote. 16 bit, no header, 1 channel, yada yada.

Second, make darn sure to disable Color Management if you plan on converting to rgb (required for mentalRay on Maya). For my Maya workflow, i’ll import, convert to rgb, then output as iff.

edit: oh yeah, the reason why you should disable color management is you’ll get banding artifacts on the rendered output, even if you can’t see them in the image file.

Also as a followup, the next version of WM will support 16bit TIFF export directly most likely, which will reduce some of the pain-in-the-ass-ness of exporting to high end renderers.

Man, you are my hero :smiley:
Thank You so much for that help

edit : And thanks also to Remnant for including a future 16bit output update :smiley:

May Heighmaps bless both of U , hehe

Okay guys, I got a problem !

I’ve followed this tutorial word by word, and I’m pretty sure I haven’t done errors. I’ve checked 16bit grayscale on document creation and on import via Portable PixMap plugin. But I just can’t get the 16 bit accuracy in photoshop. I see too much differences between the gray tones when zooming in.

By the way, I’m using Photoshop CS 1. Can the problem be the CS version ?

Thanks fr future help

I’d like to suggest including open EXR export. 16bpp isn’t bad but I’ve noticed banding with it especially in areas with a very subtle slope. As of now, almost all major graphics apps support EXR. I’ve tried exporting the raw32 format but have been unable to succesfully open it in HDRshop or CS2

Cheers

Sorry, I don’t get to these forums often… :slight_smile:

For importing into 3DS Max I would recommend going directly from WM to an actual 3D format instead of using PGM/RAW/TIFF.
Especially if you are using the heightmap as a displacement map in Max, which almost never results in as good a mesh as simply converting the heightmap directly to a mesh.

I have custom file conversion software I wrote for working with WM-to-UE game maps for my personal community releases and also for any game studio work that I do with the Unreal Engine, that converts between heightmap (WM’s RAW16) and STL or OBJ (and support for 3DS, ase, etc. coming soon). The heightmap conversion software actually supports a large number of bitmap image (including TIFF-16), DEM, 3D, and heightmap formats. Sorry, the conversion software is currently only available to Unreal Engine licensees.

The new software I am currently working on (it will essentially replace WM and the other various applications I currently use to create heightmaps and texture layer alphamap) supports even more formats (approximately two dozen image/heightmap/3D file formats).
The design is basically “3DS Max” for heightmap design and editing. It’s main design style is to support complex terrain heightmap design from video game studio level design map overheads, so it requires a more “controlled” design as opposed to simply generating a random noise initial layout and working out from there.
Once the new software is in beta for the Unreal Engine licensees, I may release the current heightmap conversion application to the public.

Don’t worry Stephen, I’ll still keep up with using my WM since it is a fantastic application. :wink:

If Stephen is interested in any info I have regarding implementing basic TIFF-16 or especially the simpler 3D formats into WM export for 3DSMax, give me a shout on email.

I tested all 16bits formats from WarMachine. The results ? - NOTHING. HOW CAN I USE 16BITS ACCURACY IN 3DS MAX ?

Surely the problem is not with WM. I regularily use without troubles PGMs for Bryce and TGAs for Vue without any banding whatsoever.

okok. I rendered height image, but it do not look ok : http://www.baze.webzdarma.cz/ . I tested it in Vue6 and the result is very bad…it is only a noise, no mountains.

How can i use 16bits images?? I maked this 16bits image: http://www.baze.webzdarma.cz/ …I loaded it into Bryce or Vue or Max…But The output is only a noise. What can i do for 16bit output ? THANX VERY MUCH.

I believe you were using a a Pov-TGA, which contains the high and low order bytes of the 16bit data in the red and green channels. This is a way of packing that data into existing 8bit RGB formats. Vue supports this format I understand, so you should be able to use it. I know some other Vue users have been successful in doing so, so it might depend on how you’re trying to load it into Vue!

I use it regularily with the Vue6 Personal Learning Edition.

I create a terrain, edit it, select the Picture button, load a new image, configure the mixing to use only the loaded image, press OK and dance. Oh, BTW, terrain resolution must be enlarged beforehand to fit the imported terrain size, if you do not want to lose crispness.

Sorry, but rock-solid (pun intended…) with Bryce5, Bryce6.1 and Vue6PLE.

Bye!!!

:smiley: OK. It is working in Bryce or Vue…But…it is not workink in 3ds max :shock: :frowning: I tested Pov-TGA in 3ds max (mebtal ray)…And what qualities ? TGA-PovRay(16k+)=BMP(256colors). What is that ?? :x

Yes for maya as well because this will have fast render with mental ray if your doing block rendering for displacement and no matter how close you are the detail will be high. Since your using fractals you would just have to save its fractal data out somehow to a 3d texture file like .map

Wait a second on a seperate note i know this guy. Hes building some program http://www.lilchips.com/dgunreal/tools-hmes.asp Big thing to say that it will replace wm. Might be used as a conversion tool for game engines but i can guarantee it most likely wont replace it.

Please re-read my post carefully:

“… it will essentially replace WM and the other various applications “I” currently use …”

I stated applications that I currently use. To do a lot of my terrain work I use some features of WM plus a number of other applications and utilities including my own in-house tools I have developed previously. HMES essentially combines the functionality of them into one for the methods that I use, so that I don’t have to constantly bounce between applications and file format conversions. Rarely do I personally use WM for 100% of my terrain pipeline, often I use it for some mask generation, etc. HMES will alleviate most of that for me.

For other people I’m sure WM will still meet all of their requirements.
And for them, if they find HMES useful for conversion or other functions, that is fine.

My Bad! About exporting 3d textures out of wm2 stephen how much does that sound possible?

oooh… EXR and/or 32bit Float Tif would be kool. Would work good with us anyway (using renderman).

-SnS

konyashevlavr17@mail.ru