3ds Max -> sketchup -> su2rad ?

Hi y'all,

I've grown tired of looking at boxes and spheres as test objects in my renderings ... so I wish to model in 3ds Max, import into SketchUp, and export from there to radiance format using the su2rad plugin.

At first I was ambitious and tested with a complicated sculpture I had in .max format, but soon I started testing with a simple 1x1x2 meter box. I model it in Max, save it in .3ds format, and import into SketchUp. The import works although there is a scale issue ... once imported the box is 0.025x0.025x0.05 meters, but that is easy to fix.

When I use the su2rad plugin to export to radiance files I get an xform error unless I use the "by group" mode and tick the "global coords" option. On the other hand, if I use the global cords option I don't get any geometry exported. After export the export directory looks like this:

Ambfiles
Images
Logfiles
Luminaires
Octrees
Skies
Views

(those are all directories, of which Views contain a valid .vf file with correct info, and luminaires contain a .ies file which I am not going to need ... all other directories are empty)

... and then two files:
Box.rad
Materials.rad

Materials.rad contain a generic plastic material (diffuse, reflectance 0.4 0.4 0.4).

Box.rad looks like this:

!xform skies/Boulder_CO_1108_1330.sky
!xform ./materials.rad
!ies2rad -s -m 0.800000 -t default -o luminaires/skp5030 luminaires/skp5030.ies | xform -n group

That's it.

If I model something (e.g., a box) directly in SketchUp the export seems to work fine.

Anyone else having experiences with something like this?

Best,
Claus

Hi Claus

Which version of the su2rad plugin did you install?

Since you can export geometry created in SketchUp I would
assume that the import from 3DMax creates an odd scene
structure that su2rad can't handle properly. You can send me
the *.skp file with the imported geometry and I'll poke around
a bit.

The import works although there is a scale issue …
once imported the box is 0.025x0.025x0.05 meters,
but that is easy to fix.

The basic SketchUp unit is 1 inch. So if you import something
with 1x1 units size it turns into roughly 0.025 meters.

When I use the su2rad plugin to export to radiance files I get an xform
error unless I use the “by group” mode and tick the “global coords” option.

[...]

(those are all directories, of which Views contain a valid .vf file with
correct info, and luminaires contain a .ies file which I am not going to
need … all other directories are empty)

Most directories are empty at this stage because they are used
for the rendering process. However, you are missing a *.rif file
and an "objects" directory, which tells me that there must have
been a problem during the export.

You can open the Ruby console window before you start the
export. This will show any script errors in the console and
helps to see if the export finishes successfully.

I am very surprised that the "luminaires" directory is created
and that there is an *.ies file that's supposed to be converted.
I thought I had disabled this feature in the official versions
so far.

Thomas

···

2011/1/17 Claus Brøndgaard Madsen <[email protected]>:

Hi Thomas,

I am rather excited about the possibilities I suddenly have if this can be made to work, so I am hoping the best :slight_smile:

The su2rad version I installed was su2rad_daysim_r03

I attach the .skp file ...

Thanks!

Claus

3dstoskpimport.skp (63.2 KB)

···

-----Original Message-----
From: Thomas Bleicher [mailto:[email protected]]
Sent: 17. januar 2011 22:27
To: Radiance general discussion
Subject: Re: [Radiance-general] 3ds Max -> sketchup -> su2rad ?

Hi Claus

Which version of the su2rad plugin did you install?

Since you can export geometry created in SketchUp I would assume that the import from 3DMax creates an odd scene structure that su2rad can't handle properly. You can send me the *.skp file with the imported geometry and I'll poke around a bit.

2011/1/17 Claus Brøndgaard Madsen <[email protected]>:

The import works although there is a scale issue . once imported the
box is 0.025x0.025x0.05 meters, but that is easy to fix.

The basic SketchUp unit is 1 inch. So if you import something with 1x1 units size it turns into roughly 0.025 meters.

When I use the su2rad plugin to export to radiance files I get an
xform error unless I use the "by group" mode and tick the "global coords" option.

[...]

(those are all directories, of which Views contain a valid .vf file
with correct info, and luminaires contain a .ies file which I am not
going to need . all other directories are empty)

Most directories are empty at this stage because they are used for the rendering process. However, you are missing a *.rif file and an "objects" directory, which tells me that there must have been a problem during the export.

