To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.dev.macOpen lugnet.cad.dev.mac in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / Macintosh / 359
358  |  360
Subject: 
Re: QTVR of a model
Newsgroups: 
lugnet.cad.dev.mac
Date: 
Mon, 23 Dec 2002 17:59:04 GMT
Viewed: 
1502 times
  
In lugnet.cad.dev.mac, Erik Olson writes:
In lugnet.cad.dev.mac, James Reynolds writes:
While beta testing LDraw Viewer, I created this model.  It took only a few
hours (spread out over a few days).

Let me guess - you did this the hard way, setting up each image by hand?
That's a lot of work...

NO WAY!  I haven't gotten the following to work quite right, but here it is.
It will generate about 180 of the 360 images it is suppose to.  Then it quites
rendering.  I have no idea why.

For some crazy reason, I am telling "POV-Ray Mac 3.5" to do the rendering, but
it is actually happening in POV-Ray Mac 3.1 running in Classic.  I couldn't get
the 3.5 to work with AppleScript.

If you don't want to learn perl, and you don't mind waiting several months, I
am working on an L3P GUI that will have this ability built in.

Anyway, to make a QTVR of the images, you need a QTVR authoring app.  Search
www.versiontracker.com for one.  I used Apple's QTVR Authoring Studio 1.0.1
(because that is what I have).

You could check out my (very outdated) QTVR page too:
http://www.cc.utah.edu/~jer29950/lego/qtvr

Anyway, for those who care to tinker with the code:

James

#!/usr/bin/perl

$l3p = "/usr/sbin/l3p";
$ldrawDir = "/Library/ldraw";

$options = "-o -f -b0.8,0.8,1";

#-lc-400,2,60,5,5,5 -lc-400,2,-60,5,5,5
#-lc-400,-118,60,5,5,5
#-lc-400,-118,-60,5,5,5 -lc400,-100000,6000,5000,5000,5000 -cc300,2,0 ";

$filename = "/Users/james/Lego/Exo-53c.dat";
$savepath = "/Users/james/Lego/Exo_pov";
$savepath_as = "Hard Disk:Users:james:Lego:Exo_pov";

#$setfilepath = "/Users/james/Desktop/Lego/l3p/SetFile";
$setfilepath = "/Developer/Tools/SetFile";

if ( ! -e $savepath) {
  print "save path does not exist";
  exit;
}

$x = 0;
$step = 20;
for ($lat = 180 ; $lat >= -180 ; $lat = $lat - $step) {
  for ($long = 180 ; $long >= -180 ; $long = $long - $step) {
    if ($x < 10) {
      $tempy = "0000";
    } elsif ($x < 100) {
      $tempy = "000";
    } elsif ($x < 1000) {
      $tempy = "00";
    } elsif ($x < 10000) {
      $tempy = "0";
    }
    system "export LDRAWDIR=$ldrawDir; $l3p $options -cg$lat,$long,300
$filename $savepath/Exo$tempy$x.pov\n";
    system "$setfilepath -c \"POV3\" $savepath/Exo$tempy$x.pov\n";
    system "$setfilepath -t \"TEXT\" $savepath/Exo$tempy$x.pov\n";
    system "osascript -e 'tell application \"Finder\"' -e 'set f to file
\"$savepath_as".":Exo$tempy$x.pov\"' -e 'select f' -e 'tell application
\"POV-Ray Mac 3.5\" to print f' -e 'end tell'";
    $x++;
    sleep 30;
  }
}



Message has 1 Reply:
  Re: QTVR of a model
 
For those with a high speed internet connection: (URL) (2.4 M). This is the same model, but it is colored (so it is easier to see). It has about twice as many angles, but it still has the same view bounds. James (22 years ago, 24-Dec-02, to lugnet.cad.dev.mac)

Message is in Reply To:
  Re: QTVR of a model
 
(...) Let me guess - you did this the hard way, setting up each image by hand? That's a lot of work... (22 years ago, 23-Dec-02, to lugnet.cad.dev.mac)

6 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR