Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Multiple light sources

 
 
Old 03-02-2006   #1 (permalink)
Pedro A. Rico


 
 

Multiple light sources

I am trying to do the following: I need to apply ambient lighting to one
mesh, while at the same time applying directional lighting to another,
without the light sources influencing their respective meshes. Is there any
way of doing this in avalon?


Thanks in advance,
Pedro A. Rico

My System SpecsSystem Spec
Old 03-02-2006   #2 (permalink)
Pedro A. Rico


 
 

RE: Multiple light sources

Sorry, I meant without having each light source influence any meshes other
than the one it was intended for.

"Pedro A. Rico" wrote:

> I am trying to do the following: I need to apply ambient lighting to one
> mesh, while at the same time applying directional lighting to another,
> without the light sources influencing their respective meshes. Is there any
> way of doing this in avalon?
>
>
> Thanks in advance,
> Pedro A. Rico

My System SpecsSystem Spec
Old 03-03-2006   #3 (permalink)
Jordan Parker [MSFT]


 
 

Re: Multiple light sources

You can't restrict a light to specific meshes. The general solution would be
to create two ovelapping Viewport3Ds. One with one mesh, one with the other.

Given the specific scene you described below, there would be another way.
Instead of having an AmbientLight, use an EmissiveMaterial with the same
color as the AmbientLight on the "ambient mesh." Caveat: EmissiveMaterials
are "transparent" because they don't write to the depth buffer so if you
have something in front or behind it make a MaterialGroup that includes a
compeletly transparent DiffuseMaterial in addition to the EmissiveMaterial.
This way your "ambient mesh" will look like it has ambient lighting and it
will not be affected by the DirectionalLight.

(If you had a PointLight instead of a DirectionalLight you may be able to
set the Range so that only the mesh you want is hit by the light.)

Jordan

> Sorry, I meant without having each light source influence any meshes other
> than the one it was intended for.
>
> "Pedro A. Rico" wrote:
>
>> I am trying to do the following: I need to apply ambient lighting to one
>> mesh, while at the same time applying directional lighting to another,
>> without the light sources influencing their respective meshes. Is there
>> any
>> way of doing this in avalon?
>>
>>
>> Thanks in advance,
>> Pedro A. Rico



My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Too many update driver sources. Drivers
WMI info from 2 sources PowerShell
Composite and S-Video sources Vista music pictures video
TV/Media Distribution and Multiple A/V Sources Vista music pictures video


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46