mesh displacement splits edges

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

Previous topic - Next topic

Oshyan

Just remember, Vector Displacement only works that well on terrain. But if you have a high enough poly object and you render it without raytracing, you can indeed get pretty good displaced results on imported objects.

- Oshyan

Kadri

January 06, 2015, 09:29:17 pm #16 Last Edit: January 06, 2015, 09:37:11 pm by Kadri

And don't forget the normals of the object.
I use Lightwave but when i export my obj files (Poseray can import LWO files too) i use Poseray before i import them into Terragen.
Depends on which software you use, you might not need it maybe, but in general Poseray obj export is very friendly for Terragen use.
The "Recalculate normals" option (with sometimes 180 Crease angle) in the "Groups" tab in Poseray is sometimes more of a help then using more polygons on objects as i wrote above.
Just to be clear, in the smoothed example of the cube above that was what i meant what i did in Poseray.

Dune

2 things: Oshyan, I didn't mean anything belittling by mentioning 1.5 guys  ;)
And when you work in LW and want to send stuff to Poseray, put differently angled things (to put it that way) in layers; in Poseray it's then easier to recalculate softer or harder parts differently by obscuring certain layers temporarily.

Oshyan

Smooth Normals are critical, as I discovered last night. In fact it's OK to use a lower poly object as long as you have properly calculated Smooth Normals and you render with Raytrace Objects disabled. In that case you can actually get pretty good displacement on imported objects.

No worries Ulco. If we're talking about direct contributions *to the software*, then it's a lot less than 0.5 for me (virtually nothing, really), and a small bump for Jo's continued involvement (he helped with 3.2 for example).

- Oshyan

Kadri

Quote from: Oshyan on January 07, 2015, 04:16:57 pm
Smooth Normals are critical, as I discovered last night. In fact it's OK to use a lower poly object as long as you have properly calculated Smooth Normals and you render with Raytrace Objects disabled. In that case you can actually get pretty good displacement on imported objects.
...


Yep.Whatever magic Matt uses i don't know, but it looks like when the objects are smoothed Terragen does see those parts kinda more subdivided or whatever.

oysteroid

Thanks, guys! I finally got around to trying using Poseray to smooth the normals and it really seems to help dramatically!

I also fiddled for a while and got the vector displacement thing working with maps exported from ZBrush. So thanks for that suggestion! You guys are very helpful!

I use Blender for most 3D work. So I wondered if I could smooth the normals similarly there. Of course, there is the option in Blender to use smooth shading. But when I checked the exported OBJ, it wasn't smooth. But then I found an option in the OBJ exporter to "write normals". If the object is set to use smooth shading and "write normals" box is checked on export, it works just the same as what I got out of PoseRay, just in case anyone else out there is a Blender user.

I notice a lot of people around here seem to like PoseRay. What else do you use it for?

Dune

Poseray; I always take my LWO's through Poseray to make them into OBJ's. And I use it to combine shared maps/parts from DAZ objects, so they're not ten the same maps to be called ten times in TG.

bobbystahr

Quote from: Dune on January 08, 2015, 02:54:35 am
Poseray; I always take my LWO's through Poseray to make them into OBJ's. And I use it to combine shared maps/parts from DAZ objects, so they're not ten the same maps to be called ten times in TG.


I use it in much the same manner. Also for creating the Parts shaders many .obj's I dl that have a Materials Tab fully populated but Groups with multiple textures on the same part which TG doesn't grok.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Matt

January 08, 2015, 11:21:31 am #23 Last Edit: January 08, 2015, 11:24:01 am by Matt
Quote from: Kadri on January 07, 2015, 04:29:56 pm
Quote from: Oshyan on January 07, 2015, 04:16:57 pm
Smooth Normals are critical, as I discovered last night. In fact it's OK to use a lower poly object as long as you have properly calculated Smooth Normals and you render with Raytrace Objects disabled. In that case you can actually get pretty good displacement on imported objects.
...


Yep.Whatever magic Matt uses i don't know, but it looks like when the objects are smoothed Terragen does see those parts kinda more subdivided or whatever.


If the object doesn't have normals, Terragen defaults to using the face normals. These are usually discontinuous from face to face. If two neighbouring faces are displaced along a different normal then the object splits apart at the shared edge (Terragen doesn't fill in the gaps).

If the object has normals (vertex normals) and the normals are the same for each shared vertex (they are "smooth"), the normals at the face edges will be the same for all neighbouring faces, so displacement doesn't cause them the split separate.

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

Matt

January 08, 2015, 11:33:54 am #24 Last Edit: January 08, 2015, 11:41:23 am by Matt
To summarise:

Displacement works on imported objects. The renderer needs to have "ray trace objects" turned OFF. To avoid splitting edges, the object needs to have normals, the normals need to be smooth across the whole surface, and "use smooth normals" needs to be enabled on the object reader (which it is by default).

However, shadows (and self shadows) of these objects will not be displaced. Nor will reflections and GI contributions. That's because ray tracer can't displace imported objects, it can only displace built-in displaceable primitives such as the planet, plane etc. This limitation means that the lighting on the object might look strange if displacement is extreme, as the shadow it casts on itself is cast by the non-displaced surface.

We plan to make the ray tracer able to displace all objects in a future version. This will solve the shadow and reflection problem and will allow displacement while "ray trace object" is on.

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

Matt

Also, there is a separate feature in TG3 Professional called "mesh displacement". This feature does work with ray tracing because it displaces the vertices of the object at the time of import, before any rendering begins. If you want to use Terragen procedurals to displace an object and have correct shadows and reflections, you can do this with the "mesh displacer" input on the object. The detail of the displacement depends on the detail of the imported object, because this is not micropolygon displacement.

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

Kadri


Thanks for the explanation Matt. I wanted to test why the Mesh displacer didn't displace in the same way. It is clear now.
Just one question. Probably not so urgent but is there any plan to use more optimized (polycount) obj output from Terragen?