Image-based simulations

Hi everyone,
I want to simulate an image with DIVA and should map textures on desks and view out on the sky.
I defined HDR image(located:C/DIVA/Radiance/lib) in the material file:

void colorpict tux_image
15 clip_r clip_g clip_b tux .hdr picture . cal pic_u pic_v -rx 90 -s .5989 -t .1 0 .1
0
0
tux_image plastic painting_mat
0
0
5 1 1 1 0 0

But the wall is all black.What is the problem?
For the sky definition, should I change settings in the sky file in DIVA Temp folder?
How can I use HDR fish-eye image for view from the window?
I read tutorial files on the Radiance-online website but I couldn’t change these files.

Best regards,
Maedeh Mirdamadi

Hi Maedeh,

Welcome to our forum!

There appear to be multiple problems with your scene description. What is the name of your HDR image, and what does it look like? Is it a fisheye view? Was it built with Photosphere or some other tool? Where is the window located in the scene – can you share the polygon geometry with us?

This is not a particularly simple task to perform if you are attempting to map a photo out the window to said window. The snippet you seem to have borrowed is for mapping a picture to a picture frame, which is a very different problem.

Hi Mr.Ward
Thanks for your quick response.
I apologize for my ambiguity. I have two problems in my simulations:

  1. when I defined a sample HDR file(tux.hdr) in DIVA material file, and assigned it on the wall, the wall was black after simulation. The HDR files is a sample file that I downloaded.

void colorpict tux_image
15 clip_r clip_g clip_b tux .hdr picture . cal pic_u pic_v -rx 90 -s .5989 -t .1 0 .1
0
0
tux_image plastic painting_mat
0
0
5 1 1 1 0 0

  1. I want to map an HDR image for view from the window. I read IBL method from Debevec and Inanici(2009). But unfortunately, because of my unfamiliarity with Radiance, I don’t know how can I map fish-eye image on the sky.

I simulated daylight images with DIVA, Honeybee and climatestudio before

You still haven’t shared either your image or the polygon you are mapping it onto. We need to see this information to understand how to map it to your scene.

Your colorpict primitive has syntax errors, which may or may not be in your actual scene description. What should read “tux.hdr” reads “tux .hdr” with a space in it. Similarly, “picture.cal” is “picture . cal” in your file. These will not work as written, but I assume this is just the result of bad copy-and-paste. More significant are the transform options “-rx 90 -s .5989 -t .1 0 .1” which will work only for a particular size and postion of your mapped polygon. That is why we need to know what polygon you are modifying with “painting_mat,” as this determines the correct transform to use.

To understand how to do these things in Radiance, you really ought to read the second and third chapters of “Rendering with Radiance,” if you have access to it.

Regarding mapping a fisheye image to a window, I can help you if you provide me with the image and the polygon you are mapping it onto. Without this information, I’m as lost as you.

Hi Greg,
I sincerely apologize for the delay in response. I needed time to test something in my simulations.
As your assumption the spaces in “tux. hdr” was the result of copy-paste in my comments.

I need to map wood texture on chairs, carpet on the wall (the brown part), and map view out on the sky
HDR files, view out from the window, and the carpet texture are attached in the Google drive link. The view out image didn’t capture with fisheye lens. Is it possible to map on the sky?

Unfortunately, I have not access to “Rendering with Radiance” book.

https://drive.google.com/drive/folders/1YbbN90og4G6CQAfCi9w3AeizohQRhhhr?usp=sharing

Thank you for your patience all this while.
Best regards,
Maedeh

I don’t have time at the moment to go through and correct your mappings. I suggest you look at the somewhat outdated tutorial at: https://floyd.lbl.gov/radiance/refer/usman1.pdf starting page 25, where it covers how the mapping process works. The files associated with this tutorial should be included in the ray/obj/cabin directory of the distribution. You can also write to Randolph Fritz rmfritz3@gmail.com asking how to purchase a copy of Rendering with Radiance.

I don’t think you’ll be able to map a photo taken out the window to the window, due to parallax issues.

Thanks for your help.
I will read tutorials and the book.

Best Regards.