You can open the Ruby console window before you start the export. This will show any script errors in the console and helps to see if the export finishes successfully.

I am very surprised that the "luminaires" directory is created and that there is an *.ies file that's supposed to be converted.
I thought I had disabled this feature in the official versions so far.

Thomas

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Claus.

I just downloaded your file and opened it in SketchUp. I had to update
to the newest version of SU (released last week) but I think that's the
same version you have.

I then installed su2rad from a fresh download from the project site.
However, I had no problems exporting the scene in any mode.

The import from 3DMax creates a SketchUp component which
contains another component with the geometry (12 triangles).
su2rad can handle this structure.

I have checked the code again and I don't know why it would
try to replace the component with an IES file. This should only
happen if the component is created from a *.skp file and a *.ies
file with the same name exists next to *.skp file.

To debug this please open the Ruby console window in SketchUp
and type:

$SU2RAD_LOGLEVEL = 4

Then start the su2rad export function. You should see a number
of messages printed to the Ruby console. If the export finishes
without error it should also create a log file of the export in the
"logfiles" directory. If you can send me the text from the console
or the file I might be able to see what's going on on your machine.

Regards,
Thomas

Hi Thomas,

The SU version I have is 8.0.4811 installed last night.

I open Ruby console, set LOGLEVEL and ran export. Here's the output (dunno if it matters but apparently there is some complaint about a convert.exe not being found):

$SU2RAD_LOGLEVEL = 4
4
RunTimeConfig.initialize()
RunTimeConfig: initPaths() ...
  searching 'replmarks.exe' ...
  => found 'replmarks.exe' in 'C:/Program Files/Google/Google SketchUp 8/Plugins/su2radlib/bin/WIN'
  searching 'convert.exe' ...
  ... skipping system folder 'C:\Windows\system32'
  ... skipping system folder 'C:\Windows\System32\Wbem'
  ... skipping system folder 'C:\Windows\System32\WindowsPowerShell\v1.0\'
  ... skipping system folder 'C:\Program Files\QuickTime\QTSystem\'
  => application 'convert.exe' not found
  searching 'ra_ppm.exe' ...
  => found 'ra_ppm.exe' in 'C:/Program Files/Google/Google SketchUp 8/Plugins/su2radlib/bin/WIN'
  searching 'obj2mesh.exe' ...
  => found 'obj2mesh.exe' in 'C:/Program Files/Google/Google SketchUp 8/Plugins/su2radlib/bin/WIN'
WARNING: path for CONVERT does not exist ('')

### su2rad.rb export ###
[D] ExportOptions.initialize()
[V] loading export options from attribute
searching in 'C:/Program Files/Google/Google SketchUp 8/Plugins/su2radlib/ray'
> 130 materials in file 'C:/Program Files/Google/Google SketchUp 8/Plugins/su2radlib/ray/K_and_E.rad'
> 69 materials in file 'C:/Program Files/Google/Google SketchUp 8/Plugins/su2radlib/ray/materials.rad'
> 33 materials in file 'C:/Program Files/Google/Google SketchUp 8/Plugins/su2radlib/ray/ral.rad'
=> materials total: 232
        texfunc: 2
          metal: 4
        plastic: 212
          glass: 12
     brightfunc: 1
          alias: 1

[D] setSketchup()
[D] setExportOptions() ...
[V] 'replmarks' found => keeping 'global coords' options
[W] 'convert' not found => disabling 'textures' options
[D] setRenderOptions() ...
[D] SketchupViewsList: setting views list ...
[D] setSkyOptions() ...
[I] mList rad: setting materials 0 to 200
[I] mList rad: setting materials 200 to 232
[I] mList skm: setting materials 0 to 10
[I] mList layer: setting materials 0 to 1
[V] TODO: webdialog closed
[I] Creating directory 'C:/Users/cbm/Desktop/3dstoskpimport/radiance/octrees'
[I] Creating directory 'C:/Users/cbm/Desktop/3dstoskpimport/radiance/images'
[I] Creating directory 'C:/Users/cbm/Desktop/3dstoskpimport/radiance/logfiles'
[I] Creating directory 'C:/Users/cbm/Desktop/3dstoskpimport/radiance/ambfiles'
[I] Creating directory 'C:/Users/cbm/Desktop/3dstoskpimport/radiance/skies'
[V] created file 'C:/Users/cbm/Desktop/3dstoskpimport/radiance/skies/Boulder_CO_1108_1330.sky'
[I]
[I] OBJECTS:
[I] RadComponent: '' [def='skp2C40']
[V] ies data file 'C:/Users/cbm/AppData/Local/Temp/skp2C40.tmp' found
[V] replacement file 'C:/Users/cbm/AppData/Local/Temp/skp2C40.tmp' found
[I] begin export Sketchup::ComponentInstance name='' id='85135050'
  [I] new alias name 'skp2C40_material' for material 'sketchup_default_material'
  [I] Creating directory 'C:/Users/cbm/Desktop/3dstoskpimport/radiance/luminaires'
  [V] created file 'C:/Users/cbm/Desktop/3dstoskpimport/radiance/luminaires/skp2C40.ies'
