rad and/or mgf to 3ds/dxf

Hello to everyone
I never wrote in here before cause all my questiond found an answer in the
archives
but not this time.

I lost a source 3d file of an old project, I have only in radiance format
(and then mgf format)
now I need it to inset it in a bigger project of the same place, but I need
to have it at first
in 3ds/dxf/vrml or whatever known format to place it correctly in the new
project.

I tryed to convert it in mgf format with rad2mgf and it seems correct (I've
checked it with a mgf viewer)
but if I tryed to convert it into vrml vith mgf2inv (with the -vrml option)
evey vrml viewer tell me the vrml file is wrong.

Anyone has an idea? Any help is welcome

Thanks all

Cristiano

Hi Christiano.

If you have only the geometry you want in one or more
files then you don't need to read them into a modeller to
use them in Radiance. Just create a triangular marker in
your modeller and use !replmarks to replace it with
the contents of the file.

If you know where this file will be in your new project
you could use "!xform" as well. But this requires that
you have to work out position and rotation before.

If it's not urgent for you you can also wait until I am motivated
to include my old scene file parses in my Blender interface.
Blender has a 3ds exporter but I don't know much about the
quality of the files it creates. And your geometry should only
be triangles or my scripts would ignore it.

For now I'd look into xform or replmarks.

Thomas

···

_____

From: [email protected]
[mailto:[email protected]] On Behalf Of Dr.
Cristiano Guarnaschelli
Sent: 24 July 2006 17:39
To: [email protected]
Subject: [Radiance-general] rad and/or mgf to 3ds/dxf

Hello to everyone
I never wrote in here before cause all my questiond found an answer in
the archives
but not this time.

I lost a source 3d file of an old project, I have only in radiance
format (and then mgf format)
now I need it to inset it in a bigger project of the same place, but I
need to have it at first
in 3ds/dxf/vrml or whatever known format to place it correctly in the
new project.

