Author Topic: Texturing in world machine  (Read 15142 times)

0 Members and 2 Guests are viewing this topic.

WFab

  • World Machine Guru
  • ****
  • Posts: 370
    • View Profile
    • Blog
Texturing in world machine
« on: March 24, 2014, 01:13:45 PM »
Hi, I'm currently working on a terrain texture for a client, and although it was to be done in game engine, I tried to do it in world machine (diffuse only). So far looks ok, despite the fact that terrain is 2k where textures are 1k. Gonna use knald to extract normalmaps and ao maps later. Please be brutally critical while commenting! :P

P.s: Textures only, terrain is just a test!

WFab

  • World Machine Guru
  • ****
  • Posts: 370
    • View Profile
    • Blog
Re: Texturing in world machine
« Reply #1 on: March 25, 2014, 11:44:57 AM »
After layering a few more mediocre textures on the rock, with some perlin and voronoi patterns combined.

Remnant

  • Author
  • World Machine Guru
  • *****
  • Posts: 2311
    • View Profile
    • http://www.world-machine.com/
Re: Texturing in world machine
« Reply #2 on: March 25, 2014, 02:37:15 PM »
Nice attempt so far. If you were able to crank the texture resolution up I bet you could really make things shine.

A few things that I notice:

Texture transitions: particularly sand<->rock, would benefit from a hard edged transition rather than a smooth blend. try adding a noise function to the transition, or if you have a heightfield you're using for your rock, use the height value of the rock to raise the top areas of rock out of the sand, so that in the transition zone the sand just settles into the cracks.
-- Stephen Schmitt
- Creator of World Machine

Onkelpoe

  • World Machine Guru
  • ****
  • Posts: 356
    • View Profile
Re: Texturing in world machine
« Reply #3 on: March 26, 2014, 02:12:09 AM »
This starts to look really good !!! Wow!

Texture transitions: particularly sand<->rock, would benefit from a hard edged transition rather than a smooth blend. try adding a noise function to the transition, or if you have a heightfield you're using for your rock, use the height value of the rock to raise the top areas of rock out of the sand, so that in the transition zone the sand just settles into the cracks.

This is, what I try to archieve somehow - but does not work out right...

Can you explain, how one can "use a height value of the rock .to raise top areas of rock out of the sand..." ???


Cheers!
« Last Edit: March 26, 2014, 02:14:16 AM by Onkelpoe »

WFab

  • World Machine Guru
  • ****
  • Posts: 370
    • View Profile
    • Blog
Re: Texturing in world machine
« Reply #4 on: March 26, 2014, 02:32:47 AM »
@Remnant : As paul already said, I tried settling the sand in the cracks using the deposition map from erosion. Seems like the terrain should be at least 4k for that to look right, whereas I have to deliver not more than 2k maps, and possibly less than that. File textures need to be hi res for the proper megatexture like texturing, then maybe we can dial down on resolution. I may try it on some personal projects though, as this seems an exciting angle to explore. As for cranking up the textures, I don't have a very good texture library, nor do I know of many sites to download Hi resolution textures. I am a purely procedural guy, I build my own textures in vue or filter forge, although It would be too much work for a small project like this. Could you point me to a good site where I can find some Hi res textures in Creative commons domain? 

@onkelpoe : Thanks, but I must mention, I got this idea from you!

WFab

  • World Machine Guru
  • ****
  • Posts: 370
    • View Profile
    • Blog
Re: Texturing in world machine
« Reply #5 on: March 26, 2014, 02:34:36 AM »
P.S I didn't understand what you mean by height value of rocks either. Could you please elaborate on that?

Onkelpoe

  • World Machine Guru
  • ****
  • Posts: 356
    • View Profile
Re: Texturing in world machine
« Reply #6 on: March 26, 2014, 02:46:44 AM »
heheh, no problem Pratyaksh ;)

Can you explain or show the settings,  how you got this nice sand and "greens" variations?
Looks quiete good

Best Regards,

Paul

WFab

  • World Machine Guru
  • ****
  • Posts: 370
    • View Profile
    • Blog
