This project is read-only.

please help with shadows and glossiness

Aug 25, 2010 at 9:38 AM


i just watched this video and could see that shadows and glossiness can be implemented within goblin. 

i tried this:

scene.EnableShadowMapping = true

but it throws an error "The active render target and depth stencil surface must have the same pixel size and multisampling type."

had somebody deal with that? i had similar problem before, but it was not goblin. i don't know where to change surface parameters for goblin =(

and glossiness... my only idea was to play with material parameters for 3d model (such as glossiness, specular level etc.) in model editor before exporting to visual studio. but it didn't help. am i doing smth wrong? 

any help would be appreciated...

Sep 2, 2010 at 12:14 PM

I never had that error with shadow mapping before. If you set scene.EnableShadowMapping to true, you should also include the ShadowMap.fx and PostScreenShadowBlur.fx in data/Shaders and in data/Textures into your project Content directory.

For the glossiness, you may need to write your own shader, such as for reflections. The one you see in the video uses the original racing game's NormalMapping shader, which is not included with the release. You can see how your can create your own shader and use it with Goblin XNA from Tutorial 11. It's best you extend the current Material class to include anything extra that you use in your shader (e.g., bump map textures), and set the GeometryNode.Material to your extended class. It'll then be passed to your shader automatically.


Oct 4, 2010 at 5:06 AM

i get the same error as the above and i have included the shader files etc.  For me, it seems that it is a problem with using .x files. If I merely have one included in the project (i.e., it is not actually being loaded in the code), I get this error. if everything is FBX, then it works. Odd.

Oct 10, 2010 at 8:17 AM

What you see in the video are all .x files. Maybe your .x file has some weird formatting?


Oct 10, 2010 at 8:19 AM

are you using 3dMax for your models? what type of X converter then you use? i'm using panda

Oct 10, 2010 at 8:23 AM

We use GoogleSketchUp's plug in to convert models to .x


Oct 29, 2010 at 6:07 PM

Nevermind, it was having an issue with the way I incorporated XNAnimation