[Radiance-general] obj2mesh and scaling?

Jack de Valpine jedev at visarc.com
Tue Feb 28 23:39:37 CET 2006


Hi Lars,

It seems that you have the following possible options:

   1. scale the obj file the way you want on export from what ever the
      modeler is generating
   2. you can add scaling and other transforms directly to the mesh
      primitive, why not script this
   3. can you figure out a way to guarantee that you get unit markers
      (eg 1 unit long in x), we use unit markers all over the place and
      do not have problems, perhaps this is a modeling/software issue?
   4. you should be able to pipe things together so that you do not have
      a bunch of intermediate files such as:

        replmarks -I object.rtm  origin origin.rad | xform -s <your
        scale factor>  > tmp.scale.rad
        replmarks -x tmp.scale.rad new-location new-location.rad >
        final.object.rad

This is not nearly as elegant as I had hoped. I cannot see how to 
construct one single pipeline. But nevertheless it may get the job done. 
You would need to construct a marker object called origin in origin.rad 
(a right triangle with x of 1). The first line gets you the scaling. The 
second line get you the transform of the scaled object to the desired 
location. The ordering here is to get the scaling to occur before the 
transform. Then tmp.scale.rad can be discarded by the script or just 
overwritten by subsequent calls for other object transforms.

-Jack

Lars O. Grobe wrote:
> 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.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Radiance-general mailing list
> Radiance-general at radiance-online.org
> http://www.radiance-online.org/mailman/listinfo/radiance-general
>   

-- 
# Jack de Valpine
# president
#
# visarc incorporated
# http://www.visarc.com
#
# channeling technology for superior design and construction

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://radiance-online.org/pipermail/radiance-general/attachments/20060228/4fbcd86e/attachment.html


More information about the Radiance-general mailing list