Panda's new shader system

It looks like the egg format adopted in v1.5.0 puts a lot of shader information within the egg file itself. This is a great move that will make project design that much more streamlined.

I’m having trouble with the system however. I can enable glow, modulated glow, colored glow.

I can not get normalmapping to work for some reason. In the older system I could get it to work fine, but I would prefer to use the new system.

Also, it seems that the Antialiasing support is messed up?

Here is a package of some models- the python script is called, this whole thing is just to test out the different effects possible- press the Space key to advance through the models. Maybe someone can tell me what I need to change.

I know that cubemaps are not supported currently, I think it would be great if they could be, perhaps the cubemap pointers could even be embedded within the model itself. :slight_smile:

You’ve heard of vertex normals? Well, to use normal mapping, vertices have to have “tangents” and “binormals” as well. Your vertices do have normals, but they don’t have tangents and binormals. Fortunately, the panda tools can generate them:

egg-trans -tbnall inputfile.egg -o outputfile.egg

The reason I forgot to include this in the manual is that maya2egg does it automatically: it checks if the model has a normal map, and if so, it generates tangents and binormals. But you’re using chicken, so you have to do it manually.

PS your textures are not a power of two in size. Panda is having to rescale them when it loads. This tends to blur the textures.


the tbn modification worked great. I thought I had tried that before and it didn’t work- but it’s working great now.

My textures are 512x512. I thought that would work since 2^9 = 512. What should the texture size be?

512x512 is good size Josh just miss-looked.

Good I have lots of models that use 512x512 textures.

I now have 6 variations on the same model in the sequence-

model without bloom
model with normal map but no bloom
model with bloom
model with bloom and normal map
model with alpha glow (pure white bloom)
model with colored alpha glow

I’ve also put in a readme with cookbook instructions on how to modify the .egg files to get the desired result.

I added toon shading but there’s no way to call this directly from the model- it’s either on or off on the whole scene so not really what I want for this little demo.

Any idea of an ETA for cubemapping will be supported? I’d like to have both cubemapped nodes and bloomed nodes on the same scene.

Don’t forget: toon rendering consists of two parts:

  • Toon shading: the lighting on the model is quantized.

  • Took inking: black lines are drawn around the model.

The toon inking algorithm that I usually use is a full-screen algorithm. But toon shading is per-model.