Merging 2 different terrains.

Started by paq, May 23, 2013, 12:27:02 PM

Previous topic - Next topic

paq

Hello,

I need to merge 2 or 3 different procedural terrains.  While the base of every terrain are an heightflied, I'm also using procedural displacement, and different twist and share direction.

The merge shader dont work very well, the mixing give some displacement glitches, easy to understand.

The only solution I've find is to duplicate the planet for every new terrain. It works, but seems a really heavy solution ?

Maybe there is something more clever to do ?


Gameloft

Tangled-Universe


Volker Harun

Starting with two terrains, each ending in a compute terrain node.
Merge shader powerde by, i.e. a PF. The transition problems can be smoothed by using a lower colour contrast and/or a larger value for smallest scale.

paq

#3
hello,

Well I've tried all the weekend, but without any good success ... to the point I'm really not sure if using terragen is a good idea for the kind of terrain.
I have post in attachment the reference I've received for this job. Part of my problem is maybe my limited knowledge of terragen, and I'm really about to give up.

I love terragen, there is no doubt the atmospheric model is the best one available. So I'm sure that for all the lighting, clouds and mood, I can do something really hot.
But the terrain structure from this reference image turn me crazy.

I see 2 approaches to far :

1) I create vertical spikes using either terragen heightfield or worldmachine. Then I add the outcrops detail using the fakestone or voronoi node to create the rocky stretched structures. Finally I add the twist and shear node to bend the result.

Problem : a) I really dont like the shear effect, it stretchs the details added on the spikes too much. I mean, I really need to 'rotate' the spikes in a way or an other, not shear them.
                b) twist and shear works on one direction, so I have to blend mutilple heighfield with different shear direction, and the merge node dont work very well with this kind of terrain. Using a power fractal for the blending do not help.

2) Build the terrain first using vector displacement (the reason I was really involved into the mudbox thread :)).

Problem : a) How can I had the rocky stretched structures ... I mean, the is no 'uv' direction or the like, so I have not idea how I can create such stretched detail that really follow the spikes direction.

At the end, well I can model the whole terrain + micro details in mudbox maybe, but then, ... why using terragen. I was hoping to find a more procedural approach than scuplting everything by hand.

So maybe there is some tricks, blue node magic, that can solve this.  I'm not asking anyone to build the terrain for me, but if you have any idea about how to handle this, I would really appreciate !
Having to switch back into Vue will be such a nightmare.
Gameloft

TheBadger

#4
QuoteAt the end, well I can model the whole terrain + micro details in mudbox maybe, but then, ... why using terragen. I was hoping to find a more procedural approach than scuplting everything by hand.

Sculpting it sounds like the most pragmatic way anyone could do it. Doing it procedurally just sounds like an advanced exercise to me. It would be great to do for the sake of doing it. But for a job, no, even I can see this is not a good use of time.

Assuming it needs to look as much like the source art as possible, I would sculpt it. In mudbox, after having built the basic shapes, and positioning everything, then mapping; Sculpting will be a fairly straight forward and relatively simple deal. A day or two depending on how obsessive you are.

Why use Tg2 then? You asked. Because of the lighting in the source art, because of the atmo and clouds. And the sun its self directly in the line of sight. And because of the planet above the sun.

If you have the system resources, you can bring the high poly sculpt into T2 with out the need for any maps or tricks. I have done this and it works GREAT! literally several GB objects. It took a while to load, and you don't want to use wireframe preview if you can avoid it. But its a good, sound, viable way to go.

Populating a planet with the sculpts would be troublesome. But otherwise It can work. Best you make all of those monoliths one object.

HDR .exr output and bam, your in the money.
As photoreal as your sculpt.
You could even use one of Ulco's methods of coloring the object procedurally if you don't want to paint such fine detail on such a large object. But you would have to ask him about that, I have never applied color to an object via nodes. But I have sen it work.

Great source art by the way! Hope you let us see the final!

Edit*
Looking at the source image again. I would add that you could create a similar looking planet "using twist and shear" but with smaller less displaced spires. Then set your giant sculpt on top of that terrain.
This way you have the basic planet with the little details you want. And your sculpt for the point of focus. If they blend well this would be great. Then you have the details you need for silhouettes on the horizon.
It has been eaten.

Dune

Problem 1 a: what if you twist first and then add smaller details?
Problem 1 b: what if you blend a surface shader by a PF and another one inversely, and use 2 twist/shear shaders as children, with opposite directions. That's what I did in some renders. Works.

paq

#6
Hola,

Thanks a lot for you input.

Hi TheBadger,

I'm affraid I really need to find a procedural, or half procedural way, but there is no way I could paint the whole landscape by hand.
The final result is a 360 panorama image, in a 4000 pixels wide +- ... I need to automate my workflow.

Hi Dune,

I finally get something with the terrain mixing, but the shear still give me trouble ... I still dont like the stretchy result.
I cant twist the shape first, because of the following problem I can't resolve.

[attach=1]

This time I'm using a vector displacement as a base, but it's the same problem I'm facing if I would use a shear and twist kind of graph.

A) I only use the Y (blue) channel of the vector elevation. With a vectical elevation like this, it's easy to add a stretched voronoi diplace to create the rocky structure I need.
B) When I apply the full displacement, well the voronoi to not follow the shape. The result is expected, the question is ...
C) How can I drive the voronoi to follow, somehow, the vector displacement shape.

I might sound like a dumb question, but this is a wallstopper for the moment. For me terragen strenght is his micro displacement power to add fine details and structure on cheezy shapes like this. I dont want to paint this structure by hand, for the 'whole' planet.

I have try some blue node trick, by splitting the r,g,b from my vector displace map, adding details and rebuild the vectors, but so far I get only funky result  :'( ... I have the feeling something can be done this way, but my blue knowledge is quite limited.

Gameloft

TheBadger

But why does the whole planet need to look like that? Animation I guess?
It has been eaten.

Matt

You could try using world position instead of texture coordinates. There are a few ways to do that. You could add a "Tex coords from XYZ" node before the Voronoi, or connect the Voronoi through a Transform Shader with "use world position" checked. In this particular case, as the Voronoi is a function node, you can input a "Get position" node instead of "Get position in texture."

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Dune

You beat me, I was just about to suggest that. And what if you first add the voronoi and then twist? If that doesn't work, you might consider the compute terrain to 'smooth terrain', before adding the voronoi. That sometimes does wonders with a small patch size. But it may also affect the rest of the chain.

paq

#10
Hello,

First thanks for the world xyz vs texture tips, good info to know.
That's said it's still not resolve my 'problem'.

Dune :

The problem with the twist is the extreme stretching you get with strong lean factor value. If you look at the reference image, some spikes are nearly parallel to the floor ... in that extreme situation the stretching effect is so strong with the twist and shear node that any details is completely wash out.

BTW I really like the control vector displacement can give, I believe it's the way to go here.

So to come back to my problem, here's an other description : (see attachment).

My goal is to replace the structure I've badly paint in mudbox by a stretched voronoi in terragen.
But, again, the stretched direction 'should', somehow, follow the vector displacement direction ... like in this attachment.

Using world coordinates works really well when using unstretched (default scale) voronoi texture.

I know it's a very tricky problem to solve, I have the feeling the vector displacement itself can be use to drive the voronoi direction ... somehow,
but I have no idea if it's possible to do it with the actual terragen nodes and my limited math knowledge.

[attachimg=1]

Hi TheBadger,

No there is no animation, just 360 background creation. But I need a lot of freedom and flexibility to do strong change without having to re-sculpt stuff by hand.



Gameloft

TheBadger

Cool paq, just curious about everything. Have an update?
It has been eaten.

Matt

Quote from: paq on May 29, 2013, 12:54:25 PM
My goal is to replace the structure I've badly paint in mudbox by a stretched voronoi in terragen.
But, again, the stretched direction 'should', somehow, follow the vector displacement direction ... like in this attachment.

Doesn't your original "B" image do this?

If you need more precise control over the amount of stretching than it might be tricky.

Matt
Just because milk is white doesn't mean that clouds are made of milk.