home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Extra 1996 #6 / AmigaPlus-eXtra-6-96.iso.7z / AmigaPlus-eXtra-6-96.iso / programme / dust / cdeformtut / cdeformtut.txt next >
Text File  |  1996-03-22  |  5KB  |  135 lines

  1. ###############################################################################
  2. #                                                                             #
  3. #                Dust V2.30 - Copyright ©1994 by A.Maschke                    #
  4. #                           All rights reserved.                              #
  5. #-----------------------------------------------------------------------------#
  6. #                                                                             #
  7. #                             CDEFORM-Tutorial                                #
  8. #                                                                             #
  9. ###############################################################################
  10.  
  11.  
  12. 1. Cone->Prism (simple introduction)
  13. -------------------------------------------------------------------------------
  14.  
  15. a) create the objects:
  16.  
  17.    Source:
  18.     -create a tube (24 circle sections, turn of "stagger points",
  19.                             turn on "close bottom" and "close top")
  20.     -enter the "Pick-faces"-mode
  21.     -select the top-faces, create a subgroup "G1"
  22.     -select the bottom-faces, create a subgroup "G2"
  23.     -save it as "t1"
  24.  
  25.    Destination:
  26.     -create a tube (5 circle sections, turn of "stagger points",
  27.                             turn on "close bottom" and "close top")
  28.     -enter the "Pick-faces"-mode
  29.     -select the top-faces, create a subgroup "G1"
  30.     -select the bottom-faces, create a subgroup "G2"
  31.     -save it as "t2"
  32.  
  33. b) deform the source object
  34.     -start Dust
  35.     -load the objects
  36.       "load(1,t1)" and
  37.       "load(2,t2)"
  38.     -deform it
  39.       "cdeform(1,2,G1,"",0.2)" and
  40.       "cdeform(1,2,G2,"",0.2)"
  41.     -save it
  42.       "save(1,test)"
  43.  
  44. c) create the metamorphosis
  45.     -load the object "t1", create a state "CONE" (Shape).
  46.     -load the deformed object "test", select the "t1"-object
  47.      and choose "States/Import" to import the state of the deformed
  48.      object.
  49.     -delete the "test"-object, save your states-object, morph it
  50.  
  51.  
  52. 2. Head->Bottle (nice effect) (only registered version)
  53. -------------------------------------------------------------------------------
  54.  a) define the curves
  55.  
  56.     Source:
  57.      -load the supplied object "head", enter the "Pick faces"-mode
  58.      -select the the first curve at the top, name it "G1"
  59.       (you should have selected 18 faces)
  60.      -save it as "head2"
  61.      -count the number of curves you want to morph: 33
  62.      -let's start Dust to define the curves using the
  63.       EXPANDSG-command:
  64.        load(1,head2)
  65.        ;create subgroups G2-G32
  66.        for(i,1,31)
  67.         expandsg(1,G$,G$(i+1))
  68.        end
  69.        save(1,head3)
  70.      -"head3" contains 32 subgroups (curves), the remaining
  71.       is the boundary the whole object
  72.  
  73.     Destination:
  74.      -load the supplied object "bottle", enter the "Pick faces"-mode
  75.      -select the the first curve at the top, name it "G1"
  76.       (you should have selected 20 faces)
  77.      -count the number of curves: 8
  78.      -let's start Dust to define the curves using the
  79.       EXPANDSG-command:
  80.        load(1,bottle2)
  81.        ;create subgroups G2-G8
  82.        for(i,1,7)
  83.         expandsg(1,G$,G$(i+1))
  84.        end
  85.        save(1,bottle3)
  86.      -"bottle3" contains 8 subgroups (curves)
  87.  
  88.  b) deform the head
  89.  
  90.     Because the destination-oobject has less curves than the
  91.     source -object we have to use the CDEFORMINTERP-command.
  92.  
  93.     The bootle has 7 segment. Let's make a list which curves
  94.     to move into which segment. E.g., Segment 1 is build by the curves
  95.     1 and 2, if you want to move 5 source curves into this segment
  96.     you have to use scale-values from 0.2 to 1.0 (step 1/5).
  97.  
  98.      1   ->    segment 1 (scale=0.0)
  99.      2-6 ->    segment 1 (scale=0.2,0.4,0.6,0.8,1.0)
  100.      7-10 ->   segment 2 (scale=0.25,0.5,0.75,1.0)
  101.      11-15 ->  segment 3 (scale=0.2,0.4,0.6,0.8,1.0)
  102.      16-20 ->  segment 4 (scale=0.2,0.4,0.6,0.8,1.0)
  103.      21-25 ->  segment 5 (scale=0.2,0.4,0.6,0.8,1.0)
  104.      26->30 -> segment 6 (scale=0.2,0.4,0.6,0.8,1.0)
  105.      31->33 -> segment 7 (scale=0.3333,0.6667,1.0)
  106.  
  107.      A procedure which moves N curves into one segment defined
  108.      by the curves destSG1 and destSG2 could look like this:
  109.  
  110.       .srcSG=<start with source-curve>
  111.       .destSG1=<segment-curve 1>
  112.       .destSG2=<segment-curve 2>
  113.       .steps=<N>
  114.       for(i,1,steps)
  115.        .scale=i*1.0/steps
  116.        cdeforminterp(1,2,G$(srcSG),NONE,G$(destSG1),NONE,G$(destSG2),NONE,scale,0.0,G$(srcSG-1),NONE,G$(srcSG-2),NONE)
  117.        ;if you don't have control-curves:
  118.        ;cdeforminterp(1,2,G$(srcSG),NONE,G$(destSG1),NONE,G$(destSG2),NONE,scale,0.0)
  119.        .srcSG=srcSG+1
  120.       end
  121.  
  122.      This procedure uses control-curves for best results.
  123.  
  124.      The script "head->bottle.bat" is the final script deforming the
  125.      whole object.
  126.      It creates the deformed object test", load this object into Imagine's
  127.      Detail-Editor to move one point which doesn't belong to any curve
  128.      by hand. This the inner-point of subgroup "G1".
  129.  
  130.      Now remove all subgroups, create a states-object, render it. You will
  131.      produce an exciting effect.
  132.  
  133.  
  134. (15 September 1995)
  135.