[I] end export Sketchup::ComponentInstance name=''
[V] exported entities [refs=1, faces=0]
[V] created file 'C:/Users/cbm/Desktop/3dstoskpimport/radiance/unnamed_scene.rad'
[I]
[I] MATERIALS:
[V] created file 'C:/Users/cbm/Desktop/3dstoskpimport/radiance/materials.rad'
[I] Creating directory 'C:/Users/cbm/Desktop/3dstoskpimport/radiance/views'
[V] created file 'C:/Users/cbm/Desktop/3dstoskpimport/radiance/views/unnamed_view.vf'
[E] No such file or directory - C:/Users/cbm/Desktop/3dstoskpimport/radiance/objects
C:/Program Files/Google/Google SketchUp 8/Plugins/su2radlib/radiancescene.rb:378:in `open'
C:/Program Files/Google/Google SketchUp 8/Plugins/su2radlib/radiancescene.rb:378:in `foreach'
C:/Program Files/Google/Google SketchUp 8/Plugins/su2radlib/radiancescene.rb:378:in `getRifObjects'
C:/Program Files/Google/Google SketchUp 8/Plugins/su2radlib/radiancescene.rb:505:in `createRifFile'
C:/Program Files/Google/Google SketchUp 8/Plugins/su2radlib/radiancescene.rb:277:in `export'
C:/Program Files/Google/Google SketchUp 8/Plugins/su2radlib/radiancescene.rb:233:in `startExportWeb'
C:/Program Files/Google/Google SketchUp 8/Plugins/su2radlib/webdialog.rb:160:in `startExport'
C:/Program Files/Google/Google SketchUp 8/Plugins/su2radlib/webdialog.rb:74:in `show'

Cheers,
Claus

Thanks Claus.

I think I understand now what's going on

I open Ruby console, set LOGLEVEL and ran export.
Here's the output (dunno if it matters but apparently there
is some complaint about a convert.exe not being found):

Not an issue here. "convert.exe" is used to convert textures
to tiffs which can then be converted to *.hdr files for Radiance.
If you don't have it you can't export textures, that's all.

Now on to the log:
[...]

[I] OBJECTS:
[I] RadComponent: '' [def='skp2C40']
[V] ies data file 'C:/Users/cbm/AppData/Local/Temp/skp2C40.tmp' found
[V] replacement file 'C:/Users/cbm/AppData/Local/Temp/skp2C40.tmp' found

Ok. The only top level entity in your scene is the component "skp2c40".
This component is created via export to a file "skp2C40.tmp" and then
loaded into your current file. su2rad tries to find an *.ies file by
substituting a ".ies" extension for a ".skp" extension. However, since
the file doesn't end with ".skp" nothing is substituted and the path to
"skp2C40.tmp" is returned as IES path. Therefore no geometry is created
and the whole export is replaced with an ies2rad command.

Temporary fix for now: delete the file
'C:/Users/cbm/AppData/Local/Temp/skp2C40.tmp' and any other skp*.tmp
files you might find there.

I can send you a file with a fix for su2rad later.

[E] No such file or directory - C:/Users/cbm/Desktop/3dstoskpimport/radiance/objects

Here is the real problem of the export: Because there is no geometry
there is also no "objects" directory. The script tries to list it's contents
and crashes. Another thing I need to change.

If you can get rid of the wrong IES replacement above this should not
be an issue any more.

Regards,
Thomas

···

2011/1/17 Claus Brøndgaard Madsen <[email protected]>:

Thanks a million. I'm off to bed now ... Will continue tomorrow after work. Too busy during daytime to work on this :slight_smile:

/Claus

···

