PDA

View Full Version : Controlling scale with texture + birth script


3DMadness
09-22-2008, 01:49 PM
Hi people.

I'm creating a kind of wing using particle flow, max 2009 and creativity extension.

I have an emitter object and I'm using this birth script to create and position a particle at each vertice:
http://www.orbaz.com/forum/viewtopic.php?t=1693

I'm also using a lock/bond to make the feather shake and everything is working great.

The next thing I need is to control the feathers scale, with bigger feathers in the middle of the wing. The only way I figured out to control is painting a texture and make it control the scale with script, as I found in this topic:
http://forums.cgsociety.org/showthread.php?f=206&t=455092&highlight=scale

This script works great, but it needs a position object to work and I want to work with my birth script to put a particle at each vertice, to avoid duplicated particles and also becaus this way I can change my emitter adding more vertices or reducing as I need.

I'm really new to scripting and I'm still learning, so that's why I need your help to understand how to put these two scripts together.

I would like to thanks in advance all of you who help people, with these scripts and test scenes, this look/bond I'm using is inspired in a scene that PsychoSilence posted.

In case you need, this is a screenshot of my flow, I'm using a shape instance to orient the feathers.

http://img156.imageshack.us/img156/2647/wingflowcw3.th.jpg (http://img156.imageshack.us/my.php?image=wingflowcw3.jpg)http://img156.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)

Cheers!

Flávio

3DMadness
09-24-2008, 02:20 PM
Ok, just to let you know I found the problem.

The problem was in the birth script, first the one psychosilence posted use polyop and the scale script uses meshop. So I decided to use the birth script posted by Tony but it have a problem in this line:

if (t1<0 and classOf obj==Editable_Poly or classOf obj==Editable_Mesh) then (

I just need to correct it:

if (t1<0) and (classOf obj==Editable_Poly or classOf obj==Editable_Mesh) then (

Now everything is working fine, thanks for the people who posted all these scripts, in this case I found the problem myself, but I would not be doing this if these scripts weren't posted. ;)

Cheers!

Flávio

CGTalk Moderation
09-24-2008, 02:20 PM
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.