Page 1 of 2

HDRI WYSIWYG with Spherical object

Posted: Tue Oct 06, 2009 3:49 am
by stefan_kaplan
When working with HDRI's in SketchUp I thought it was frustrating not knowing how the HDRI-images were oriented.
I wanted to use them for background, illumination and reflections but I couldn't control the Offset-parameters.
Now I've made my own work-around:
A "HDRI-sphere" with the the .hdr-image mapped to the inside and a compass to translate the U Offset rotation. (I guess it could be expanded to cover the V Offset rotation as well...)
Place your model at the center of the sphere and the result is rather close to WYSIWYG and fast to adjust but takes some steps to setup:

- Make a flipped jpg from a HDRI-image. In this example I used "radsky-017.hdr" that comes with the Maxwell installation. The .hdr is opened in Photoshop, flipped horizontally, mode changed to 8 Bits/Channel and saved as a .jpg-image (I call it a "HDRI-jpg").
- The HDRI-jpg is mapped onto the inside of the sphere using a ruby-script called "UVtools.rb" (UVtools does not map perfectly at the "poles" of the sphere, but rather nicely though). After one HDRI-jpg has been mapped, it can simply be replaced by other HDRI-jpgs.
- The model should be build or placed near the center of the sphere - or the sphere should be moved so that it's center is close to the model. The larger the sphere, the closer to WYSIWYG-effect.

Image
In this image the Sidney Opera House is placed in the center of the sphere.
- Rotate the sphere in order to get the desired HDRI-orientation in the render-view. Use the little circular face on top of the sphere as rotation-plane.
(IMPORTANT: Rotate only the sphere, not the compass).
In this example the HDRI has been turned 40 degrees counter-clockwise. Therefore the black arrow points at 40!

Image
SketchUp render-view with desired HDRI-orientation.

Image
- Browse for the original HDRI-image.
- In "U Offset" enter the degrees pointed out by the black arrow (in this example: 40)
- Hide the HDRI-sphere or turn off the layer "HDRI" before exporting.
- Render!

Image
Render result equals the SketchUp-view.
If the HDRI-image is used as a background it might get pixelated (the resolution is too low).
A simple solution is to open the .hdr-file in Photoshop and change the Image Size.

Image
In this render the "radsky-017.hdr" has been made 350% larger.
I've named it "radsky-017_highres.hdr" and only use it in the background slot in the HDRI Settings Window, in order to save RAM.

Please download my HDRI-sphere here.


/ Stefan

Re: HDRI WYSIWYG with Spherical object

Posted: Tue Oct 06, 2009 9:28 am
by numerobis
Very useful! Thanks! 8) :D

Re: HDRI WYSIWYG with Spherical object

Posted: Tue Oct 06, 2009 2:53 pm
by Richard
Thanks for posting this Stefan, here is the one I posted here some time ago but asked for some help from the Tom and co but no luck, was trying to work out how to position the grid correctly and the marker. One must remember maxwell's offset value 100=360 deg's (very handy?).

I wanted to use this method to place HDRI sun in indentical position to SU sun! Problem to date though that maxwell HDRI didn't produce shadows anyway! And counting on HDRI plus sun is fine until you go into studio and sun positioning is lost, why it doesn't open correctly from the MXS is anyone's guess!

Similar process to yours,

1. open hdri in PS drag on grid / dot layer set,
2. locate dot over hdri sun,
3. turn off backround (hdri),
4. save as PNG,
5. In SU scene drag in sphere component,
6. reloade grid with new png,
7. rotate sphere in horizontal and vertical axis,
8. read and apply offset values,
9. by just a few more quick steps one can get sun to exact SU sun location.

Image

Re: HDRI WYSIWYG with Spherical object

Posted: Tue Oct 06, 2009 3:03 pm
by Richard
Actually Stefan looking at your example it shouldn't be placing the HDRI correctly as you have set the offset at 40 deg, where it should be 11.11 - now I'm confused again about these offset settings.

Re: HDRI WYSIWYG with Spherical object

Posted: Wed Oct 07, 2009 2:31 am
by stefan_kaplan
Richard wrote:Actually Stefan looking at your example it shouldn't be placing the HDRI correctly as you have set the offset at 40 deg, where it should be 11.11 - now I'm confused again about these offset settings.
To figure out how the U Offset was rotating I had to do some trial and error!
Because of the HDRI-jpg on the inside of the sphere I found out rather quickly though, that the offset range from 0-360.
Here's an example with rotation at 120 deg.


Image
I rotated the HDRI sphere until the arrow pointed at 120.

Image
This is how it looks in the SketchUp-scene.

Image
The HDRI parameters are set at 120 (in this render I only used HDRI for background...).

Image
The render result equals the SketchUp-scene with 120 deg. HDRI rotation.

One major thing the plugin needs is some more information on unit sizes!
Why doesn't it say "0-360" next to the Offset fields in the HDRI Settings Window?
SketchUp is such an easy and intuitive program to use and the way that Maxwell is integrated seems to follow the same "mentality": Only 6 buttons, nice way to link materials and so on.
I teach architects in using Maxwell from SketchUp. Most of them have never used a render software before and they like the simplicity of the basics in Maxwell.
But the menus in the Maxwell Plugin need to be more informative, eg. with unit sizes:
In the Camera Settings it says: "Shutter: ____". Why not say: "Shutter 1/____ sec."?
In the Exporter Options it says: "Render time: _____" Why not say: "Render time: _____ min."?

