• Welcome to World Machine Community. Please login or sign up.
 
August 18, 2019, 09:36:03 pm

News:

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


Texturing in world machine

Started by WFab, March 24, 2014, 01:13:45 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

WFab

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

After layering a few more mediocre textures on the rock, with some perlin and voronoi patterns combined.

Stephen

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

March 26, 2014, 02:12:09 am #3 Last Edit: March 26, 2014, 02:14:16 am by Onkelpoe
This starts to look really good !!! Wow!

Quote from: Remnant on March 25, 2014, 02:37:15 pm
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!

WFab

@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

P.S I didn't understand what you mean by height value of rocks either. Could you please elaborate on that?

Onkelpoe

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

@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


Stephen

March 26, 2014, 02:16:17 pm #9 Last Edit: March 26, 2014, 02:40:40 pm by Remnant
Quote from: Onkelpoe on March 26, 2014, 02:12:09 am
This starts to look really good !!! Wow!

Quote from: Remnant on March 25, 2014, 02:37:15 pm
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!
-- Stephen Schmitt
- Creator of World Machine

WFab

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!

Stephen

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

I never used Splat converter' favour best match. It's inputs and outputs only support heightfields don't they?

Stephen

yep -- but again, you're only modifying the chooser mask control input, not the textures themselves!
-- Stephen Schmitt
- Creator of World Machine

Onkelpoe

March 28, 2014, 01:27:04 am #14 Last Edit: March 28, 2014, 02:00:35 am by Onkelpoe
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!

WFab

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

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!

Stephen

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

March 31, 2014, 01:12:56 am #18 Last Edit: March 31, 2014, 06:15:19 am by Onkelpoe
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

Stephen

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

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