Community
Maya Shading, Lighting and Rendering
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya materials topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lightLinker nParticle fail

2 REPLIES 2
Reply
Message 1 of 3
BurkhardRammner
287 Views, 2 Replies

lightLinker nParticle fail

Hi,

 

I disconnected the lightLinker from everything.

My nParticles are in different objectSets and also the relevant lights.

Normally, connecting the sets at the 'light' and 'object' attributes works fine -> the objects in the sets are lit by their specific lights. But  with my nParticles, it does not work -> all objects are lit by all lights.

 

Any idea for a workaround?

Thanks!

2 REPLIES 2
Message 2 of 3

Additionally I want to say that every light has effect on every nParticle, regardless of being in any set or not.

I need to fix this and need help.

Message 3 of 3

I attached an example file.

It has 2 nParticles, one polyCube and 2 areaLights.

The nParticles have a aiStandardVolume and a aiStandardSurface material attached, the cube has a aiStandardSurface. The nParticles volumeStepSize attribute is at 0.01, so the aiStandardVolume is active.

 

After the scene is opened the initial lightLinker connections should be deleted:

disconnectAttr aiStandardSurface3SG.message lightLinker1.shadowLink[3].shadowObject;
disconnectAttr shadingEngine2.message lightLinker1.shadowLink[2].shadowObject;
disconnectAttr shadingEngine1.message lightLinker1.shadowLink[1].shadowObject;
disconnectAttr aiStandardSurface3SG.message lightLinker1.link[3].object;
disconnectAttr shadingEngine2.message lightLinker1.link[2].object;
disconnectAttr shadingEngine1.message lightLinker1.link[1].object;
disconnectAttr initialParticleSE.message lightLinker1.shadowLink[5].shadowObject;
disconnectAttr defaultLightSet.message lightLinker1.shadowLink[5].shadowLight;
disconnectAttr initialShadingGroup.message lightLinker1.shadowLink[4].shadowObject;
disconnectAttr defaultLightSet.message lightLinker1.shadowLink[4].shadowLight;
disconnectAttr defaultLightSet.message lightLinker1.shadowLink[3].shadowLight;
disconnectAttr defaultLightSet.message lightLinker1.shadowLink[2].shadowLight;
disconnectAttr defaultLightSet.message lightLinker1.shadowLink[1].shadowLight;
disconnectAttr nParticleBallsSE.message lightLinker1.shadowLink[0].shadowObject;
disconnectAttr defaultLightSet.message lightLinker1.shadowLink[0].shadowLight;
disconnectAttr initialParticleSE.message lightLinker1.link[5].object;
disconnectAttr defaultLightSet.message lightLinker1.link[5].light;
disconnectAttr initialShadingGroup.message lightLinker1.link[4].object;
disconnectAttr defaultLightSet.message lightLinker1.link[4].light;
disconnectAttr defaultLightSet.message lightLinker1.link[3].light;
disconnectAttr defaultLightSet.message lightLinker1.link[2].light;
disconnectAttr defaultLightSet.message lightLinker1.link[1].light;
disconnectAttr nParticleBallsSE.message lightLinker1.link[0].object;
disconnectAttr defaultLightSet.message lightLinker1.link[0].light;

 

So now, in the scene there is no light-object connection present as the lightLinker has no connections.

When rendering, the cube is correctly ignored, but, oops, the nParticles are still visible!

 

Okay, create lightLinker connections with the following commands:

 

connectAttr set_objects_1.message lightLinker1.shadowLink[0].shadowObject;
connectAttr set_lights_1.message lightLinker1.shadowLink[0].shadowLight;
connectAttr set_objects_1.message lightLinker1.link[0].object;
connectAttr set_lights_1.message lightLinker1.link[0].light;

connectAttr set_objects_2.message lightLinker1.shadowLink[1].shadowObject;
connectAttr set_lights_2.message lightLinker1.shadowLink[1].shadowLight;
connectAttr set_objects_2.message lightLinker1.link[1].object;
connectAttr set_lights_2.message lightLinker1.link[1].light;

 

Do a render -> all objects are lit -> fine.

You can also check for the aiStandardSurface nParticle render if you turn off the volumeStepSize attribute by setting it to 0.0 -> setAttr "nParticleShape1.aiStepSize" 0.00; setAttr "nParticleShape2.aiStepSize" 0.00;

 

The result is the same.

The pCube behaves correctly and the nParticles are always visible when rendering, totally ignoring the lightLinker.

 

It actually does not matter whether the objects are in sets or not. They could be connected directly to the lightLinker node, but its easier to work with sets when there are a lot of objects which should be lit by the same light.

 

I need to fix this..is there anything I might have missed?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report