Re: Texturing in world machine
« Reply #7 on: March 26, 2014, 02:55:02 AM »
@paul : Greens is a texture filter from filter forge 3 called Moss maybe. Sand is a free texture known as whitesand, I modified it in world machine for some color. Settings I cannot show, as I don't have the permission to do that from the client. Although once this is done, I might make a project of my own, to test this method's limits! Then I will probably post all settings here!

Onkelpoe

  • World Machine Guru
  • ****
  • Posts: 356
    • View Profile
Re: Texturing in world machine
« Reply #8 on: March 26, 2014, 03:00:02 AM »
Would be awesome, thanks a lot

Cheers!

Remnant

  • Author
  • World Machine Guru
  • *****
  • Posts: 2311
    • View Profile
    • http://www.world-machine.com/
Re: Texturing in world machine
« Reply #9 on: March 26, 2014, 02:16:17 PM »
This starts to look really good !!! Wow!

Texture transitions: particularly sand<->rock, would benefit from a hard edged transition rather than a smooth blend. try adding a noise function to the transition, or if you have a heightfield you're using for your rock, use the height value of the rock to raise the top areas of rock out of the sand, so that in the transition zone the sand just settles into the cracks.

This is, what I try to archieve somehow - but does not work out right...

Can you explain, how one can "use a height value of the rock .to raise top areas of rock out of the sand..." ???

Cheers!

Sure. This is actually a pretty cool topic that deserves its own post -- but I'll throw this inline for now.

I'm talking principally about when using either external textures or procedural textures that are not intricately linked to the terrain surface -- for example, a rock texture, or a grass texture. Check out the following world and image to show what I mean. I took some time this morning to create and encapsulate all the blending bits into a macro -- which I need to make public, as this is a classic kind of scenario where a macro is useful.

But essentially, the macro modifies your chooser mask so that the relatively-higher texture is favored. This means that if you are blending a rock and grass, the rocks will stick out of the grass appropriately, but also that grass can grow between the rocks if the grass is high enough. In the example world its just showing how to blend textures, and so is using a simple linear gradient transition and no underlying heightfield, but obviously you can use this in conjunction with height/slope selectors, etc to assist in texturing from your world.

It's a simple but powerful technique that improves the blend quality tremendously!
« Last Edit: March 26, 2014, 02:40:40 PM by Remnant »
-- Stephen Schmitt
- Creator of World Machine

WFab

  • World Machine Guru
  • ****
  • Posts: 370
    • View Profile
    • Blog
Re: Texturing in world machine
« Reply #10 on: March 27, 2014, 01:31:56 AM »
I tried this method this morning, but the major problem in my case is low res textures, and of course I need them to be perfectly tiled. Thanks for the macro though! Is it for just two textures? So we have to make a cascading device arrangement for more than 2 textures? Or am I mistaken, and this macro supports more inputs? I'm not currently able to open it, since I'm using an older build 2.3. I understand the principle though, so thanks for that!

Remnant

  • Author
  • World Machine Guru
  • *****
  • Posts: 2311
    • View Profile
    • http://www.world-machine.com/
Re: Texturing in world machine
« Reply #11 on: March 27, 2014, 01:39:21 AM »
The macro above is just for two textures... although after the fact, I realized that the effect is very similar to what you can get by instead (ab)using a Splat Converter device set to "Favor best match" with a high priority value -- this is a lot easier than the above macro and works for as many textures as you want. There are some slight differences from the macro I provided, but for ease of use its the way to go.
-- Stephen Schmitt
- Creator of World Machine

WFab

  • World Machine Guru
  • ****
  • Posts: 370
    • View Profile
    • Blog
Re: Texturing in world machine
« Reply #12 on: March 27, 2014, 02:00:14 AM »
I never used Splat converter' favour best match. It's inputs and outputs only support heightfields don't they?

Remnant

  • Author
  • World Machine Guru
  • *****
  • Posts: 2311
    • View Profile
    • http://www.world-machine.com/
Re: Texturing in world machine
« Reply #13 on: March 27, 2014, 11:03:27 AM »
yep -- but again, you're only modifying the chooser mask control input, not the textures themselves!
-- Stephen Schmitt
- Creator of World Machine

Onkelpoe

  • World Machine Guru
  • ****
  • Posts: 356
    • View Profile
Re: Texturing in world machine
« Reply #14 on: March 28, 2014, 01:27:04 AM »
I try to get the macro working in my project, but I still fail...
Got no heightfields, but "bitmap" instead. In the macro, there is a hint like "make heightfield from color"... how to do this?

In my project, I got some mountain textured with photo and some color generators, some "forest" areas and sand.
I worked with colorizers and selectors to texture it all.

But I cant see a way to involve the macros here... I really would like to seperate the mountains from the forest and sand, because
right now, all three areas are blended smoothly into each other...


@Pratyaksh

What are your world-parameters/extent to resolution ratios?
Is it 8x8km at 2k res?

Cheers!
« Last Edit: March 28, 2014, 02:00:35 AM by Onkelpoe »

WFab

  • World Machine Guru
  • ****
  • Posts: 370
    • View Profile
    • Blog
Re: Texturing in world machine
« Reply #15 on: March 28, 2014, 03:15:33 AM »
Hi paul,
It's a little less than 20kms, at 2k. I would have loved to get it at 4k or more, but client's request was to keep it below 2k.
Could you post some screens from your project, as well as device network, so I can suggest some solutions to your prob?


Onkelpoe

  • World Machine Guru
  • ****
  • Posts: 356
    • View Profile
Re: Texturing in world machine
« Reply #16 on: March 28, 2014, 06:02:21 AM »
Hey Pratyaksh,

very kind! thanks for your help, once again!

So here ais my setup and a detail shot from the transition, that I want to drive with that new macro, provided by the author of this cool piece of software

Basically, I want to seperate the green from the rock ;)

Cheers!

Remnant

  • Author
  • World Machine Guru
  • *****
  • Posts: 2311
    • View Profile
    • http://www.world-machine.com/
Re: Texturing in world machine
« Reply #17 on: March 28, 2014, 11:11:04 AM »
Ok, that picture is helpful!

So basically, what we have to do is create a separate "height" or "strength" heightfield for each color layer we want to use the enhanced blending for. To get the same effect as described above, these height channels should be considered the "local" heightfield for a texture; that is, its not describe the macro-scale height of the terrain, but the micro-scale (cracks in rocks, etc).

So for example:

1) if we want to consider the grass to be "always flat", and the rocks to be lumpy, we could assign a constant generator as the micro-scale height of the grass.
2) We can build a microscale height for the rock textures out of the brightness value of the texture -- add a channel splitter set to HSB mode to your rock texture to get the brightness of the texture.
3) It looks like the chooser just inside the red box on the right side is the chooser that is blending your rock and grass textures, correct? If so, then insert the new macro inline on the C "chooser mask" input for that chooser.
4) Then connect your relative microheights for textures A and B that we created in steps 1 and 2 to the height inputs of the macro.

Your chooser mask should now have been modified to make the rocks stick out above the grass.  Play with the macro settings to perfect.
-- Stephen Schmitt
- Creator of World Machine

Onkelpoe

  • World Machine Guru
  • ****
  • Posts: 356
    • View Profile
Re: Texturing in world machine
« Reply #18 on: March 31, 2014, 01:12:56 AM »
Hey Stephen,

thanks for helping once again!

Ok, I setup the channel-splitter and connected the macro-output to the "C"-control input of the chooser, that combines the grass/forest and rocks.

I am not sure about the "constant generator" - how to combine this one with all the nodes? Is it ok, like I did?
(Please see my current setup)



Best Regards
« Last Edit: March 31, 2014, 06:15:19 AM by Onkelpoe »

Remnant

  • Author
  • World Machine Guru
  • *****
  • Posts: 2311
    • View Profile
    • http://www.world-machine.com/
Re: Texturing in world machine
« Reply #19 on: March 31, 2014, 04:13:36 PM »
The constant generator doesn't need to be connected to the combiner above it -- in fact, if the constant generator is producing a constant value of zero, it will essentially erase whatever the combiner there is doing. It can just go directly into the texture height input of the assistant macro.


I've been exploring this technique more extensively myself lately too. I've got several other examples ready to go that I'm pretty sure will do a better job of being easy/understandable than the above macro -- I'll try to get them out soon.
-- Stephen Schmitt
- Creator of World Machine