Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Make the shadow darker?
Topic Started: Mar 8 2009, 05:28 PM (529 Views)
Mauro
DirectX - WinAPI Programmer
[ *  *  *  * ]
Hi, i remember one day that i maked the stencil shadow compley black editing the difference from the ambient light and the directional light... but now i cant make it again.. is partlialy black.. and i want it complety black... if i use the ambient light 255,255,255 the shadow disapper, if i use 0,0,0 is partialy black.. the drectional light is 255,255,255... can you say me the good options of lights? there is also a point light...

btw the shadow is from LIGHT_DIRECTIONAL
Programming c++ and directx
Offline Profile Quote Post Goto Top
 
Fartface_McGiggles
Advanced Member
[ *  *  * ]
Try getting rid of the point light.
Offline Profile Quote Post Goto Top
 
Mauro
DirectX - WinAPI Programmer
[ *  *  *  * ]
I did but is the some
Programming c++ and directx
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
Mauro
Mar 8 2009, 05:28 PM
if i use 0,0,0 is partialy black..
Have you tried using negative values?
Offline Profile Quote Post Goto Top
 
Andrew75
Member Avatar
Andrew75
[ *  *  *  *  *  * ]
http://forum.ultimate3d.org/topic/173904/1/?x=90
ya negitive values will work !
Posted Image
(SONIC CD REMIX)
check out my vids
http://www.youtube.com/profile?user=tuxmask75
Check out our projects vids
http://www.youtube.com/profile?user=AXSXProject
Offline Profile Quote Post Goto Top
 
Mauro
DirectX - WinAPI Programmer
[ *  *  *  * ]
I tryed... but isn't complety black...

See:

Posted Image
Programming c++ and directx
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
I don't think you can get it any darker than that.
Offline Profile Quote Post Goto Top
 
Mauro
DirectX - WinAPI Programmer
[ *  *  *  * ]
Ok...
Programming c++ and directx
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
Generally you can get things to be totally black through the use of shadows. Have a look at this pseudo-code formula:
PixelColor = (LightFromLight1 + LightFromLight2 + ... + LightFromLightN) * MaterialDiffuseColor + AmbientLightColor*MaterialAmbientColor + MaterialEmissiveColor
It excludes fog and specular lighting, but that is not relevant in this context.

To get PixelColor to be exactly zero (without using negative color values, which tends to be bad style) all elements of this sum have to be zero. The MaterialDiffuseColor can not be zero, because you want the surface to be effected by light. So this means that the shadowed part must not be lit by any other light source, because only then the sum in the braces will be zero. Other than that the AmbientLightColor or the MaterialAmbientColor have to be zero and the MaterialEmissiveColor has to be zero. This can be done through functions and/or in the modeling software.

If you can not get it to be zero without using negative color values (for example because there is a light source for which shadows are disabled) you can use negative values, but you can not use them for the AmbientLightColor. This color is always positive (in U3D 2.x, in U3D 3.0 it can have arbitrary values). For most other color values negative values are valid (e.g. for light colors and material colors). One possibility would be to use SetModelMaterialEmissive(...) to set up negative emissive lighting.
Offline Profile Quote Post Goto Top
 
Mauro
DirectX - WinAPI Programmer
[ *  *  *  * ]
Thank's you were understable =)
Programming c++ and directx
Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply