mesh displacement splits edges

Started by oysteroid, January 05, 2015, 12:13:29 AM

Previous topic - Next topic

oysteroid

Hi all!

I'd appreciate some help! I am sorry if this has been discussed to death already, but after a number of searches, I didn't come up with much. I am beginning to learn Terragen 2 again after years of not using it. And I am about to tear my hair out over this problem. If I try to use something like a power fractal to displace the surface of a rock object or an imported mesh, the mesh splits apart, opening gaps between all the edges. It doesn't matter how low or high poly the mesh is. Here is an example:

[attachimg=1]

This is just a simple OBJ cube with a power fractal plugged into the surface shader slot. Another example:

[attachimg=2]

This is just a cube with subdivided smooth several times in Blender and exported as OBJ.

What am I doing wrong? Or is this just the way it is, with no solution? I notice that if I use Terragen 2's native sphere object, it works as you might expect it to. But I'd like to do some ZBrush sculpting of some rocks to use close to the camera and then add some fine procedural detail with Terragen 2 in my render. I want more control than a purely procedural rock would allow, at least for some prominent objects.

Thanks!


oysteroid

Here is another example, this time with an OBJ directly exported from ZBrush:

[attachimg=1]

Oshyan

Unfortunately displacement on imported objects is not recommended at this time. It works to a certain degree and with minor displacement, but the kind of thing you're trying to do is generally not going to work very well in Terragen currently. On the bright side TG does handle very high poly objects fairly well, so if you can just bake it to real geometry it might work that way without displacement.

- Oshyan

WAS

Quote from: Oshyan on January 05, 2015, 12:46:26 AM
Unfortunately displacement on imported objects is not recommended at this time. It works to a certain degree and with minor displacement, but the kind of thing you're trying to do is generally not going to work very well in Terragen currently. On the bright side TG does handle very high poly objects fairly well, so if you can just bake it to real geometry it might work that way without displacement.

- Oshyan

I always cry reading this. Haha. I'm no good at modeling (terrible in fact), but fairly decent at PFs and displacements in TG.

Kadri

#4

It isn't quite made for this kind of work for objects as Oshyan said but actually with a little care
you can get very usable objects out of Terragen if you use  the "Ray trace objects" option unchecked in the render tab.

Not sure what your problem is here.
The object i used here was high poly but you can use low poly objects too to some degree.
It was a ball object when i imported it in Terragen. Then i exported it with the micro exporter as an obj file.
But you have to texture it for yourself if you want to use it outside of Terragen. The micro exporter doesn't export textures.

Kadri

#5

I played a little more with some settings and objects.

If you want better displacement make especially the edges of the object rounder with more polygons.
This is especially true with fractal displacements as they are displacing in every direction.
You could get away with less polygons on the object with image map displacement that are only to one side etc. for example.
Objects with surfaces that have very abrupt changes in direction like in a cube are hard to work on with this method.

The normals on the objects are important too.
Below is the same kinda high poly cube with one flat smoothing in Poseray and the other one with very smooth option.
As you see the smoothed object is better displaced (kare_smooth.jpg)

If you want a rock with many surfaces and it is a kinda round rock it should work without much problem if you smooth it especially before importing into Terragen.
The rock object you tried above needs probably more smoothing before importing into Terragen.

You can even displace a very basic 4 polygon surface to a landscape or whatever you want.
But there is a line when you have to use a dedicated 3D software for such things when you use more complex objects.

Oshyan

The other issue if you're going to attempt it with Raytraced Objects disabled (again, not recommended) is to avoid larger-scale displacements. The original examples above appear to be potentially using some larger-scale displacements which will almost certainly cause discontinuities.

- Oshyan

oysteroid

Thanks for the info. It would be very nice if it worked like the micropoly displacement you see in programs like Modo or Lightwave. Some kind of micropoly vector displacement would be even better!

Honestly though, I am surprised that something like this hasn't been implemented in Terragen, since so much of it seems to be about displacement. My interest in this regard isn't just rocks or logs or other loose objects. What if I sculpt a nice piece of topography or a mountain or cliffside or something in ZBrush and then want to use it in Terragen with additional displacements for fine detail? Even with a very high-poly model, when it is something like a mountain massif, you wouldn't want to get anywhere near the surface or you'd see the geometry breaking apart. You could always sculpt something like that and convert to an image to use as a height field. But you couldn't have overhangs in the original geometry this way.

It seems like there is something quite wrong with the way Terragen displaces the mesh. Of course, I am not a software developer, and I don't know how Terragen really works. There is probably a good reason it is the way it is. And maybe what I am wishing it would do is impossible for some reason I don't understand. But I don't see why the geometry couldn't just be dynamically tessellated or something according to how close the camera is and what resolution the render has. It wouldn't matter if the mesh gets triangulated in the process as with Sculptris or Blender's dynamic topology. Isn't something like this used with Renderman displacement shaders? Isn't this sort of what Terragen does with terrains anyway?

Oh well. For now, I'll just use bumpmapping on imported objects.

Oshyan

You can sculpt in external apps and export as VDisp and *apply it to terrain*. There are several recent discussions about how to do this with vdisp sources from various apps including Zbrush and Mudbox.

Applying any kind of displacement to the terrain (or any *built-in* displaceable object) works very well. The problem is that arbitrary imported objects are treated differently by the render engine and displacement is not currently handled properly on those types of objects. It's a fundamental render engine limitation at this point, simple as that. It's certainly something we want to address, but it does require some pretty fundamental changes to the render engine to work properly, which is why it hasn't been implemented yet. We'll get there...

- Oshyan

Dune

Remember there's only 1.5 guy working on TG! I am still amazed about what TG can do.

oysteroid

Thanks for the advice and explanation.

1.5 guys? Wow! And yes, it is amazing what Terragen can do!

TheBadger

^^ So I guess Oshyan is the half.  ;D Probably not the best way to put it, but its funny  :D Well, could be a complement... Oshyan does a lot for only half a person  :P
Sorry, just sounds funny  :-X
It has been eaten.

Upon Infinity

I think someone just had his license cancelled...   ;D 

Although I always thought Oshyan was the full-timer and Matt the part.

oysteroid

#13
Kadri,

A special thanks for your help! I've been trying a few things and see what you are saying. If the surface has a large radius of curvature relative to the polygon size, the gaps aren't visible. So I suppose that one can either reduce the sharpness of the curvature or increase polygons. And it seems to help a great deal to make sure to limit the amplitude of displacement relative to polygon size. It seems that if I am sculpting a rock and all I want for the added displacement in Terragen is detail finer than the detail already in the model at the polygon level, it shouldn't really be too much of a problem, except perhaps at sharp corners and the like.

Kadri

#14
Quote from: oysteroid on January 06, 2015, 07:09:29 PM
Kadri,

A special thanks for your help! I've been trying a few things and see what you are saying. If the surface has a large radius of curvature relative to the polygon size, the gaps aren't visible. So I suppose that one can either reduce the sharpness of the curvature or increase polygons. And it seems to help a great deal to make sure to limit the amplitude of displacement relative to polygon size. It seems that if I am sculpting a rock and all I want for the added displacement in Terragen is detail finer than the detail already in the model at the polygon level, it shouldn't really be too much of a problem, except perhaps at sharp corners and the like.

Yes if you plan accordingly and know the limits you can use it very easily for more things then you think.
I use it sometimes when i don't want to model parts for objects.
It is very easy to add detail with image maps in this way for example.

This was a test from another thread here around with the same subject.
A repeating basic image on an imported ball object:

[attachimg=1]

Actually as Oshyan said if you use Vectoral displacements you might get more-better-different results too maybe.
That is one part i haven't tried in Terragen.
Users like Ulco (Dune) and others used it for getting holes into terrains if i remember right.
This is the monster thread (18 pages) i think:
http://www.planetside.co.uk/forums/index.php/topic,16110.0.html
Another one:
http://www.planetside.co.uk/forums/index.php/topic,16154.0.html