Home Technical Talk

Applying textures to large terrain made in World Machine, then rendering it?

polycounter lvl 9
Offline / Send Message
FiftyTifty polycounter lvl 9
My issue is fairly straight forward. I've got a height map, a colour map, and three texture masks made from the colour map. I figured I could just have multiple layers, one for each texture, and have the texture mask dictate where on the mesh the texture is hidden/shown.

But I can't find anything like this in 3DS Max. So how do I take a heightmap, along with it's colour map (and derived masks if they're any use), and render it in 3DS Max?

Here's a link to the height map, colour map, and masks: https://mega.nz/#!CldU3AxQ!pyOw0usVhbh06RiLh_5-aoIp0ShbabPjFWomgGpXclg

I know that pretty much every game engine that has any meaningful amount of terrain supports doing this, so it's rather odd that 3DS Max doesn't. Furthest I've gotten is rendering the heightmap itself as a mesh, by applying a Displace modifier to a flat plane and using the heightmap as the displacement map. But that's all I've managed to do.

I'm not against using other tools to accomplish this, but I would like to have the final product be in 3DS Max if at all possible.

Replies

  • Noren
    Options
    Offline / Send Message
    Noren polycounter lvl 19
    What renderer? You should be able to use composite maps or materials, depending on the renderer.
  • FiftyTifty
    Options
    Offline / Send Message
    FiftyTifty polycounter lvl 9
    I'm currently using Quicksilver, as it supports GPU acceleration on AMD GPUs (got a Vega 56).
  • Noren
    Options
    Offline / Send Message
    Noren polycounter lvl 19
    Quicksilver is basically the Nitrous viewport renderer with some bells and whistles, so very limited. Seems like it doesn't support composite maps. You could try if it lets you layer several mix maps instead, or using a custom Directx shader.
  • FiftyTifty
    Options
    Offline / Send Message
    FiftyTifty polycounter lvl 9
    It does actually, managed to get my textures to overlay across the terrain using the masks. Only problem, is that the tiling settings don't make any difference. The texture shifts a bit, but is still super stretched.



    I gave RadeonPro Render a shot, but switching to it and then rendering causes the daylight light to no longer affect anything.

    Edit: Actually, changing the tile does affect, but even at 99999.0, the maximum value, it's still super stretched out, a hundred times worse than an N64 game
  • Noren
    Options
    Offline / Send Message
    Noren polycounter lvl 19
    Not sure what you are hoping to see, some stretching will occur since the landscape is mapped from the top. Also none of the textures you showed in the first link seemed to be tiling textures, you would have to export those separately.  (Edit: but it seems like you might have done that in your screenshot. Not sure why the tiling doesn't work. I'd expect problems with different uv's but not necessarily tiling)
    Make sure your viewport texture resolution is high enough in case that's the culprit (that's what Quicksilver is using).

    Interesting that the composite map works after all, the manual said the opposite.
  • FiftyTifty
    Options
    Offline / Send Message
    FiftyTifty polycounter lvl 9
    Oh, those aren't the textures. Those are the maps. I was using 256x256 textures, so I also tried just tiling them into 8192x8192 textures, but the stretching is still there.

    Viewport texture resolution is directly connected to Quicksilver? That's just bad. Let me change it.

    Alright, even after increasing the resolution of the textures from 256x256 to 16384x16384, the tiling is still bad. And for some reason, it's not even that it's stretched, it's that the texture itself has lost detail when being rendered in the viewport and by the renderer.


    And if we view it from above:


    The actual texture itself, for some reason, is having almost all of it's pixels ignored by 3DS Max.



  • FiftyTifty
    Options
    Offline / Send Message
    FiftyTifty polycounter lvl 9
    Turns out that it's a problem with the Quicksilver Renderer. Reduced the tiling to 1000, and changed to Scanline renderer. Bam


    Now the textures show, but it's horrifically slow when rendering the whole terrain. Not only that, now the shadows are pitch black. I guess the solution is to find a new AMD GPU accelerated renderer.

  • Noren
    Options
    Offline / Send Message
    Noren polycounter lvl 19
    Going out on a limb, here, but might be that the composite map needs to be baked for the viewport, thus you are limited by the "parent" resolution of your texture. If that's the case, you could give layered mix maps another try after all. But Quicksilver is certainly not your best bet in the first place.
  • FiftyTifty
    Options
    Offline / Send Message
    FiftyTifty polycounter lvl 9
    Aye, I'm giving RadeonPro Render a try since it seems like a professional OpenCL accelerated renderer, but it just breaks the lighting completely. It looks like a tonemapped AO buffer when I render the scene, and there doesn't seem to be any RadeonPro equivalent material to the composite maps. There's the blend material, but it doesn't have the masking functionality.
  • Eric Chadwick
    Options
    Offline / Send Message
    I'd recommend against trying to do this in Max. It's really not made for this.

    But if you absolutely must, then use the DirectX viewport mode, and create a shader in Shader FX. It's the only way you're going to get anything decent.
  • FiftyTifty
    Options
    Offline / Send Message
    FiftyTifty polycounter lvl 9
    If max isn't suitable for this, I suppose I'll just have to suck it up and get the software that can handle this. What program ought I use? The models and animations use FBX, which should be fairly standard, and the heightmaps can come in various formats so that's no trouble either.
  • Noren
    Options
    Offline / Send Message
    Noren polycounter lvl 19
    I wouldn't go as far as saying that Max isn't suitable for this, especially if you are familiar with it. The worst you should have to deal with is figuring out what maps and materials work for the renderer of your choice and perhaps a slightly unwieldy material tree, but depending on what you plan to do that's not much time spent compared to the rest of the project.
     Not sure what your mileage will be with a Radeon, but Iray (free) and Vray GPU went through far more development time than seems to be the case with Quicksilver. (Quicksilver should work with Shader FX, though, at least in theory, so that might be worth looking into, but it's a potential time sink if you are completely new to this.)
  • FiftyTifty
    Options
    Offline / Send Message
    FiftyTifty polycounter lvl 9
    Aye I am new to this. Initially this just started out as a test to see if I could load World of Warcraft models in 3DS Max, then it progressed to taking some of the game's resources and creating (completely amateur) HD-looking scenes, with the first one in mind being our characters looking over a wide vista.

    I also don't know much about shader programming. I know the basics of HLSL, like how to port SweetFX and ReShade code to ENB and back, but when it comes to actually understanding what the more complex functions are used for, using sampler sates, working with transparency, using depth buffers, etc., I'm a fish out of water.

    The main hurdle is that there's just not any comprehensive and introductory documentation about this stuff.

    But aye, if I need to get some middleware, or chuck my resources into another program, I'll do it.
  • Eric Chadwick
    Options
    Offline / Send Message
    Oh my bad, I thought you wanted to do realtime in the viewport. For easier rendering, you should look into Arnold, or even mentalray. 

    But you'll have the easiest time actually using a game engine. Like Unreal.
    Some links to get you started.
    https://polycount.com/discussion/88933/how-to-make-terrains-for-games/p1
    http://wiki.polycount.com/wiki/MultiTexture
  • Noren
    Options
    Offline / Send Message
    Noren polycounter lvl 19
    Shader FX is node based, so it's not as hard as you might imagine now. Sorry if I gave the wrong impression. Perhaps just take a quick look at it and decide for yourself.
Sign In or Register to comment.