The Vray Plugin for SketchUp has great tooltips (you know the yellow flags that popup when resting the cursor over a button) with ALOT of text explaining various functions.
That could also be a solution...

Hmm I guess this belongs in the Wish thread :)

Richard, I saw your HDRI Sphere-method a while ago and really liked it!
It's great for matching an emitting area in the HDRI with the sun position in SketchUp.
What I wanted was something closer to WYSIWYG since I usually use HDRI's only for background and reflections. I needed to be able to "place the clouds" in SketchUp :)

Richard wrote:I wanted to use this method to place HDRI sun in indentical position to SU sun! Problem to date though that maxwell HDRI didn't produce shadows anyway!
I think the shadows look quite good in the HDRI illumintaion in v2. But it's all so very blue... I guess that's why I don't use HDRI's for illumination.
I made a simple test with the provided HDRI, "skiesv2_12.hdr":

Image

/ Stefan

Re: HDRI WYSIWYG with Spherical object

Posted: Wed Oct 07, 2009 5:20 am
by Richard
Yeah your right, your background ends up in the correct location! This to me doesn't make sense unless the plugin is working in degrees for offsets and Studio works in 0-100 = 0-360 deg?

And I think here is proof in the pudding!

Rendered direct from plugin U offset = 120

Image

Rendered from studio U offset = 120 (interestingly when above export opened in studio offset given as 1000?) go figure!

Image

Re: HDRI WYSIWYG with Spherical object

Posted: Wed Oct 07, 2009 5:45 am
by Richard
Hmmmm?

Now one wonders further! I just tested in studio, to get the same HDRI location as from the SU plugin I had to set the offset to 0 or 100,200,300 etc (full revolutions). This to me would mean that the offset in the plugin actually has no effect?

If I put in 33.333 as one would expect if the plugin is working in deg and studio in 1-100 the result is yet again different to the two above! I wonder if it has been fixed in the V2 plugin?

This is all weird, I wish NL would chime in here!

Re: HDRI WYSIWYG with Spherical object

Posted: Wed Oct 07, 2009 5:57 am
by Richard
Hmmm? actually no value in the plugin makes any difference! must have been fixed in v2 plug!

Re: HDRI WYSIWYG with Spherical object

Posted: Wed Oct 07, 2009 4:23 pm
by stefan_kaplan
Richard wrote:Hmmm? actually no value in the plugin makes any difference! must have been fixed in v2 plug!
I guess it is fixed in v2 then!
I don't use Studio (as I like to use as few programs as possible) but I tried to open the MXS-file from the render I made where the HDRI-image's V Offset was "120":

Image
This was the scene-view in SketchUp.

Image
The HDRI-rotation in Maxwell Studio v2 matches SketchUp.
- The HDRI-sky has the same orientation.
- The Environment Panel says "Offset (°): 120,000" wich I believe indicates the use of ordinary degrees.

/ Stefan

Re: HDRI WYSIWYG with Spherical object

Posted: Wed Oct 07, 2009 9:33 pm
by Richard
Yeah definately has the degree symbol there in two thats very cool! Definately something they have fixed then! Well done and nice find mate!

Re: HDRI WYSIWYG with Spherical object

Posted: Thu Oct 08, 2009 1:55 am
by Richard
Hmmmm? Weird!

In your screen shot it shows degrees as the offset values yet in the information on IBL on the THINK site for V2 it shows offset as %! what's going on?

Re: HDRI WYSIWYG with Spherical object

Posted: Thu Oct 08, 2009 2:30 am
by stefan_kaplan
You are right! :shock:
The text at Think! even goes: "Offset: Rotate the spherical environment in the X and Y axis. 0 - 100 represents rotation from 0 to 360°."

Just had to post the images, haha:

Image and Image
Left: The Environment Panel screendump used in the Introduction to IBL at Think! Right: Screendump from the actual released Studio v2.0!

They must have changed "Offset (%)" to "Offset (°)" just before release...?

I like the "Apply to all"-button, by the way.

/ Stefan

Re: HDRI WYSIWYG with Spherical object

Posted: Fri Oct 16, 2009 10:52 am
by Mihai
Yup, sorry for the confusion. It was a late change, it's in degrees now.

Re: HDRI WYSIWYG with Spherical object

Posted: Thu Nov 05, 2009 1:28 pm
by messire
Guys
Am trying to find the UVtools so i can test this.....anyone has the .rb?
Does it work with 7.0 and 7.1?
thnx
Nils

Re: HDRI WYSIWYG with Spherical object

Posted: Thu Nov 05, 2009 2:41 pm
by stefan_kaplan
Nils, UVtools.rb can be found at SketchUcation.com
The script is written by a clever guy called Whaat.
It's version 0.1, it works in SketchUp v7.0 and v7.1 and it's free.
I've taken the liberty of sharing it on this forum for a short while. Click HERE for download. In the zip-file there is a description of how to use it.

If you've downloaded my HDRI-Sphere you can actually just replace the sky mapped on the sphere with your own HDRI-jpeg-image: Open the mapped sky in the material editor and replace the .jpg with the one of your choise.

Follow my instructions in the beginning of this post in order to make it work.
(Remember: The larger you make the sphere - the more excact WYSIWYG).

/Stefan