| 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: |
| Make the shadow darker? | |
|---|---|
| Tweet Topic Started: Mar 8 2009, 05:28 PM (529 Views) | |
| Mauro | Mar 8 2009, 05:28 PM Post #1 |
|
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 | |
![]() |
|
| Fartface_McGiggles | Mar 10 2009, 04:49 AM Post #2 |
|
Advanced Member
![]() ![]() ![]() ![]() ![]()
|
Try getting rid of the point light. |
![]() |
|
| Mauro | Mar 10 2009, 01:28 PM Post #3 |
|
DirectX - WinAPI Programmer
![]() ![]() ![]() ![]() ![]() ![]()
|
I did but is the some |
| Programming c++ and directx | |
![]() |
|
| Despellanion | Mar 10 2009, 01:30 PM Post #4 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Have you tried using negative values? |
![]() |
|
| Andrew75 | Mar 10 2009, 04:51 PM Post #5 |
|
Andrew75
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
http://forum.ultimate3d.org/topic/173904/1/?x=90 ya negitive values will work ! |
![]() (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 | |
![]() |
|
| Mauro | Mar 11 2009, 03:13 PM Post #6 |
|
DirectX - WinAPI Programmer
![]() ![]() ![]() ![]() ![]() ![]()
|
I tryed... but isn't complety black... See:
|
| Programming c++ and directx | |
![]() |
|
| Despellanion | Mar 11 2009, 03:47 PM Post #7 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I don't think you can get it any darker than that. |
![]() |
|
| Mauro | Mar 11 2009, 06:26 PM Post #8 |
|
DirectX - WinAPI Programmer
![]() ![]() ![]() ![]() ![]() ![]()
|
Ok... |
| Programming c++ and directx | |
![]() |
|
| Dr. Best | Mar 11 2009, 07:54 PM Post #9 |
|
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. |
![]() |
|
| Mauro | Mar 11 2009, 10:27 PM Post #10 |
|
DirectX - WinAPI Programmer
![]() ![]() ![]() ![]() ![]() ![]()
|
Thank's you were understable =) |
| Programming c++ and directx | |
![]() |
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |





![]](http://z1.ifrm.com/static/1/pip_r.png)




4:40 PM Jul 11