Sent from my iPod

On 18/01/2011, at 00.17, "Thomas Bleicher" <[email protected]> wrote:

Thanks Claus.

I think I understand now what's going on

2011/1/17 Claus Brøndgaard Madsen <[email protected]>:

I open Ruby console, set LOGLEVEL and ran export.
Here's the output (dunno if it matters but apparently there
is some complaint about a convert.exe not being found):

Not an issue here. "convert.exe" is used to convert textures
to tiffs which can then be converted to *.hdr files for Radiance.
If you don't have it you can't export textures, that's all.

Now on to the log:
[...]

[I] OBJECTS:
[I] RadComponent: '' [def='skp2C40']
[V] ies data file 'C:/Users/cbm/AppData/Local/Temp/skp2C40.tmp' found
[V] replacement file 'C:/Users/cbm/AppData/Local/Temp/skp2C40.tmp' found

Ok. The only top level entity in your scene is the component "skp2c40".
This component is created via export to a file "skp2C40.tmp" and then
loaded into your current file. su2rad tries to find an *.ies file by
substituting a ".ies" extension for a ".skp" extension. However, since
the file doesn't end with ".skp" nothing is substituted and the path to
"skp2C40.tmp" is returned as IES path. Therefore no geometry is created
and the whole export is replaced with an ies2rad command.

Temporary fix for now: delete the file
'C:/Users/cbm/AppData/Local/Temp/skp2C40.tmp' and any other skp*.tmp
files you might find there.

I can send you a file with a fix for su2rad later.

[E] No such file or directory - C:/Users/cbm/Desktop/3dstoskpimport/radiance/objects

Here is the real problem of the export: Because there is no geometry
there is also no "objects" directory. The script tries to list it's contents
and crashes. Another thing I need to change.

If you can get rid of the wrong IES replacement above this should not
be an issue any more.

Regards,
Thomas

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hi Thomas,

After removing the .tmp files export now works just fine ...

Regarding convert.exe ... what is it, where does it come from, any chances I can get it somewhere?

Already late for a meeting, but had to check export first :slight_smile:

Cheers,
Claus

···

-----Original Message-----
From: Claus Brøndgaard Madsen [mailto:[email protected]]
Sent: 18. januar 2011 00:29
To: Radiance general discussion
Subject: Re: [Radiance-general] 3ds Max -> sketchup -> su2rad ?

Thanks a million. I'm off to bed now ... Will continue tomorrow after work. Too busy during daytime to work on this :slight_smile:

/Claus

Sent from my iPod

On 18/01/2011, at 00.17, "Thomas Bleicher" <[email protected]> wrote:

Thanks Claus.

I think I understand now what's going on

2011/1/17 Claus Brøndgaard Madsen <[email protected]>:

I open Ruby console, set LOGLEVEL and ran export.
Here's the output (dunno if it matters but apparently there is some
complaint about a convert.exe not being found):

Not an issue here. "convert.exe" is used to convert textures to tiffs
which can then be converted to *.hdr files for Radiance.
If you don't have it you can't export textures, that's all.

Now on to the log:
[...]

[I] OBJECTS:
[I] RadComponent: '' [def='skp2C40']
[V] ies data file 'C:/Users/cbm/AppData/Local/Temp/skp2C40.tmp' found
[V] replacement file 'C:/Users/cbm/AppData/Local/Temp/skp2C40.tmp'
found

Ok. The only top level entity in your scene is the component "skp2c40".
This component is created via export to a file "skp2C40.tmp" and then
loaded into your current file. su2rad tries to find an *.ies file by
substituting a ".ies" extension for a ".skp" extension. However, since
the file doesn't end with ".skp" nothing is substituted and the path
to "skp2C40.tmp" is returned as IES path. Therefore no geometry is
created and the whole export is replaced with an ies2rad command.

Temporary fix for now: delete the file
'C:/Users/cbm/AppData/Local/Temp/skp2C40.tmp' and any other skp*.tmp
files you might find there.

I can send you a file with a fix for su2rad later.

[E] No such file or directory -
C:/Users/cbm/Desktop/3dstoskpimport/radiance/objects

Here is the real problem of the export: Because there is no geometry
there is also no "objects" directory. The script tries to list it's
contents and crashes. Another thing I need to change.

If you can get rid of the wrong IES replacement above this should not
be an issue any more.

Regards,
Thomas

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general