Problems with shadows

Hi folks.

I have a little problem with shadows in panda3d.
Here is the relevant code and a screenshot how it looks like

int main(int argc, char *argv[]) {
...

	// Load our model
	NodePath tankActor = window->load_model(framework.get_models(), argv[1]);
	tankActor.set_scale( atoi( argv[2] ) );
	tankActor.set_pos( 0.0, -100.0, 2.0 );
	tankActor.reparent_to(window->get_render());

	// setup camera
	camera = window->get_camera_group();
	camera.set_pos( -100.0, -100.0, 100.0 );

	PT(DirectionalLight) dirLight;
	dirLight = new DirectionalLight( "DL" );
	dirLight->set_shadow_caster( true, atoi( argv[3] ), atoi( argv[3] ) );
	NodePath dlnp = window->get_render().attach_new_node( dirLight );
	dlnp.set_hpr( -30, -60, 60 );
	window->get_render().set_light( dlnp );
	window->get_render().set_shader_auto();
...
}

http://img525.imageshack.us/img525/6142/shading.jpg

as you may guess, the lower budy of the tank is a second cube and therefor shadowed on its own but how do i avoid this? and how do i setup the model to cast shadows on itself?

Maybe you need install new drivers for videocard or change in config opengl on directx.

i have the latest driver installed and switching to directX is no option since i’m working with linux.
i tried a different video-card (intel X4500 was the first, GeForce 8800 the second) but the shadows look the same.

i also tried to use tinydisplay, same problem.

i did some further testing. it seems to be a problem with my modeling. if i load a panda model, the shadows look good under opengl.
so, here is how i do my models in blender:
first, i create a cube and move some edges.
i create a second cube and place it right under the first, again i move some edges.
i create a cube, subdevide it two times and move the edges so that the third cube looks like a tower of a tank.
finally i place a resized tube in front of the “tower”,
i group all objects and export the group as ‘.x’ file.
thats it. i hope someone sees the problem

You use auto-shader, perhaps, you need use yourself shader, as sample in Samples\Shadow.

thanks for the hint BVOG. now the shadows look better, but not perfect. i think a little fine tuning is necessary.
http://img832.imageshack.us/img832/3922/shadowstank.jpg

EDIT: i was wrong, the first problem still remains. i upload a video tomorrow with a little demo i wrote and all the source code.

Do you have Windows7? I have this too. But sometimes i have problem with Panda)

oh, sry i forgot to mention my setup:
windows 7 x64 Prof.
NVidia GPU 8800GTS 320M
newest drivers

i also tried this under linux x64 but the intel GPU don’t support shaders :frowning:

but i found a partial fix here [url]Shadow Mapping Not Working]

so i think this post can be closed