Observatory - WIP - *Update 1*

Started by firesuite, April 02, 2008, 11:58:31 PM

Previous topic - Next topic

Matt

The object will need to have normals calculated per vertex so that TG can interpolate them correctly. I don't know exactly how to do that in Maya but it should be possible to generate these normals before saving the OBJ. Also make sure that "use smooth normals" is enabled in the OBJ Reader in TG. TG may prefer the object if they are triangles rather than quads, but if that is the problem then there may be a bug in TG's convertion from quads to triangles.

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

Mr_Lamppost

Quote from: Matt on April 08, 2008, 03:49:47 PM
The object will need to have normals calculated per vertex so that TG can interpolate them correctly. I don't know exactly how to do that in Maya but it should be possible to generate these normals before saving the OBJ. Also make sure that "use smooth normals" is enabled in the OBJ Reader in TG. TG may prefer the object if they are triangles rather than quads, but if that is the problem then there may be a bug in TG's convertion from quads to triangles.

Matt

I have noticed similar smoothing artefacts; I have assumed that they come about when regardless of the direction of the normails at the vertices the entire face, triangle or quad, is in shadow.  I don't think I have any examples saved but they will not take long to generate. ;)
Smoke me a kipper I'll be back for breakfast.

Matt

Ah.. yes, you're right. It looks like smoothing is working OK and it's just the terminator that's faceted. The model will need to be more highly subdivided, and you may be able to hide any remaining problems by enabling soft shadows.

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

firesuite

thanks for the reply Matt,

I have tried extra smoothing and triangulating the object and the results got better but were not perfect, I will work on calculating the normals later as im off on vacation in a few hours so will pick this one up when i return. thanks again.

Matt

#20
I now think the smoothing is working OK so there's no need to do anything about the normals.
Just because milk is white doesn't mean that clouds are made of milk.

Mr_Lamppost

Here are a some example spheres which show that there is definitely a problem with certain faces not being lit on the terminator. All sphere were made using Wings 3D and have 48 equatorial and 24 vertical steps.  The two on the left have all the edges set to be "Hard" while the ones on the right are fully smoothed. The ones nearest the camera are exported as Quads while the other two furthest away are fully triangulated.    The zip contains both the .tgd and the four sphere objects (.obj format).

These rendering anomalies are suggestive.  I am assuming that the renderer draws the surface one triangle at a time, splitting quads if necessary.  How does the renderer decide if a triangle is lit?  Are all three vertex normals tested or is the face normail used as would be the case for a flat shaded object? 
Smoke me a kipper I'll be back for breakfast.

Matt

#22
The problem is described here:

http://www.blender.org/development/release-logs/blender-234/misc-improvements/

That document describes an optional workaround that they've implemented in Blender, but I don't know whether I want to implement that or how well it will work on more varied models.

The problem is that shading depends on two things: surface normals and ray-traced shadows. Even if the surface normals are interpolated correctly, you may have parts of the object which have normals pointing towards the light-source but are sitting on a face which is geometrically in shadow according to the ray tracer. Both the ray tracer and the normal interpolation are correct, but they convey different descriptions of the surface. The root of the problem is that there aren't enough polygons in the geometry. One way that a renderer can solve this is to subdivide the polygons and displace the surface so that its geometry matches the interpolated surface normals. Otherwise we need to apply tricks like those mentioned in the above article.

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

Harvey Birdman

I exposed this same problem a while back with a rendering of a mosque with a golden dome on the roof - http://forums.planetside.co.uk/index.php?topic=2495.0. It'd be good if there were some sort of fix for this.