Home Technical Talk

Workflow question : Generate terrain heightmap on a planet

polycounter lvl 9
Offline / Send Message
ParoXum polycounter lvl 9
Hi guys, I'm searching for a way to create planets that are displaced from actual terrain heightmap, the kind of output you'd get from World Machine for instance.

The plan is to map that to a box and subdivide it in order to have a fully displaced spherical planet without seams.

Thing is, I'd like to avoid having to sculpt each planet as I might have a lot to make in the future.

Is there a way to generate terrain data on a mapped sphere, or can you think of any hack to do so to convert a flat terrain heightmap => to sphere ?

Also if made on a flat cross surface, it's gonna be pretty much impossible to make each corner seamless, right?


And just in case I didn't explain correctly enough, here's a picture:

temp9.jpg

Replies

  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    World based projection? But that would depend on the game engine.

    What engine you aiming for?
  • aivanov
    Offline / Send Message
    aivanov polycounter lvl 5
    It IS possible to make the cross' corners seamless - but you're gonna have to go in manually with an image editor after you generated the flat cross surface, so this may still be not efficient for you if you're making lots.

    Basically, I'm sure you're aware skyboxes/cubemaps work a similar way as they're essentially mapping a sphere onto six flat cube sides. Long ago I was experimenting with making nebula skyboxes and came up with a method to create seamless non-warped ones from photos. This post.

    While the workflow shown there doesn't apply directly to your problem, the principle stays the same. Use HDRshop to convert the flat cross into a single equirectangular projection image and edit any seaming/warping out, then convert back into a cross OR texture the sphere with the equirectangular one.
  • ParoXum
    Offline / Send Message
    ParoXum polycounter lvl 9
    Thanks guys for the quick feedback.

    Ace-Angel: is world based projection when you basically do box mapping on the fly in the shader? If that's the case that's not what I'm after.

    aivanov: yeah I've used that same technique many time before when dealing with cubemaps I had to crate from skydomes and vice-versa.

    I think for anything sky or reflection related it can still be quite all right to fix the seams manually, but when you're speaking upto 16bit displacement heightmaps I'm not sure the editing capabilities are that great.

    Note to self, I could project everything on the cross, take result in ZBrush and resculpt the areas along seam there. But yeah, if it's to be done for 20+ earth planets-like that becomes a lot of work..

    If only worldmachine could generate terrain on spheres it'd simplify the task a lot. It must exist somewhere no?

    Or maybe the existing cases of game worlds having entire planets just work around procedural custom algorithms?

    edit: Apparently terragen's been able to render planets for a while with 2.0. It's not too expensive in its standalone version but I'm gonna make sure it can do what I want first before anything...
  • jestersheepy
    Offline / Send Message
    jestersheepy polycounter lvl 8
    ParoXum wrote: »

    Or maybe the existing cases of game worlds having entire planets just work around procedural custom algorithms?

    I would like to just mention:
    http://www.infinity-universe.com/Infinity/index.php


    There are quite a few technical docs around the site and in the forums.

    Just a TL: DR portion of the site, the game features billions on unique planets that players can fly to in real time. I am quite sure the planets in that are generated heightmaps (Or layers of) based off of procedural algorithms.

    I know it's not answering your question but perhaps it may help thought process?
Sign In or Register to comment.