Aearon Posted August 29, 2008 Share Posted August 29, 2008 hi guys, i have a 'distant light' illuminating a large landscape from a very low angle, and to optimize the scene i'd like to have a non-square shadow map, otherwise most of my map will not hit any geometry. in the interface there doesn't seem to be a simple way to set this up. i did manage to set it up by scaling my light in Y (e.g. to 0.5) and adding an 'aspect' float parameter just like you have on cameras and setting it to the same value. but shouldn't this be easier? maybe the aspect parameter should be on the light by default, although invisible, and both this and y scale could be calculated based on the X and Y resolution. Quote Link to comment Share on other sites More sharing options...
Serg Posted September 6, 2008 Share Posted September 6, 2008 tried this in H8 ages ago, just setting a non-square resolution... weird things that I dont understand happened like the shadow missing from half the terrain, in the wrong place, etc... I wouldn't worry too much about having to render it square, all that black doesn't really affect file size much because of the Rat compression. It takes a bit longer to render all that empty space though, but not that much. Quote Link to comment Share on other sites More sharing options...
aracid Posted September 6, 2008 Share Posted September 6, 2008 Hey Aearon Testing this with a spotlight, under depth map options u can specify what ur resolution is, and in the case ur dealing with a longer flatter image, then just increase the X resolution, or decrease the Y res that should work. hope this helps Quote Link to comment Share on other sites More sharing options...
Aearon Posted September 7, 2008 Author Share Posted September 7, 2008 hi, thanks aracid, it does work with a spotlight. and exactly the way i would have expected. i guess Serg is right about it not being a big deal, but maybe i can just use a faraway spotlight for now, anyway this should be a bug report then, if it works with a spotlight, it should work just the same with a distant light. with a distant light, whatever resolution you set, the map is stretched out to square when the final image is rendered. it looks like the map itself is rendered correctly though. this is why the shadows appear in the wrong places Serg. i attached an example of it not working. i tested in 9.5.209 and 9.5.219, windows xp, VC8 build distlight_rect_shadowmap.hipnc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.