I tryed to convert it in mgf format with rad2mgf and it seems correct
(I've checked it with a mgf viewer)
but if I tryed to convert it into vrml vith mgf2inv (with the -vrml
option) evey vrml viewer tell me the vrml file is wrong.

Anyone has an idea? Any help is welcome

Thanks all

Cristiano

***********************************************************************************
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
***********************************************************************************

Ciao Cristiano,

If I understand well, you need to recover your lost 3d model in a usable
format from a .rad file.

You can try to use this little python script I've just written and added
to my website:
http://www.bozzograo.net/radiance/modules.php?op=modload&name=Downloads&file=index&req=getit&lid=17
to convert it to obj (no materials yet, sorry!)

I hope you may find it useful.

Cheers,

Francesco

···

Il giorno lun, 24/07/2006 alle 18.39 +0200, Dr. Cristiano Guarnaschelli ha scritto:

Hello to everyone
I never wrote in here before cause all my questiond found an answer in
the archives
but not this time.

I lost a source 3d file of an old project, I have only in radiance
format (and then mgf format)
now I need it to inset it in a bigger project of the same place, but I
need to have it at first
in 3ds/dxf/vrml or whatever known format to place it correctly in the
new project.

I tryed to convert it in mgf format with rad2mgf and it seems correct
(I've checked it with a mgf viewer)
but if I tryed to convert it into vrml vith mgf2inv (with the -vrml
option) evey vrml viewer tell me the vrml file is wrong.

Anyone has an idea? Any help is welcome

Thanks all

Cristiano

There is also a program distributed with Radiance called mgf2inv, which takes an MGF (which can be generated from Radiance using rad2mgf) and converts it to VRML.

You may need to dip into the ray/src/cv/mgflib directory and run "make mgf2inv" to create it.

-Greg

···

From: "Dr. Cristiano Guarnaschelli" <[email protected]>
Date: July 24, 2006 9:39:09 AM PDT

Hello to everyone
I never wrote in here before cause all my questiond found an answer in the archives
but not this time.

I lost a source 3d file of an old project, I have only in radiance format (and then mgf format)
now I need it to inset it in a bigger project of the same place, but I need to have it at first
in 3ds/dxf/vrml or whatever known format to place it correctly in the new project.

I tryed to convert it in mgf format with rad2mgf and it seems correct (I've checked it with a mgf viewer)
but if I tryed to convert it into vrml vith mgf2inv (with the -vrml option) evey vrml viewer tell me the vrml file is wrong.

Anyone has an idea? Any help is welcome

Thanks all

Cristiano

Hi!

There is also a program distributed with Radiance called mgf2inv,

[...]

I think that is what Christiano tried. There are two point to consider
using mgf2inv. The first is, that it creates vrml-1. There are very few
programs reading vrml-1 worlds in our days, most vrml-parsers support
vrml-2 (aka vrml-97), and all development work goes to x3d. The second
is that I experienced problems with the notation used for floating
points in mgf2inv's output. That can be solved with some
printf-formatting strings. Note that mgf2inv uses a floating point that
conforms to the standard. Still, e.g. when I tried to import into formZ,
I had to change it. If you use those old vrml-1 parsers, be prepared to
find lots of bugs - most of these vrml-1 parsers have been more or less
neglected for years. You know that Blender reads vrml-1? Just break your
scene into parts, because Blender does not like to import very complex
scenes at once sometimes. And keep your units so that dimensions are not
exceedingly big or small.

Francesco, if you really managed to write an obj output-filter, that
would be GREAT!!!! Will have a look at it tomorrow. This would be my
prefered choice!

CU Lars.

Dear all
Thanks a lot for the fast reply

In particular thanks to Francesco cause he undestood exactly which was my
probelm
and gave me the right solution.
I've downloaded rad2obj.py and a python release for windows: it worked
great! thank a lot!!

Obviously i my definitive radiance project I will call with xform the
original radiance model
(with materials and luminaires), but to undestand where and how I have to
place it in the new
bigger project, it was absolutely necessary to have it in a common format,
and obj is really good
(then converted into 3ds to insert it my CAD 3D project).

Anyway thanks again to all that replyed so soon

Cristiano

PS. : if Francesco agrees, I'd like to get in touch directly with him to
talk a little...

                       Societ� di progettazione, design e servizi per il
mondo della luce

                        Dr. Cristiano Guarnaschelli
                        Project Manager LightWeb S.r.l.
                        via Don F.B.
                        della Torre n� 6
                        20157
                        Milano
                        [email protected] tel: +39 0371 269100

            Add me to your address book... Want a signature like this?

Whoops -- that's what I get for not reading e-mails carefully. Cristiano's e-mail arrived in such a tiny font that I could scarcely read it, though. That's my excuse, and I'm sticking to it.

I also naively thought that VRML-2 would be upwards compatible with VRML-1. And I hadn't heard about the problems with floating point values before. I should probably look into VRML-2 at some point. In a parallel universe, I'm sure I have time for that.

-Greg

···

From: "Lars O. Grobe" <[email protected]>
Date: July 24, 2006 10:56:42 PM PDT

Hi!

There is also a program distributed with Radiance called mgf2inv,

[...]

I think that is what Christiano tried. There are two point to consider
using mgf2inv. The first is, that it creates vrml-1. There are very few
programs reading vrml-1 worlds in our days, most vrml-parsers support
vrml-2 (aka vrml-97), and all development work goes to x3d. The second
is that I experienced problems with the notation used for floating
points in mgf2inv's output. That can be solved with some
printf-formatting strings. Note that mgf2inv uses a floating point that
conforms to the standard. Still, e.g. when I tried to import into formZ,
I had to change it. If you use those old vrml-1 parsers, be prepared to
find lots of bugs - most of these vrml-1 parsers have been more or less
neglected for years. You know that Blender reads vrml-1? Just break your
scene into parts, because Blender does not like to import very complex
scenes at once sometimes. And keep your units so that dimensions are not
exceedingly big or small.

Francesco, if you really managed to write an obj output-filter, that
would be GREAT!!!! Will have a look at it tomorrow. This would be my
prefered choice!

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

Dear all
Thanks a lot for the fast reply

In particular thanks to Francesco cause he undestood exactly which was my
probelm
and gave me the right solution.
I've downloaded rad2obj.py and a python release for windows: it worked
great! thank a lot!!

Obviously i my definitive radiance project I will call with xform the
original radiance model
(with materials and luminaires), but to undestand where and how I have to
place it in the new
bigger project, it was absolutely necessary to have it in a common format,
and obj is really good
(then converted into 3ds to insert it my CAD 3D project).

Anyway thanks again to all that replyed so soon

Cristiano

PS. : if Francesco agrees, I'd like to get in touch directly with him to
talk a little...

Hi Greg!

Whoops -- that's what I get for not reading e-mails carefully.
Cristiano's e-mail arrived in such a tiny font that I could scarcely
read it, though. That's my excuse, and I'm sticking to it.

:wink: And that is the reason why I decided to read whatever email I get in
its native text format years ago... html is sooo useless for mails.

I also naively thought that VRML-2 would be upwards compatible with
VRML-1. And I hadn't heard about the problems with floating point
values before. I should probably look into VRML-2 at some point. In a
parallel universe, I'm sure I have time for that.

Maybe we meet in the parallel universe, where our parallel egos have
plenty of spare time and money, on a nice sunny beach studying the
irradiance... :wink: Ok, in fact I described the problem some time ago
here, but I would agree that there are more important features than
vrml-export filters. Actually, my experiments with converting radiance's
scene language into xml using xslt's were a step to get models OUT of
radiance, e.g. to (the xml-coded) x3d. I just never managed to write a
x3d-output stylesheet. I'm sure I did in one of the parallel universes.

However, my point is that in 2006, I would not spend time on a vrml-2
filter, but, if I had, on x3d. It is really close to vrml, but cleaner
and all development power at web3d is going there.

Now I have to hurry, my train to Ankara won't wait, and I have to be
there tomorrow morning. CU Lars.