Glass & MTL file troubles... (or how to go from Revit to Radiance with little pain...)

Hi Jeffrey,

1. Revit likes to model glass as a solid plate, not a flat surface. So a bit of glass is a rectangular solid, not a flat plane. So when I try to make the windows into Illum's so that they spread light into the room, I'm getting errors and problems because I think it's looking for a flat plane with the normal pointing into the building. How important is it to have the Windows be a lightsource for interior renderings? Is there some way, via Mkillum or something, that I could quickly work around this issue? I can flatten the glass in Max, but that's an extra step and one that seems to also cause issues with zero-area light surfaces.

Ugh. Yeah, programs like Revit and 3DS, et al. make glazing planes as 3D objects with six polygons. No good. Your errors and problems are definitely related to this. mkillum expects a single polygon, looking in. Not sure how you're flattening the planes, but I'll bet you're still ending up with a pair of triangular polys representing the glass plane, and who the hell knows which way they're facing. mkillum likes regular polygons. Page 577 of Rendering with Radiance has the gory details. Not sure the answer to your problem, just stating the issues.

2. When I export out of Max, I get a .OBJ and a corresponding .MTL materials file. I currently use Grep and such to pull out all the material definition names out of the RAD file I get from OBJ2RAD, and then creating the .MAT radiance material file by hand. I'd love to hear a way to take the exported .MTL file and turn it into a starting point for my .MAT (short of having to write my own tool to do so...).

If you can grep the stuff out, I'd bet you could write something to take the result(s) and generate a corresponding .mat file, with shell scripting techniques, or python or perl, or whatever.

Now, we're just designers, and looking for design feedback not hard numbers. We'd be happy with something somewhat-accurate, for if/when we need 'real numbers' we'll typically turn to a lighting designer who know how to generate accurate numbers. But I figure, heck, we're generating these models anyways, why not try to put that to better use?

Sounds like a plan. The thing is, you are closer to real numbers than most lighting designers, by having the wherewithal to tackle Radiance. Don't short-change yourself. A good model and sound parameters in Radiance beats any of the tools commonly used in lighting design, IMO.

- Rob

···

On May 10, 2006, at 9:13 PM, Jeffrey McGrew wrote:

Jeffrey McGrew wrote:

And actually, I've got a secret plan to make better and more
widespread use of it where I work (Gensler).

Same thing here, though I my company _wants_ to use Radiance.
I just have to sort out the workflow first.

1. Revit likes to model glass as a solid plate, not a flat surface. So a
bit of glass is a rectangular solid, not a flat plane. So when I try to
make the windows into Illum's so that they spread light into the room,
I'm getting errors and problems because I think it's looking for a flat
plane with the normal pointing into the building. How important is it to
have the Windows be a lightsource for interior renderings?

I think your looking for high quality renderings of the interior, so
you definitely want to use mkillum to restrict your scene to the interior.
If it's just a crude rendering I'd create a sky and wouldn't bother
much about the windows as light source.

Is there some
way, via Mkillum or something, that I could quickly work around this
issue? I can flatten the glass in Max, but that's an extra step and one
that seems to also cause issues with zero-area light surfaces.

You could write a script to delete polygons with material glass based
on their area (reduce 6 sides to 2) and vicinity to already checked
polygons (reduce 2 to one) but that's not going to be easy. You might
be able to edit the windows in MAX to get a Radiance friendly geometry.

2. When I export out of Max, I get a .OBJ and a corresponding .MTL
materials file. I currently use Grep and such to pull out all the
material definition names out of the RAD file I get from OBJ2RAD, and
then creating the .MAT radiance material file by hand. I'd love to hear
a way to take the exported .MTL file and turn it into a starting point
for my .MAT (short of having to write my own tool to do so...).

Please see the man page for obj2rad. The top section describes
material mapping based on the context (or material) of the face
in the obj file. If you use the same set of materials in all your
models you could create a material library and a corresponding
mapping file. Obj2rad then assigns the correct Radiance material
name (as far as I understand this point, never used it much).

Now, we're just designers, and looking for design feedback not hard
numbers. We'd be happy with something somewhat-accurate, for if/when we
need 'real numbers' we'll typically turn to a lighting designer who know
how to generate accurate numbers.

You're welcome! If you can provide Radiance geometry we might
offer a discount ... :wink:

Thomas

···

***********************************************************************************
This e-mail, (and any attachments) is confidential and may be privileged. It may be read, copied and used by the intended addressee only. If you have received this in error please contact BDP immediately.

If you have any queries, please contact the sender.
***********************************************************************************
Building Design Partnership
Registered in England No 2207415:
Registered Office: Building Design Partnership Ltd, Sunlight House, PO Box 85, Quay Street, Manchester, M60 3JA, http://www.bdp.co.uk
***********************************************************************************

Hi!

How important is it to have the Windows be a lightsource
for interior renderings?

You will get nicer Renderings with lower ambient settings. But with big
window openings, it should not be really necessary to use mkillum. If you
use it, consider generating the faces in another tool that gives you more
control, maybe "even" writing them with an editor.

looking in. Not sure how you're flattening the planes, but I'll bet
you're still ending up with a pair of triangular polys representing
the glass plane, and who the hell knows which way they're facing.
mkillum likes regular polygons.

Triangles don't work with mkillum. Still, the obj format is not limited to
triangles, it depends more on the modeler (and you must make sure that the
panes are 100% plain).

> to hear a way to take the exported .MTL file and turn it into a
> starting point for my .MAT (short of having to write my own tool to
> do so...).

Do you know obj2rad's -n option?

CU Lars.

