Maya for 3D Printing - Rapid Prototyping
In this course we're going to look at something a little different, creating technically accurate 3D printed parts.
# 1 23-04-2003 , 03:42 AM
Subscriber
Join Date: Nov 2002
Posts: 43

Texture or material on particles?

Hi,

Can anyone help me figure out how to apply a material or texture to particles? I already tried this:

select particles
Add Dynamic Attribute> Add Color
checked "Shader"
In hypershade (it popped up) created a material
selected particles
applied shader to particles

Now they don't look any different in workspace or when I tried rendering them in the hardware render buffer

thanks for any help

# 2 23-04-2003 , 06:07 AM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Ah... the clue was when you said "HW render buffer".

First, what type of particles are you trying to render?
(points, streak, sprites etc.)

Lemme know when yo get a chanceuser added image

Also, check the docs for the following:

1. Add Dynamic Attributes - probably under dynamics and/or rendering
...more importantly, for rgbPP and shader application.

TIPS DIRECTLY FROM THE MAYA 4.5 DOCS:


Dynamics Particles
Setting particle color

You can color particles with one of these methods:

You can add and set per object attributes for the three RGB (red, green, and blue) components of the color. All particles in the object use the same color.

You can add a per particle rgbPP attribute, which means you can set the color of each particle of the object independently.

OR

You can assign a shading group to the particle object.

If you use two or more of the methods, the one highest in the above list takes precedence. For example, if you add both per object and per particle attributes, the per particle attribute (rgbPP) controls the color.


Note
See Per particle and per object attributes for more details on per particle and per object attributes.


To add and set a per object color attribute:

Select the particle object and display the Attribute Editor.
In the Add Dynamic Attributes section, click Color.
The Particle Color window is displayed.

Turn on Add Per Object Attribute and click Add Attribute.
The Color Red, Color Green, and Color Blue attributes are displayed in the Render Attributes section of the Attribute Editor.

Set the color attributes to the values you want for the particle object color. These attributes are keyable.
Turn on Shading > Smooth Shade All to see the particle color in the workspace.
To add and set a per particle color attribute:

Select the particle object and display the Attribute Editor.
In the Add Dynamic Attributes section, click Color.
The Particle Color window is displayed.

Turn on Add Per Particle Attribute and click Add Attribute.
The rgbPP attribute is displayed in the Per Particle (Array) Attributes section of the Attribute Editor.

Right-click the rgbPP data box and choose an attribute editing technique from the pop-up menu. See Techniques for setting per particle attributes for details. Note that you cannot key this attribute or any other per particle attributes.
Turn on Shading > Smooth Shade All to see the particle color in the workspace. If necessary, deselect the particle object to see the color.
To assign a shading group:

Select the particle object and display the Attribute Editor.
In the Add Dynamic Attributes section, click Color.
The Particle Color window is displayed.

Turn on Shader.
The Multilister is displayed.

Create and assign the desired material with shading group to the particle object (see Using Maya: Rendering).
Turn on Shading > Smooth Shade All to see the particle color in the workspace.



Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
# 3 23-04-2003 , 06:07 PM
Subscriber
Join Date: Nov 2002
Posts: 43
Hi,

I have tried every particle type, and also the corresponding render method. For the s/w particle types I tried the software render, and all the other types (points, streaks, etc..) I tried the hardware render buffer.

I did try to use Add Dynamic attribute "Add Color"
and followed all the steps from the docs on the subject (same page you supplied).
Still no luck
It seems though that when I try to make a material, then use a ramp for color, it's the part that doesn't work.

The other difference is that in the docs it says when you check "shader" under Add Color, it will open the multilister, but my Hypershade opens up instead.

(Can you use the ocean shader on particles? I'll try that too)

thanks ragecgi

# 4 23-04-2003 , 10:53 PM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Ok, I don't have much experience with HW particle render properties, but I just tried something, and it seemed to work....sort of...

And I know this doesn't much help your current situation, but it MIGHT lead you to something that might help...


Basicly this is about the Particle ageMapper node.

So say you map your particles with a ramp that goes from red(top), to green(middle), to blue(bottom).

Over the life of the particle, the particle will start red, then when it's about to die, it reaches the bottom of the ramp, and by then, it'll be blue.

NOTE: you CAN map textures to the colors as well for funky effects!

OR - you can kill off 2 of the ramps colors, leaving you with ONE... YOUR texture.
So, instead of the particles cycling through the ramp, it only sees one "color" and uses that the whole time.

KEEP IN MIND, I've ONLY gotten this to work so far tonight on the HW Sphere type of particle!
not sure about the rest....


So, to start:
When you get to the Dynamic attributes part, select SHADER,
move the hypershade out of the way of that small pop-up, then
*ALSO*
select the: "Add Per Particle" option.

You will notice that in the Per Particle (Array) rollout, a new "rgbPP" attribute has been created.

RIGHT-CLICK in the box next to the "rgbPP" text, and choose: "CREATE RAMP".
(mess with the option box later, and tell us what it does! user added image )

Now, an "<- arrayMapper1.outColorPP" node will be in the box.

RIGHT-CLICK over THAT text, and move your mouse over the ONLY button that will appear, and it has a SUB-menu flyout where you can choose the magic button!

Choose this: "Create rgbUPP - > arrayMapper1.uCoordPP

Watch in splendor as your particles now become RED! whoohoo!
(red being for the top-most color in the ramp)

NOT DONE YET! hehe...

NOW, simply right-click over the rgpPP node text and choose: EDIT RAMP, OR in the hypershade, simply edit the ramp from there.

I tried applying a checker 2d texture to the red, and it DID show up, but because of the nature of the ageMapper, the checker flew by so fast, I didn't even realize it was there.
Just amke your particle lifetime a bit longer, and you'll be fineuser added image


NOTE: If you selected the PER OBJECT:

NOTHING will seem to have changed. BUT!
Look in the RENDER ATTRIBUTES rollout, and there will be 3 keyable settings that you can MAP a TEXTURE to INDIVIDUALLY by RIGHT-CLICKING over the text for the color you want to effect.


PS:
My Hypershade appears too when I try to apply a shaderuser added image

The doc's scare me how they are NOT at ALL user freindly...


Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
# 5 23-04-2003 , 11:34 PM
Subscriber
Join Date: Nov 2002
Posts: 43
Wow! Uh...I'll start on that right away.
Thanks for all your help and I'll let you know what happens!

Yeah, not a big fan of the docs either, took me a while just to find the little that I did.
user added image

# 6 23-04-2003 , 11:38 PM
Subscriber
Join Date: Nov 2002
Posts: 43
SWEET!

It's working just like I wanted!
Thank you thank you thank you.

I'll keep working on all of it and let ya know.

thanks again ragecgi, you rock

# 7 24-04-2003 , 12:07 AM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
No prob!


Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads