PDA

View Full Version : sprites and 3d textures question


royter
10-28-2009, 10:58 PM
i have some cloud particles being emitted from a surface.
i assigned a 3D texture for their transparency but when they move i get a "swimming effect" where the transparency of each particle changes threw time (which is normal because the particle is traveling threw the 3d texture). Is there away to avoid this swimming effect with 3d cloud textures?

stooch
10-28-2009, 11:20 PM
i have some cloud particles being emitted from a surface.
i assigned a 3D texture for their transparency but when they move i get a "swimming effect" where the transparency of each particle changes threw time (which is normal because the particle is traveling threw the 3d texture). Is there away to avoid this swimming effect with 3d cloud textures?

not sure if this is supported yet, but you can try connecting the particle location using the particle info node to the center of your 3D texture.

Aikiman
10-28-2009, 11:40 PM
Under effects on the texture, click on local, I think that works.

royter
10-28-2009, 11:41 PM
not sure if this is supported yet, but you can try connecting the particle location using the particle info node to the center of your 3D texture.

can you give more details and to achieve this connection?
will this give a diiferent part of the 3d texture to each particle all will they all look the same?

royter
10-29-2009, 12:00 AM
Under effects on the texture, click on local, I think that works.

this didn't work, i still have swimming.

stooch
10-29-2009, 12:20 AM
can you give more details and to achieve this connection?
will this give a diiferent part of the 3d texture to each particle all will they all look the same?

same.

you can make a per particle value that can be a random number + time then use this value to drive the 3D texture time through the particle info sampler.

royter
10-29-2009, 01:04 AM
same.

you can make a per particle value that can be a random number + time then use this value to drive the 3D texture time through the particle info sampler.

can you give me the steps for this method ?

Aikiman
10-29-2009, 01:38 AM
this didn't work, i still have swimming.

I must have a different setup because it works my end.

royter
10-29-2009, 01:50 AM
I must have a different setup because it works my end.

can you post your scene, heres mine:

http://sor.typepad.com/files/swimming3dtextures.rar

Aikiman
10-29-2009, 02:33 AM
can you post your scene, heres mine:

http://sor.typepad.com/files/swimming3dtextures.rar

How can I download this .rar? I get gobbledegook on an html page instead. Can you .zip it?

royter
10-29-2009, 04:28 AM
How can I download this .rar? I get gobbledegook on an html page instead. Can you .zip it?

right click and save as.

Aikiman
10-29-2009, 05:06 AM
right click and save as.

Im off home but will check later on tonight. Just from first impressions I would try SW render rather than MR, from past experience MR has not always been friendly with particle rendering.

stooch
10-29-2009, 06:31 PM
I must have a different setup because it works my end.

that feature only worked for software rendering AFAIK. unless this changed with the latest MR (they did say they support all particle sampler channels now)

to the OP. please do a search on the forums for an example, it was pretty involved because not all particle sampler channels are supported with mental ray so you have to make sure to pipe this from the correct channels also i believe there was an offset too, that needs to be dialed in to center the texture center onto the particle. ill do some tests when im not busy. In general im working on a sprite shading rig anyway, hardware rendering is the way to go.

Aikiman
10-29-2009, 08:59 PM
If it the shading is a priority I would render them in SW and mimic the MR light shader with various lighting rigs.

royter
11-04-2009, 04:38 AM
If it the shading is a priority I would render them in SW and mimic the MR light shader with various lighting rigs.

after alot of tests, i turns out that the local option in 3d texture is not supported by MR.
that's too bad..

Aikiman
11-04-2009, 05:26 AM
after alot of tests, i turns out that the local option in 3d texture is not supported by MR.
that's too bad..

Figured as much.

stooch
11-04-2009, 06:06 AM
after alot of tests, i turns out that the local option in 3d texture is not supported by MR.
that's too bad..

Like i said, you have to pipe in the texture center manually... I have done this before and it worked perfectly. now with the latest version of maya you have more particle sampler attributes at your disposal. i had to use incandescencePP channel to do this back in the olden days... anyway ill see if i can whip something up when i get the chance.

stooch
11-04-2009, 06:43 AM
ok, i tested this and verified it.

to get your 3d texture to follow your particle.

first, create a volume noise shader

second, add a "userVector1PP" attribute from the "add attribute" button in the particle shape.

create an expression on the "userVector1PP" attribute: userVector1PP = position;

create a particleSamplerInfo node.

connect the particleSamplerInfo.userVector1PP attribute to the volumeNoise.origin attribute.

render and watch with glee how your texture sticks to your particles.
now offset the texture time via an additional "particleSamplerInfo.userScalar1PP" attribute and voila..

easy as pie.

royter
11-11-2009, 09:49 PM
ok, i tested this and verified it.

to get your 3d texture to follow your particle.

first, create a volume noise shader

second, add a "userVector1PP" attribute from the "add attribute" button in the particle shape.

create an expression on the "userVector1PP" attribute: userVector1PP = position;

create a particleSamplerInfo node.

connect the particleSamplerInfo.userVector1PP attribute to the volumeNoise.origin attribute.

render and watch with glee how your texture sticks to your particles.
now offset the texture time via an additional "particleSamplerInfo.userScalar1PP" attribute and voila..

easy as pie.

i tried connecting the particleSamplerInfo.userVector1PP to my 3d solid fractal texture (wich is mapped to the transparency and blop map of my particleCloud shader) but didnt find the volumeNoise.originattribute in the connection editor.

stooch
11-13-2009, 06:29 AM
heh look harder.

mandark1011
11-13-2009, 06:38 AM
nice Stooch!
thanks for that

royter
11-13-2009, 06:31 PM
heh look harder.

i know, it works for the volumenoise 3d texture but when i try to connect the sampler info node to the cloud 3dtextures, i can find the "origin" connection.

CGTalk Moderation
11-13-2009, 06:31 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.