• Welcome to World Machine Community. Please login or sign up.
 
July 22, 2019, 02:37:18 am

News:

Read the Development Diary for an inside look at World Machine's progress!


A heightmap-from-mesh extraction template for Blender

Started by BrianLockett, December 18, 2013, 05:01:17 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BrianLockett

December 18, 2013, 05:01:17 pm Last Edit: December 18, 2013, 05:35:50 pm by BrianLockett
Greetings, fellow World Machine users!

My name's Brian, and I'm a freelancer by day, indie game developer by night, and insomniac all in between.


As I deal with creating 3D environments as part of my work, both of my lines of work consist of me using a lot of heightmaps.

I've long needed a way to quickly extract heightmaps from 3D meshes.  Surprisingly, there are only a minute handful of ways to do this, even commercially.

So, I've created a little makeshift solution for it.  A bit crude but it works fine.


Without further delay, here's my Heightmap Template for the free 3D program Blender:  http://www.blendswap.com/blends/view/70379




This is a simple, fast and free way to extract beautiful heightmaps from sculpted/modeled terrain meshes, so that you can easily bring them into World Machine.

This also allows a circular workflow between Blender (or your 3D program of choice) and World Machine, as you can extract maps and export from Blender and import into World Machine, and edit back again in Blender, as many heightmaps as you need.

I am working to refine this with a script towards automating this whole process.  I am also working on a UDK version of this template.

Overall, I'm working on a robust toolkit for Blender to allow for expedient game development workflow, and seamless transition between World Machine and Blender is included (expect a plugin sometime in 2014).

Though, I am busy with my daily occupations, so the work has been gradual.  I am also waiting on an upcoming release of Blender, which will feature native support for creating clean template files.


Anyways, I hope this helps somebody out there.


- Brian Lockett
3D Freelancer
8 GB RAM, 2 GB NVIDIA graphics, Intel Core processor, Windows 10, and tons of coffee.

BrianLockett

December 18, 2013, 05:30:29 pm #1 Last Edit: December 19, 2013, 08:07:51 pm by BrianLockett
Some added notes here:

  • You will need to make a free account at BlendSwap.com to download this file.  I would upload the file here directly, but it's bigger than the file size limitation for forum attachments.


  • If you don't have Blender, it's free and you can download it at Blender.org.


  • This template alone is enough reason to add Blender to your tools.  Very time-saving.


  • Blender has an included addon, ANT Landscape, that allows for quick creation of base terrains in Blender.  You can use my template to extract base heightmaps usable in WM2.  Overview video of ANT Landscape addon: http://youtu.be/cfOdEGL9Gk8


  • I have a video showing how to use my Heightmap Template: http://youtu.be/AtkU2aaaCfU  Though, the included PDF guide is quicker.


  • I also have a video showing how to deal with non-square heightmaps with the template: http://youtu.be/zz51AXmvkKE


Thanks to this template, I will be creating a whole lot more Blender-to-World Machine workflow content soon--stuff that should be applicable to Maya, 3ds Max, modo, etc. as well.


- Brian Lockett
3D Freelancer
8 GB RAM, 2 GB NVIDIA graphics, Intel Core processor, Windows 10, and tons of coffee.

Stephen

Hi Brian,

Nice work! A long while back I actually started working on a Mesh->HF converter for WM, but ended up blocking on several prerequisites that WM would need to support to make it work better (namely, support of meshes as a first-class data object, and localspace heightfields to properly represent the space-less import). It functioned fairly well but was a bit slow as it essentially ray-marched the mesh to regenerate the heightfield surface.
-- Stephen Schmitt
- Creator of World Machine

BrianLockett

December 19, 2013, 08:01:12 pm #3 Last Edit: December 19, 2013, 08:08:58 pm by BrianLockett
Thanks, Stephen.

Yes, it seems to be quite a tricky process to add such the feature to non-3D modeler software.  It's probably why most other 3D programs in general don't support it--at least, not without a good deal of work.

Mudbox supports a map extraction system for displacement maps, and XNormal can extract displacement maps usable as heightmaps, but Mudbox costs $800, XNormal's method isn't straightforward, and they're pretty much the only ones.

I suppose ZBrush can do it, since it can extract displacement maps, but unless you own it and are familiar with using its peculiar system, it's probably not ideal, in terms of both price and straightforward workflow.

TerreSculptor Pro Alpha is looking like the only real contender, in terms of a tool that game developers like myself can use, but as it presently stand, it doesn't support this very well, as you can only extract heightmaps from small terrain meshes, and even those take forever.  Not practical when you need to deal with a lot of terrains like I do.

It seems like this kind of method I've employed is the most straightforward solution.  Anyone can set this heightmap setup up in their 3D program of choice, but I made a template for myself to save not just time, but to also save development effort in the meanwhile.  It's makeshift, but it works fine, so I figured until I complete my script(s)/plugin, this will do.  And since it's Blender, it's free.

Thankfully, with this method, most of the hard work is already taken cared of by the powerful 3D renderer.  All there's left for me to do now is produce a macro/plugin set for World Machine that allows for seamless export from Blender to World Machine 2 (and vice versa).

Ideally, I'd like to have such a setup ready and available for other 3D packages in addition to Blender, but Blender gets my developer attention first.  I've considered creating one for 3ds Max, but I don't own it, so that'll prove a bit tricky.  I'm buying modo soon enough, so I'll have to work on a modo-to-WM2 plugin as well.

In any case, I'll be making good use of that World Machine PDK.  Should see something in 2014.  I should also have plenty of in-game screenshots from at least two professional game projects to post in the gallery by then, as well.  Pretty exciting stuff ahead next year!


- Brian Lockett
3D Freelancer
8 GB RAM, 2 GB NVIDIA graphics, Intel Core processor, Windows 10, and tons of coffee.

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.

Name:
Email:
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

Shortcuts: ALT+S save/post or ALT+P preview