birth script with particleShape issue

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  01 January 2011
birth script with particleShape issue

Hi,

I'm using a birth script to copy position and shape of en existing model.

I did this before and worked fine, but this time I get a problem.... my model is not made of simple shapes, but of groups and it seems like it gives an issue to my scene.

I keep getting this error when calling the array containing the groups:

MouseTool:ScriptActionF649CE0
-- Error occurred in i loop
-- Frame:
-- i: 1
-- called in Proceed()
-- Frame:
-- pCont: ReferenceTarget:MaxscriptParticleContainer
-- t1: -160.0


any help?

Thank you

Hal.
__________________
Of all the things I've lost,
I miss my mind the most.
 
  01 January 2011
Hard to say if you don't post the actual script. It could be something as mundane as forgotten parentheses, or something more complex...
__________________
This should take less than a few minutes.
 
  01 January 2011
nooch......thank you for reminding me of how distracted I can be

here is the code:

on ChannelsUsed pCont do
(
pCont.useAge = true
pCont.useTM = true
pCont.useShape = true
)

on Init pCont do
(

GLOBAL Vetro = $Lego* as array

)

on Proceed pCont do
(
t1 = pCont.getTimeStart() as float

if (t1 < 0) do
for i = 1 to Vetro.count do
(
pcont.addparticle()
pcont.particleindex = pcont.numparticles()
pcont.particleAge = 0
pcont.particleTM = Vetro[i].transform
pcont.particleShape = Vetro[i].mesh
)

)

on Release pCont do
(

)
__________________
Of all the things I've lost,
I miss my mind the most.
 
  01 January 2011
If "$Lego*" is a group you will need to collapse the group objects into a eMesh or ePoly in order for it to work. You can work with objects within a group but not on groups themselves, not within a script, at least to my knowledge.

Someone may know of a workaround for this but it isn't me
__________________
poof ~>Vimeo<~
 
  01 January 2011
indeed JohnnyRandom, but I hoped I could do it in a script....I have 804 groups.

now that everything is been converted the script works.

Thanks for the support


Hal.
__________________
Of all the things I've lost,
I miss my mind the most.
 
  01 January 2011
quick reminder....how fo I transfer the original material from the mesh to the particles?

I have 6 different materials and would love the particles to pick them up when getting shape and position...

Thanks.

Hal
__________________
Of all the things I've lost,
I miss my mind the most.
 
  01 January 2011
You would need to use a sub-object material and assign material IDs in the script. Attached an example, notice the Material indexes assigned to the materials themselves in the multi/sub-object match the corresponding material IDs assigned with the Materiel Modifier.
Attached Files
File Type: zip max2010_birthScriptMatIndx.zip (20.7 KB, 12 views)
__________________
poof ~>Vimeo<~
 
  01 January 2011
thanks JohnnyRandom.
__________________
Of all the things I've lost,
I miss my mind the most.
 
  01 January 2011
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 06:40 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.