Just discovered

Hello,

My name is John and I am trying to get automatic communication between Radiance
and other programs for my thesis.
I just discovered this group.
These archives look very useful. Hopefully I have not been wasting my time
working on something
that the people here have completed already.

Has anybody figured out, for example,
how to incorporate radiance simulations into loops running in other programs?
such as rhino, autocad, or even matlab?

Hello John,

You can control Radiance from Matlab (because Matlab can send dos
commands and Radiance can be controlled using dos commands or batch
scripts).
(I assumed you are going to use Windows.)

Here's a piece of example code for use in Matlab:

dos('oconv sky.rad result.rad > Octree.oct')
ROPT=' -dp 512 -ar 20 -ms 0.2 -ds .3 -dt .1 -dc .5 -dr 1 -st .1 -ab 3
-af RCP.amb -aa .2 -ad 400 -as 64 -av 0.01 0.01 0.01 -lr 6 -lw .002 -i
'
VIEW= ' -vtv -vp 4.800 0.200 2.200 -vd -2.300 2.400 -0.900 -vu 0 0 1
-vh 90 -vv 60 -vs 0 -vl 0 '
dos(['rpict -t 120 ', VIEW ,ROPT,' -x 64 -y 64 -ps 1 Octree.oct >
RCP_overture_5664.unf'])
dos('del RCP_overture_5664.unf')
dos(['rpict -t 120 ', VIEW,' -x 2048 -y 1536 -ps 6 -pt .08', ROPT,'
RCP.oct > RCP_c1.unf'])
dos(' pfilt -r 1 -x /2 -y /2 RCP_c1.unf > RCP_c1.pic')
dos('del RCP_c1.unf')

This might come in handy later:
In Matlab you can also use hdrread and hdrwrite commands to read and
write Radiance images.

Succes,

Guy

···

Hello,

My name is John and I am trying to get automatic communication between Radiance
and other programs for my thesis.
I just discovered this group.
These archives look very useful. Hopefully I have not been wasting my time
working on something
that the people here have completed already.

Has anybody figured out, for example,
how to incorporate radiance simulations into loops running in other programs?
such as rhino, autocad, or even matlab?

Hi Achim & list!

12.11.2010 10:25, Achim.geissler wrote:

that might be what you are looking for.

> https://gaia.lbl.gov/bcvtb

I think so, this is quite an advanced system for embedding Radiance into a simulation framework.

Still, as a general answer to how to communicate with Radiance:

Radiance closely follows the Unix philosophy of breaking up the problem into many small tasks, that are performed by specialized tools. So Radiance consists of dozens of programs, and all these talk to each other - or external programs. Communication happens through files (or pipes). More or less all data that is exchanged in between the tools can be ASCII text, allowing to apply all kind of filters. They can be binary if needed in some cases (mostly for performance reasons), the only tool that I am aware of always producing binary output is oconv.

So basically, you can connect anything that can handle text in- and output and start processes. This generic approach has e.g. made it possible to run simulations over clusters easily, scripting of scenes and processing of output.

While "Building Controls Virtual Test Bed" is a comfortable help to create the tool-chains, it is nothing else but adding some clever front-end to the chaining ability of Radiance and similar tools. Worth to be aware of. Another recent development is the idea to create a nice python-interface to Radiance, something that may be helpful if you want some more specific application.

Cheers, Lars.

Hello, John.

Hello,

My name is John and I am trying to get automatic communication between Radiance
and other programs for my thesis.
I just discovered this group.

Welcome.

These archives look very useful. Hopefully I have not been wasting
my time working on something that the people here have completed
already.

Don't worry, it wouldn't be the first time ...

Has anybody figured out, for example, how to incorporate radiance
simulations into loops running in other programs?

Linking an application to Radiance (for control or geometry input) is
in general a three step process:

1) export the scene geometry to Radiance (write text files)
2) control the steps necessary for the Radiance calculations (execute
system commands)
3) import the results back into your application (read text or binary files)

I expect that most advanced modelling or scientific applications
have scripting capabilities that allow you to do these three tasks.

such as rhino, autocad, or even matlab?

Others have already written about Matlab.

For Rhino you can have a look at DIVA-for-Rhino (www.diva-for-rhino.com)
which does at least the export and control bits. I think it's focused on
Daysim but that's more or less tailored version of Radiance

Autocad has a number of scripting options. I think VBA should
allow you to script all the necessary steps. You may have a
problem with the export because Autocad does not always allow
access to polygone data that's necessary for Radiance. I am not
aware of a current project or product that exports from Autocad
to Radiance.

There are also a number of 3D modellers for which Radiance
export tools are available. Some (like Blender) are open source
so you can get all of the source code and modify it as required.

Let us know about your progress.

Regards,
Thomas

···

On Thu, Nov 11, 2010 at 10:49 PM, John <[email protected]> wrote:

John

The Building Controls Virtual Test Bed (
http://simulationresearch.lbl.gov/bcvtb) can link Radiance to various
programs for co-simulation, including MATLAB/Simulink, EnergyPlus, Modelica,
as well as to BACnet compatible building automation systems for use in
real-time operation.

All the best,

Michael

···

On Fri, Nov 12, 2010 at 7:11 AM, Stephen Selkowitz <[email protected]>wrote:

do we want to promote the BCVTB here?
Steve

---------- Forwarded message ----------
From: John <[email protected]>
Date: Thu, Nov 11, 2010 at 7:49 PM
Subject: [Radiance-general] Just discovered
To: [email protected]

Hello,

My name is John and I am trying to get automatic communication between
Radiance
and other programs for my thesis.
I just discovered this group.
These archives look very useful. Hopefully I have not been wasting my time
working on something
that the people here have completed already.

Has anybody figured out, for example,
how to incorporate radiance simulations into loops running in other
programs?
such as rhino, autocad, or even matlab?

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

--

**********************************************************************

Stephen Selkowitz

Head, Building Technologies Department (510) 486-5064

Bldg.90-3111 fax
(510) 486-4089

Lawrence Berkeley National Laboratory [email protected]

Berkeley, CA 94720
http://BTECH.lbl.gov/

**********************************************************************

Yea I am able to use the rtrace in matlab.
If you are interested I can send you an example.
It slow though
Cheers

···

On Fri, Nov 12, 2010 at 3:19 AM, Guy Vaessen <[email protected]> wrote:

Hello John,

You can control Radiance from Matlab (because Matlab can send dos commands and Radiance can be controlled using dos commands or batch scripts).

(I assumed you are going to use Windows.)

Here's a piece of example code for use in Matlab:

dos('oconv sky.rad result.rad > Octree.oct')
ROPT=' -dp 512 -ar 20 -ms 0.2 -ds .3 -dt .1 -dc .5 -dr 1 -st .1 -ab 3 -af RCP.amb -aa .2 -ad 400 -as 64 -av 0.01 0.01 0.01 -lr 6 -lw .002 -i '

VIEW= ' -vtv -vp 4.800 0.200 2.200 -vd -2.300 2.400 -0.900 -vu 0 0 1 -vh 90 -vv 60 -vs 0 -vl 0 '
dos(['rpict -t 120 ', VIEW ,ROPT,' -x 64 -y 64 -ps 1 Octree.oct > RCP_overture_5664.unf'])

dos('del RCP_overture_5664.unf')
dos(['rpict -t 120 ', VIEW,' -x 2048 -y 1536 -ps 6 -pt .08', ROPT,' RCP.oct > RCP_c1.unf'])
dos(' pfilt -r 1 -x /2 -y /2 RCP_c1.unf > RCP_c1.pic')

dos('del RCP_c1.unf')

This might come in handy later:
In Matlab you can also use hdrread and hdrwrite commands to read and write Radiance images.

Succes,

Guy

> Hello,

> My name is John and I am trying to get automatic communication between Radiance

> and other programs for my thesis.
> I just discovered this group.
> These archives look very useful. Hopefully I have not been wasting my time
> working on something
> that the people here have completed already.

> Has anybody figured out, for example,
> how to incorporate radiance simulations into loops running in other programs?
> such as rhino, autocad, or even matlab?

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