I am new to Radiance. I am following the tutorial material: radiance_tutorial, subsection 2.2.3 More Complex Scenes, page 15. For step 4, I add the command “! genbox glazing_mat glass 4 0 3” in room.rad file, and when I run “objline room.rad | x11meta”, it shows that
Usage: genbox material name xsize ysize zsize [-i] [-b bevel | -r round [-n nsegs][-s]] [-o]
xform: (! genbox glazing_mat glass 4 0 3): warning - empty file
how should I deal with this warning, like in the same folder to create a glazing.mat file?
your “box” has a 0 value in the y-dimension, that causes the problem. A box needs positive values in all dimensions. Do you want to generate a surface rather than a box? If so, then use the command gensurf instead.
Thank you so much for your reply. You are right, it is the 0 value in the y-dimension that causes the problem.
I am following the tutorial material which has not introduced the gensurf command yet. So, if I want to generate a pane of glass and place it on the wall, I use the “genbox glazing_mat glass 4 0.01 2” to generate a glass which y-dimension is small and use “xform -t 0 0 1” to place it on the wall. The code is as following:
Hi Hao, the little exercise in Section 2.2.3 is actually meant to be done by editing the room.rad text file:
a) run
$ genbox wall_mat room 4 5 3 > objects/room.rad
b) open objects/room.rad in a text editor. It contains 6 polygons, all with wall_mat applied
c) apply ceiling_mat and floor_mat to the ceiling and floor polygons, resp. You have done this correctly.
d) now also identify the south-facing wall. This is room.1540 in your case.
e) copy the 8 lines of the room.1540 polygon and past them into the same file. Let’s call this polygon room.1540window
f) lower the max z coordiantes of room.1540 from 3 metres to 1 metre. This becomes your window sill. Retain the wall_mat material
g) raise the min z coordinates of room.1540window from 0 metres to 1 metres. This is now your glazing. Change the material to glazing_mat
You should now have 7 polygons with 4 different materials in objects/room.rad, forming an air tight box.
wow~ thank you so much! Your reply is very clear and helped me a lot to understand the Radiance. I really appreciate it. I have followed your suggestion to replace “!genbox glazing_mat glass 4 0.01 2 | xform -t 0 0 1” with polygon room.1540window.
Also, can I ask you another question about step 6 of the exercise in Section 2.2.3. I created the bulb.rad file is as follows, but it does not work. Could you please tell me how to finish this step or where I can see the tutorial material to finish this step?
Really appreciate your explanation and revision. This also really helps me to understand the relationship between modifier, type and identifier. I will follow your suggestion to revise the RGB value of the material.
Hi Axel, I revised the bulb.rad as follows. But when I run the command: objline bulb.rad | x11meta, it has the following errors. could you please help me to fix this error?
Best regards,
Hao
Bulb.rad
void light bulb_light
0
0
3 0.25 0.25 0.25
bulb_light sphere bulb_geometry # link geometry to material
0
0
4 0 0 0 0.03
Apologies, Axel. This is my fault. I am unfamiliar with Linux and caused this fool error. Sorry again and thank you very much for your help. I appreciate your assistance.