Rob Guglielmetti wrote:

Ugh. Yeah, programs like Revit and 3DS, et al. make glazing planes as 3D objects with six polygons. No good. Your errors and problems are definitely related to this. mkillum expects a single polygon, looking in.

OK, that's what I thought. I'm not using Mkillum yet, just trying to make the windows into a Illum source with Skyfunc and not having much luck.

Not sure how you're flattening the planes, but I'll bet you're still ending up with a pair of triangular polys representing the glass plane, and who the hell knows which way they're facing. mkillum likes regular polygons. Page 577 of Rendering with Radiance has the gory details. Not sure the answer to your problem, just stating the issues.

I'll look that up. Thanks for the confirmation.

I'm able to flatten the planes in Max via the 'Edit Poly' modifier. Thankfully, all of those 6-sided polys have their Y-axis pointing the same way it appears, even if tilted/turned, so I can flatten them all with a single tool. However, this doesn't remove the side polys, and leaves you with two flat faces I suspect, so I'll have to research this method more.

If you can grep the stuff out, I'd bet you could write something to take the result(s) and generate a corresponding .mat file, with shell scripting techniques, or python or perl, or whatever.

Yeah, my unix god friend pointed me towards AWK as a simple solution. I'm just lazy, and can't write code quickly (not a programmer) so I was hoping that there might be a solution out there already.

Sounds like a plan. The thing is, you are closer to real numbers than most lighting designers, by having the wherewithal to tackle Radiance. Don't short-change yourself. A good model and sound parameters in Radiance beats any of the tools commonly used in lighting design, IMO.

Didn't know that. Huh. Well, Revit produces very good models (other than this glass thing) so I'm halfway there I guess.

Jeffrey

Bleicher, Thomas wrote:

I think your looking for high quality renderings of the interior, so
you definitely want to use mkillum to restrict your scene to the interior.
If it's just a crude rendering I'd create a sky and wouldn't bother
much about the windows as light source.
  

That's what we've got going, it's a building with lots of glass and skylights and such. So do you think just having the windows be glass would be enough to get somewhat-close numbers? I fear that not making the glass a secondary light source, and just having it be, well, glass and only having the ray of sunlight bouncing around is going to give me bad numbers.

You could write a script to delete polygons with material glass based
on their area (reduce 6 sides to 2) and vicinity to already checked
polygons (reduce 2 to one) but that's not going to be easy. You might
be able to edit the windows in MAX to get a Radiance friendly geometry.
  

That's what I'm doing, I can edit them in Max via the 'Edit Poly' modifier, but I'll need to research this more. I want to stay away from hand-editing much of anything, for I want to be able to go back and edit the Revit model, re-export to Max, and from there re-export to OBJ2RAD for quick revisions. So far, so good on that front, but this glass thing is leaving me stumped.

Please see the man page for obj2rad. The top section describes
material mapping based on the context (or material) of the face
in the obj file. If you use the same set of materials in all your
models you could create a material library and a corresponding
mapping file. Obj2rad then assigns the correct Radiance material
name (as far as I understand this point, never used it much).
  

I saw that. I was hoping there was a way to use the .MTL file that's already generated by Max. Basically, I'm just being lazy, and hoping there was an existing solution out there.

You're welcome! If you can provide Radiance geometry we might
offer a discount ... :wink:

Now that doesn't sound like a bad idea! :wink:

···

--

Jeffrey McGrew

Because We Can, LLC
(415) 505-4689

Lars Grobe wrote:

You will get nicer Renderings with lower ambient settings. But with big
window openings, it should not be really necessary to use mkillum. If you
use it, consider generating the faces in another tool that gives you more
control, maybe "even" writing them with an editor.
  

'Nicer' is good, but I'm worried about the actual numbers. We want renderings as well as falsecolor images. If we just wanted nice renderings, we'd probably go to vRay, which is kind of our unofficial standard for 'sexy' images. If I can get 'ok' renderings but decent falsecolor images without having to edit the glass or use it as a lightsource I could make this whole process very, very easy.

Triangles don't work with mkillum. Still, the obj format is not limited to
triangles, it depends more on the modeler (and you must make sure that the
panes are 100% plain).
  

Yeah, when I export to OBJ I'm picking the 'poly' option which seems to produce polygons and rectangles. Revit produces rectangles/polys as well, it doesn't render everything to triangles like some modelers. So I think I'm ok there.

Do you know obj2rad's -n option?

Yeah, just being lazy, and hoping for an easy solution.

What would be the best is to use the new Revit API to write an Radiance exporter, and skip Max altogether. However, this is beyond my abilities and available time currently (and sadly).

Jeffrey McGrew

Because We Can, LLC
(415) 505-4689

Hi!

That's what we've got going, it's a building with lots of glass and
skylights and such. So do you think just having the windows be glass
would be enough to get somewhat-close numbers? I fear that not making
the glass a secondary light source, and just having it be, well, glass
and only having the ray of sunlight bouncing around is going to give me
bad numbers.

I think you are worried too much here. The numbers should not change so much
because of mkillum, the image will look nicer in many cases. But the main
reason for mkillum is the following.

If you have a model where most of the indirect light enters the room through
small windows, the probability that the (random) indirect rays, which are
send from the surface to several (random) directions to find out its
indirect contribution hits the (small) light source is getting low. You can
increase the number of random rays, but that won't help sometimes and takes
a lot of rendering time. So, in these cases, it is better to bring the light
source closer. Bt as it sounds to me, your model is not the typical case
with shading devices etc, right? So, if you have simple, large windows, at
least your numbers should be fine.

Lars.