Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
How to do Multiple passes with Behaviour

How to do Multiple passes with Behaviour

2005-06-07       - By Aloys Baillet

 Back
Reply:     1     2     3     4     5     6     7     8     9  

Hi Sandy,

The error you get means that DrvMotion is not properly initialized.
You could check if this works:
global var motion = new DrvMotion(world, "C:\\mymotions\\");
and be sure that the mymotion dir exists!
Hope this helps... and good luck!

Aloys

On 6/7/05, Sandy Sutherland <sandy@(protected)> wrote:
>
> Hi All,
>  Using this code, I get the following message:
>  
> InitializeRecord(25);//this set the fps. I'm in PAL hence the 25
>
> global var world = engine.GetCurrentWorld();
>
> global var motion = new DrvMotion(world, "C:\mymotions\\");
>
>  list = world.GetActorList("happy");
>
>  for(actors = list.First(); actors != nil; actors = list.Next())
>
> {
>
> motion.SubmitActor(actors);
>
> }
>
>  motion.StartCapture(0);
>  **** VM Exception encountered: VME00000007: Operation on 'nil' operand
> Attempted to get property 'SubmitActor' on a nil object
>  Yet This works:
>   *var output = "N:/HUTCH_LENNY/Behaviour_DATA/MentalRay/SCRIPT_OUTPUT";
> var input =
> "N:/HUTCH_LENNY/Behaviour_DATA/MentalRay/Colour_Lennys_RenderSetup/Colour_R
_SETUP.bvrn";
>
> global var mental = new MentalRay(world, output, input);
>
> mental.MapTarget("MY_CORRECT_LENNY_PosRIG", "happy", 0);
> mental.MapTarget("MY_CORRECT_LENNY_PosRIG1", "happy", 1);
> mental.MapTarget("MY_CORRECT_LENNY_PosRIG2", "happy", 2);
> mental.SynchToCamera(TRUE); *
> **
> * list = world.GetActorList("happy");
> for(actors = list.First(); actors != nil; actors = list.Next())
> {
> AddFlockActor(actors, "walk", 40, 0);*
> **
> * // reduce the radius to keep them tightly packed
> // actors.pfd.radius = 0;*
> **
> * // randomize the gait index so the walk cycles aren't in sync
> actors.fa.ikla.loco.skilltime = MyRand()%333;
> mental.SubmitActor(actors, Math.Rand()%3);*
> **
> * }*
> **
> Anyone know why this is, and how I can fix it! All I want to do is
> populate a Tarrain with a Weightmap, walk these characters around using
> curves, and do it in such a way that I can do it again using another pass
> (shadows)!!
>  My Whole script to create MIs for rendering is this, and it works OK!
>  *use constants "drive_constants";*
> **
> *function main()
> {
> engine.RunScript("rtk", nil);*
> **
> * global var world = engine.GetCurrentWorld();*
> **
> * global var flock = new DrvFlock(0.3);*
> **
> * DeleteActors("happy"); *
> **
> * var list = new List();
> var actors = new Array(2);
> actors[0] = "happy";
> actors[1] = "happy";
> var ground = Actor("GRND060").GetNodeByName("ground");
>
> Populate(ground, 100, actors, 5, 0.2, 0.5, list, FALSE);
> OrientActors(list, new DrvVector(0,0,1000)); *
> **
> * var floor = Actor("GRND060").GetNodeByName("Floor");
> var curves = Actor("GRND060").GetNodeByName("ground");*
> **
> * SceneGoalFlock(flock);
>
> var output = "N:/HUTCH_LENNY/Behaviour_DATA/MentalRay/SCRIPT_OUTPUT";
> var input =
> "N:/HUTCH_LENNY/Behaviour_DATA/MentalRay/Colour_Lennys_RenderSetup/Colour_R
_SETUP.bvrn";
>
> global var mental = new MentalRay(world, output, input);
>
> mental.MapTarget("MY_CORRECT_LENNY_PosRIG", "happy", 0);
> mental.MapTarget("MY_CORRECT_LENNY_PosRIG1", "happy", 1);
> mental.MapTarget("MY_CORRECT_LENNY_PosRIG2", "happy", 2);
> mental.SynchToCamera(TRUE); *
> **
> * list = world.GetActorList("happy");
> for(actors = list.First(); actors != nil; actors = list.Next())
> {
> AddFlockActor(actors, "walk", 40, 0);*
> **
> * // randomize the gait index so the walk cycles aren't in sync
> actors.fa.ikla.loco.skilltime = MyRand()%333;
> mental.SubmitActor(actors, Math.Rand()%3);*
> **
> * }*
> **
> * flock.CreateCurveFunction(0, floor, 400, 400, 0, 20, curves); *
> **
> * InitializeRecord(25);*
> **
>
> * world.AddPiccoloActivityByName("update");
> global var tick = 0; *
> **
>
> *}*
> **
> * function update(act, time, obj)
> {
> Console.PrintNl(tick++);
>
> if(tick == 200)
> mental.StartCapture("out", "image");
> else if(tick == 231)
> {
> mental.Close("render.bat", "-verbose on");
> RuntimeStop();
> }
> }*
> **
> Thanks
>  S.
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----
> Sandy Sutherland Digital Doodeller - TD
> The Refinery (Cape) http://www.refinery.co.za
> mailto:sandy@(protected) <sandy@(protected)>
> (P) (+27 21) 480 3132 (F) (+27 21) 480 3101
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----
>
>  


