Great! I will give that a try. Thanks very much!
2017-09-14 12:43 GMT-03:00 Gregory J. Ward <[email protected]>:
> Hi Germán,
>
> As I said, you can pipe the materials and geometry to the oconv command,
> something like:
>
> FILE *outfp = popen("oconv - > /tmp/myfile.oct", "w");
> /* tons of stuff to outfp */
> pclose(outfp);
> ray_init("/tmp/myfile.oct");
> /* lots of calls to ray_trace() */
> ray_done();
>
> Lots of other things to do as well, such as setting rendering options and
> error-checking. This should give you the basic idea, though.
>
> Cheers,
> -Greg
>
> *From: *Germán Molina Larrain <[email protected]>
>
> *Date: *September 14, 2017 4:16:56 AM PDT
>
>
> Hello Greg!
>
> That sounds great. A while ago I tried to I the files you mentioned, but
> did not have much luck. Today, with more knowledge, I may be able to handle
> them.
>
> One question: in your approach, do I need to export everything? This
> this... Do I need to write the .Rad and .Mat and .VF files?
>
> Cheers
>
> On Sep 14, 2017 00:30, "Gregory J. Ward" <[email protected]> wrote:
>
>> Hi Germán,
>>
>> Unless you really like making work for yourself, I wouldn't recommend
>> eliminating oconv by building everything in memory. You wouldn't save
>> yourself much time (if any) in the end, and you would end up using a lot
>> more memory that way, as the process of writing out and reloading the
>> octree cleans up the set lists and other structures.
>>
>> You can still run oconv from your program, and even pass it scene data
>> via a pipe using popen() or similar. I would then avail myself of the
>> routines in src/rt/raycalls.c which are designed for your kind of code.
>> You can call the "ray_init(char*)" function, passing it the name of your
>> octree file, and it takes care of all the set-up details for you. The call
>> "ray_trace(RAY*)" performs ray evaluation, and all the various command-line
>> settings are available as global variables for your amusement.
>>
>> Cheers,
>> -Greg
>>
>> *From: *Germán Molina Larrain <[email protected]>
>>
>> *Date: *September 13, 2017 2:57:17 PM PDT
>>
>>
>> Hello all,
>>
>> I am experimenting with Radiance code, with the purpose of creating a
>> calculation engine for Groundhog.
>>
>> In the process, I have managed to write a C++ program (early tests have
>> passed, so far) that can read SketchUp model and export it in Radiance
>> format. However, my intention is to allow it to calculate things, thus
>> avoiding the need of exporting and handling thousands of files and
>> scripting.
>>
>> My idea is to generate a program that basically receives a SketchUp model
>> and perform several calculations... a very simple call
>>
>> gh_calc_engine Model.skp > results.txt
>>
>> The program will need, of course, to create the octree (not from a text
>> file, but from the internal data structure) and run rtrace or something
>> like that. I am checking how to do it and haven't gotten very far... could
>> you guys help me?
>>
>> For what I understand, a program would need some sort of structure as
>> shown below my signature, but I am unsure. I am far from compiling.... for
>> now, I am trying to understand how Radiance works underneath.
>>
>> Your help/hints and other things will be very appreciated
>>
>> Kind regards,
>>
>> Germán
>>
>>
> _______________________________________________
> Radiance-dev mailing list
> [email protected]
> https://www.radiance-online.org/mailman/listinfo/radiance-dev
>
>
_______________________________________________
Radiance-dev mailing list
[email protected]
https://www.radiance-online.org/mailman/listinfo/radiance-dev