[Radiance-general] obj2mesh and scaling?

Greg Ward gregoryjward at gmail.com
Tue Feb 28 23:15:09 CET 2006


Hi Lars,

Although I agree it would be nice to have a facility for either  
transforming .OBJ files directly or as part of obj2mesh, there is a  
solution with replmarks you may not have thought about.  Rather than  
creating your mesh instances directly with replmarks -I, instead  
create a single Radiance scene file for each mesh with the  
appropriate scale factor.  E.g., if you had a mesh called filecab.rtm  
that needed to be rotated in x and scaled, you would also create a  
file called filecab.rad that contains:

void mesh filecab
5 filecab.rtm -rx 90 -s 0.3048
0
0

Then, you can use replmarks -x filecab.rad instead of -I, and  
replmarks will load this file and add the other rotation and  
translation arguments necessary to put the object in the right place.

Does this help?
-Greg

> From: Lars O. Grobe <grobe at gmx.net>
> Date: February 28, 2006 1:21:44 PM PST
>
> Hi,
>
> I have a bad problem with obj2mesh... I used lots of obj's with  
> obj2rad so far, and some in a more or less stupid way, converting  
> them to meshes, writing a mesh primitive in a file, scaling it and  
> making an instance of the file than. Now I would like to replace  
> this stupid mesh-to-instance step, but I run into the problem that  
> I cannot scale my obj with obj2mesh. Is there noone else needing  
> such an option? Or is there a way to scale the object input? My  
> problem is that I am using lots of files, scripted processing, and  
> input my instances or meshes to replmarks. But I cannot make sure  
> that all my markers have the x-axis 1 unit long (than I could use  
> replmark's -s SCALE). I was thinking of writing my mesh primitive  
> in a small file, apply xform to this and use it than with replmarks  
> -x. Still, it seams to be a silly way to deal with the fact that my  
> objs are in feet and my model in meter.
>
> TIA+CU, Lars.



More information about the Radiance-general mailing list