--
Aloys Baillet - Character TD @ Animal Logic

Hi Sandy,<br>
<br>
The error you get means that DrvMotion is not properly initialized.<br>
You could check if this works:<br>
<span class="q"><font color="navy" face="Arial" size="2"><span style="font-size
: 10pt; color: navy; font-family: Arial;">global var motion = new
DrvMotion(world, &quot;C:\\mymotions\\&quot;);</span></font></span><br>and be
sure that the mymotion dir exists!<br>
Hope this helps... and good luck!<br>
<br>
Aloys<br>
<br><div><span class="gmail_quote">On 6/7/05, <b class="gmail_sendername">Sandy
Sutherland</b> &lt;<a href="mailto:sandy@(protected)">sandy@(protected)<
/a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px
solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">







<div><font face="Arial" size="2">Hi All,</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">Using this code, I get the following
message:</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><span class="q">
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; color
: navy; font-family: Arial;">InitializeRecord(25);//this
set the fps. I'm in PAL hence the 25</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; color
: navy; font-family: Arial;">global var world =
engine.GetCurrentWorld();</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; color
: navy; font-family: Arial;">global var motion = new
DrvMotion(world, &quot;C:\mymotions\\&quot;);</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; color
: navy; font-family: Arial;"></span></font>&nbsp;</p></span>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; color
: navy; font-family: Arial;">list =
world.GetActorList("happy");</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; color
: navy; font-family: Arial;"></span></font>&nbsp;</p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; color
: navy; font-family: Arial;">for(actors =
list.First(); actors != nil; actors = list.Next()) </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; color
: navy; font-family: Arial;">{ </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; color
: navy; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
motion.SubmitActor(actors);</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; color
: navy; font-family: Arial;">}</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; color
: navy; font-family: Arial;"></span></font>&nbsp;</p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; color
: navy; font-family: Arial;">motion.StartCapture(0);</span></font></p></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font color="#ff0000" face="Arial" size="2">**** VM Exception encountered:
VME00000007: Operation on 'nil' operand<br>Attempted to get property
'SubmitActor' on a nil object</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">Yet This works:</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">&nbsp;</font><em><font color="#000080" face=
"Arial" size="2">var output = &quot;N:/HUTCH_LENNY/Behaviour_DATA/MentalRay
/SCRIPT_OUTPUT&quot;;
<br>&nbsp;var input =
&quot;N:/HUTCH_LENNY/Behaviour_DATA/MentalRay/Colour_Lennys_RenderSetup/Colour
_R_SETUP.bvrn&quot;;
<br>&nbsp;global var mental = new MentalRay(world, output,
input);&nbsp;<br>&nbsp;<br>&nbsp;mental.MapTarget(&quot;MY_CORRECT_LENNY_PosRIG
&quot;,
&quot;happy&quot;, 0); <br>&nbsp;mental.MapTarget(&quot;MY_CORRECT_LENNY
_PosRIG1&quot;, &quot;happy&quot;, 1);
<br>&nbsp;mental.MapTarget(&quot;MY_CORRECT_LENNY_PosRIG2&quot;, &quot;happy
&quot;, 2);&nbsp;
<br>&nbsp;&nbsp;&nbsp; mental.SynchToCamera(TRUE); </font></em></div>
<div><em><font color="#000080" face="Arial" size="2"></font></em>&nbsp;</div>
<div><font color="#000080" face="Arial" size="2"><em>&nbsp;list =
world.GetActorList(&quot;happy&quot;);<br>&nbsp;for(actors = list.First();
actors != nil;
actors = list.Next())<br>&nbsp;{<br>&nbsp;&nbsp;AddFlockActor(actors, &quot
;walk&quot;,
40, 0);</em></font></div>
<div><em><font color="#000080" face="Arial" size="2"></font></em>&nbsp;</div>
<div><font color="#000080" face="Arial" size="2"><em>&nbsp;&nbsp;// reduce the
radius
to keep them tightly packed<br>&nbsp;&nbsp;//&nbsp;actors.pfd.radius =
0;</em></font></div>
<div><em><font color="#000080" face="Arial" size="2"></font></em>&nbsp;</div>
<div><font color="#000080" face="Arial" size="2"><em>&nbsp;&nbsp;// randomize
the gait
index so the walk cycles aren't in
sync<br>&nbsp;&nbsp;actors.fa.ikla.loco.skilltime =
MyRand()%333;<br>&nbsp;&nbsp;mental.SubmitActor(actors,
Math.Rand()%3);</em></font></div>
<div><em><font color="#000080" face="Arial" size="2"></font></em>&nbsp;</div>
<div><font color="#000080" face="Arial" size="2"><em>&nbsp;}</em></font></div>
<div><em><font color="#000080" face="Arial" size="2"></font></em>&nbsp;</div>
<div><font face="Arial" size="2">Anyone know why this is, and how I can fix
it!&nbsp; All I want to do is populate a Tarrain with a Weightmap, walk these
characters around using curves, and do it in such a way that I can do it again
using another pass (shadows)!!</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">My Whole script to create MIs for rendering is
this, and it works OK!</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font color="#808080" face="Arial" size="2"><em>use constants
&quot;drive_constants&quot;;</em></font></div>
<div><em><font color="#808080" face="Arial" size="2"></font></em>&nbsp;</div>
<div><font color="#808080" face="Arial" size="2"><em>function
main()<br>{<br>&nbsp;&nbsp;engine.RunScript(&quot;rtk&quot;, nil);</em></font><
/div><span class="q">
<div><em><font color="#808080" face="Arial" size="2"></font></em>&nbsp;</div>
<div><font color="#808080" face="Arial" size="2"><em>&nbsp;global var world =
engine.GetCurrentWorld();</em></font></div>
<div><em><font color="#808080" face="Arial" size="2"></font></em>&nbsp;</div><
/span>
<div><font color="#808080" face="Arial" size="2"><em>&nbsp;global var flock =
new
DrvFlock(0.3);</em></font></div>
<div><em><font color="#808080" face="Arial" size="2"></font></em>&nbsp;</div>
<div><font color="#808080" face="Arial" size="2"><em>&nbsp;DeleteActors(&quot
;happy&quot;);
</em></font></div>
<div><em><font color="#808080" face="Arial" size="2"></font></em>&nbsp;</div>
<div><font color="#808080" face="Arial" size="2"><em>&nbsp;&nbsp;&nbsp; var
list = new
List();<br>&nbsp;var actors = new Array(2);<br>&nbsp;actors[0] = &quot;happy
&quot;;
<br>&nbsp;actors[1] = &quot;happy&quot;; <br>&nbsp;var ground =
Actor(&quot;GRND060&quot;).GetNodeByName(&quot;ground&quot;); <br>&nbsp;&nbsp;
<br>&nbsp;Populate(ground, 100, actors, 5, 0.2, 0.5, list, FALSE);
<br>&nbsp;OrientActors(list, new DrvVector(0,0,1000)); </em></font></div>
<div><em><font color="#808080" face="Arial" size="2"></font></em>&nbsp;</div>
<div><font color="#808080" face="Arial" size="2"><em>&nbsp;var floor =
Actor(&quot;GRND060&quot;).GetNodeByName(&quot;Floor&quot;);<br>&nbsp;var
curves =
Actor(&quot;GRND060&quot;).GetNodeByName(&quot;ground&quot;);</em></font></div>
<div><em><font color="#808080" face="Arial" size="2"></font></em>&nbsp;</div>
<div><font color="#808080" face="Arial" size="2"><em>&nbsp;SceneGoalFlock(flock
);
<br>&nbsp;<br>&nbsp;var output =
&quot;N:/HUTCH_LENNY/Behaviour_DATA/MentalRay/SCRIPT_OUTPUT&quot;; <br>&nbsp
;var input =
&quot;N:/HUTCH_LENNY/Behaviour_DATA/MentalRay/Colour_Lennys_RenderSetup/Colour
_R_SETUP.bvrn&quot;;
<br>&nbsp;global var mental = new MentalRay(world, output, input);
<br>&nbsp;<br>&nbsp;mental.MapTarget(&quot;MY_CORRECT_LENNY_PosRIG&quot;, &quot
;happy&quot;, 0);
<br>&nbsp;mental.MapTarget(&quot;MY_CORRECT_LENNY_PosRIG1&quot;, &quot;happy
&quot;, 1);
<br>&nbsp;mental.MapTarget(&quot;MY_CORRECT_LENNY_PosRIG2&quot;, &quot;happy
&quot;, 2);&nbsp;
<br>&nbsp;&nbsp;&nbsp; mental.SynchToCamera(TRUE); </em></font></div>
<div><em><font color="#808080" face="Arial" size="2"></font></em>&nbsp;</div>
<div><font color="#808080" face="Arial" size="2"><em>&nbsp;list =
world.GetActorList(&quot;happy&quot;);<br>&nbsp;for(actors = list.First();
actors != nil;
actors = list.Next())<br>&nbsp;{<br>&nbsp;&nbsp;AddFlockActor(actors, &quot
;walk&quot;,
40, 0);</em></font></div>
<div><em><font color="#808080" face="Arial" size="2"></font></em>&nbsp;</div>
<div><font color="#808080" face="Arial" size="2"><em>&nbsp;&nbsp;// randomize
the gait
index so the walk cycles aren't in
sync<br>&nbsp;&nbsp;actors.fa.ikla.loco.skilltime =
MyRand()%333;<br>&nbsp;&nbsp;mental.SubmitActor(actors,
Math.Rand()%3);</em></font></div>
<div><em><font color="#808080" face="Arial" size="2"></font></em>&nbsp;</div>
<div><font color="#808080" face="Arial" size="2"><em>&nbsp;}</em></font></div>
<div><em><font color="#808080" face="Arial" size="2"></font></em>&nbsp;</div>
<div><font color="#808080" face="Arial" size="2"><em>&nbsp;flock
.CreateCurveFunction(0, floor, 400, 400, 0, 20, curves);
</em></font></div>
<div><em><font color="#808080" face="Arial" size="2"></font></em>&nbsp;</div>
<div><font color="#808080" face="Arial" size="2"><em>&nbsp;InitializeRecord(25)
;</em></font></div>
<div><em><font color="#808080" face="Arial" size="2"></font></em>&nbsp;</div>
<font>
</font><div><font><br><em><font color="#808080" face="Arial" size="2">&nbsp
;world.AddPiccoloActivityByName(&quot;update&quot;); <br>&nbsp;global var tick
= 0; </font></em></font></div>
<div><font><em><font color="#808080" face="Arial" size="2"></font></em>&nbsp;<
/font></div>
<div><font><br><em><font color="#808080" face="Arial" size="2">}</font></em><
/font></div>
<div><font><em><font color="#808080" face="Arial" size="2"></font></em>&nbsp;<
/font></div>
<div><font><em><font color="#808080" face="Arial" size="2">&nbsp; function
update(act, time,
obj) <br>&nbsp;{ <br>&nbsp;&nbsp;Console.PrintNl(tick++);
<br>&nbsp;<br>&nbsp;&nbsp;if(tick == 200)
<br>&nbsp;&nbsp;&nbsp;mental.StartCapture(&quot;out&quot;, &quot;image&quot;);
<br>&nbsp;&nbsp;else
if(tick == 231) <br>&nbsp;&nbsp;{
<br>&nbsp;&nbsp;&nbsp;mental.Close(&quot;render.bat&quot;, &quot;-verbose
on&quot;);<br>&nbsp;&nbsp;&nbsp;RuntimeStop(); <br>&nbsp;&nbsp;}
<br>&nbsp;}</font></em></font></div>
<div><font><em><font color="#808080" face="Arial" size="2"></font></em>&nbsp;<
/font></div>
<div><font><font face="Arial" size="2">Thanks</font></font></div><font><span
class="sg">
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">S.</font></div></span></font><div><span class=
"e" id="q_10455febf09f076c_7">
<div>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----<br>Sandy
Sutherland&nbsp;&nbsp;Digital Doodeller - TD<br>The Refinery
(Cape)&nbsp;&nbsp;<a href="http://www.refinery.co.za" target="_blank" onclick=
"return top.js.OpenExtLink(window,event,this)">http://www.refinery.co.za</a><br>
<a href="mailto:sandy@(protected)" target="_blank" onclick="return top.js
.OpenExtLink(window,event,this)">
mailto:sandy@(protected)</a><br>(P) (+27
21) 480 3132&nbsp; (F) (+27 21) 480
3101<br>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----<br></div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px;
padding-left: 5px; margin-left: 5px; margin-right: 0px;" dir="ltr"><font face=
"Arial" size="2"></font>&nbsp;</blockquote>

</span></div></blockquote></div><br><br><br>-- <br>Aloys Baillet - Character TD
@ Animal Logic