obj parser in obj2rad and obj2mesh

Hi!

I am experiencing a strange problem with obj2rad and obj2mesh here. I have an obj-file, and if I load it with obj2rad, I get a nice radiance model of the file. If I use obj2mesh, the model has errors.

There are zero-surface polygons reported, so the CAD geometry is not really clean. However, I thought that the basic parser would be the same in both translators. Have I been wrong here? My problem is that I just decided to use mesh objects instead of instanced geometry resulting from obj2rad. So I wonder if I should go back in this case now.

Below the small images, "nice" from obj2rad, "corrupt" from obj2mesh (both as seen in objview).

TIA+CU Lars.

Hi Lars,

Both images look like they are suffering from image sampling errors. You should try rendering these at higher resolution, setting -ps 1 in rpict (or "set ps 1" in rvu).

I assume you're using the latest version of Radiance (3.6)?

-Greg

P.S. If the problem persists and isn't just image sampling, please send me your .OBJ file (compressed), and I'll have a look. Don't copy it to the mailing list, though.

···

From: Lars O. Grobe <[email protected]>
Date: May 17, 2005 10:51:09 AM PDT

Hi!

I am experiencing a strange problem with obj2rad and obj2mesh here. I have an obj-file, and if I load it with obj2rad, I get a nice radiance model of the file. If I use obj2mesh, the model has errors.

There are zero-surface polygons reported, so the CAD geometry is not really clean. However, I thought that the basic parser would be the same in both translators. Have I been wrong here? My problem is that I just decided to use mesh objects instead of instanced geometry resulting from obj2rad. So I wonder if I should go back in this case now.

Below the small images, "nice" from obj2rad, "corrupt" from obj2mesh (both as seen in objview).

TIA+CU Lars.

Hi Lars,

I found the problem. You have a couple of polygons with 105 vertices, which obj2rad leaves as is, but obj2mesh has to convert these to triangles, since that's all the mesh primitive supports. Unfortunately, the algorithm in place to do this only works properly for convex polygons. Implementing a proper, general triangulation method is a hard problem, and not something I have time for at the moment.

If anyone out there has a bit of code they'd like to lend to the cause, or a good reference they can recommend, I'd be happy to hear it.

-Greg

···

From: Lars O. Grobe <[email protected]>
Date: May 18, 2005 2:01:58 AM PDT

Both images look like they are suffering from image sampling errors. You should try rendering these at higher resolution, setting -ps 1 in rpict (or "set ps 1" in rvu).

My problem is that there are large closed surfaces in the one rendering, some kind of surface overlapping the window frame. I tried ps 1.

I assume you're using the latest version of Radiance (3.6)?

Yes.

P.S. If the problem persists and isn't just image sampling, please send me your .OBJ file (compressed), and I'll have a look. Don't copy it to the mailing list, though.

I attach the bzipped file. I also marked the overlapping surfaces in the png file.

Thank you, CU Lars.

Greg, you are my hero.

Kirk

···

On May 18, 2005, at 12:53 PM, Greg Ward wrote:

Hi Lars,

I found the problem. You have a couple of polygons with 105 vertices, which obj2rad leaves as is, but obj2mesh has to convert these to triangles, since that's all the mesh primitive supports. Unfortunately, the algorithm in place to do this only works properly for convex polygons. Implementing a proper, general triangulation method is a hard problem, and not something I have time for at the moment.

If anyone out there has a bit of code they'd like to lend to the cause, or a good reference they can recommend, I'd be happy to hear it.

-Greg

From: Lars O. Grobe <[email protected]>

I found the problem. You have a couple of polygons with 105 vertices, which obj2rad leaves as is, but obj2mesh has to convert these to triangles, since that's all the mesh primitive supports. Unfortunately, the algorithm in place to do this only works properly for convex polygons. Implementing a proper, general triangulation method is a hard problem, and not something I have time for at the moment.

If anyone out there has a bit of code they'd like to lend to the cause, or a good reference they can recommend, I'd be happy to hear it.

Hi Greg,

first thank You for finding the reason of this problem. I had been trying to find errors in the geometry for quite a while, so this was really a great help. I use a dxf file now, and convert that with Georg Mischler's dxf2rad.

There is a "GNU Triangulated Surface Library" (http://gts.sourceforge.net/), I am not sure if it can be useful ?

CU Lars.

Hi Lars,

Thanks for the pointer to the GNU gts library. This probably has what we need, buried in there somewhere. Getting it out would take some time, and might require converting Radiance to a GNU-compatible license. Not really an option, I think.

-G

···

From: Lars O. Grobe <[email protected]>
Date: May 18, 2005 11:54:10 AM PDT

Hi Greg,

first thank You for finding the reason of this problem. I had been trying to find errors in the geometry for quite a while, so this was really a great help. I use a dxf file now, and convert that with Georg Mischler's dxf2rad.

There is a "GNU Triangulated Surface Library" (http://gts.sourceforge.net/), I am not sure if it can be useful ?

CU Lars.