Known bugs:
motion delay related shaders in Compositor is not correct in 1.6.x
the head of Human 1 will disappear at certain angle
Captain Blender’s texture is not correct
Water surface demo sometimes is not working.
Sound in ode car may not sounds right in 1.5.4.
cool work as always the shader compositor is total awesomness
one Q: how is supposed to work captain blender? I don’t see modifiers in the functions panel
Click on the attributes panel, and play with the joints (morphing targets). You can control the facial expression of Captain Blender through morphing capability of panda.
i have encountered some VERY strange issues after upgrading to ubuntu 9.04 64bit.
firstoff. it locked itself up upon starting. only warning output was:
:prc(warning): Invalid floating-point value for ConfigVariable simple-thread-epoch-timeslice: 0.05
i encounter the same thing with all panda applications as soon as i import the gtk module.
strange enough it works again after putting “want-pstats 1” into the config.prc.
then it wont lock itself up anymore but will raise a number of other issues:
first would be those 2 warnings:
:prc(warning): Invalid floating-point value for ConfigVariable simple-image-threshold: 0.1
:prc(warning): Invalid floating-point value for ConfigVariable egg-coplanar-threshold: 0.01
resulting in most samples having seriously scrabled image ouput (very blocky rasterisation. this is what the disco-sample looks likehttp://imagebin.org/52328
most likely due to this rough rasterisation most samples refuse to run and crash with errors simmilar to this one:http://dpaste.com/55015/
there where a few more samples running with slightly different issues but i guess most are based upon this strange gtk-related bug.
That sounds like the localization issue described here: https://discourse.panda3d.org/viewtopic.php?t=1458. I thought we had eliminated the possibility of this happening, but apparently it’s snuck back in. The fundamental problem is that some localization setting gets changed which changes the low-level C runtime library’s floating-point parser, so that refuses to parse numbers such as “0.5” (expecting instead a comma like “0,5”). You can imagine what merry chaos this change has on Panda’s internal workings when suddenly all floating-point numbers fail to be parsed correctly.
now that you mention it… my previous system was set up with english as default language. this time i picked german.
the thing is… panda itself runs perfectly fine… only when gtk is imported it goes crazy
Ah, that’s interesting. Well, that might make sense: Panda explicitly sets the language to the “C” locale for parsing numbers when it starts up. I bet gtk is setting it back to the user’s requested locale when it starts up.
FYI, I linked the wrong thread originally. The first time we encountered this problem with the locale was in this thread, not that it matters much.
I’ve just checked in a better workaround. The new workaround replaces the system atof() and strtod() calls with our own implementation, which is not locale-specific. Should solve this problem once and for all.
thx for the fix. wonder why noone else run into the issue so far. despite the number of non-english systems out there. well i’ll keep an eye on it and report back if i still encounter problems ( i hope i dont need to )
First off, Excellent work putting all of this together.
I’m interested in using some of the shaders you have shown off here. I modified ynjh_jo’s facingRatio code to create an XRay (See through) shader.
Everything’s fine with the shader. It works great. But I’m having trouble with the scene itself. The scene flickers like crazy. It’s cycling through the cubemap textures to paint some of the objects. I changed the scene and took out the virus and panda and added a ball.
The girl doesn’t have any problems but the ball flickers through the cubemap, here I have it capturing the grass texture in the screenshot.
It’s no slower than the original. Frame rate drops when I screen capture. I just modified one variable in one line.
The earth on the right is the original shader from the demo.
The other earth and the girl are using the xray shader.
BTW, I got the flickering to stop. The issue is that the model needs a texture. The ball I was using is a blank model.
Here’s the Xray shader:
//Cg
void vshader(
float4 vtx_position : POSITION,
float2 vtx_texcoord0 : TEXCOORD0,
float3 vtx_normal : NORMAL,
uniform float4x4 mat_modelproj,
uniform float4 mspos_cam,
uniform float4 mspos_light,
out float l_smooth,
out float l_facingRatio,
out float2 l_texcoord0 : TEXCOORD0,
out float4 l_position : POSITION
)
{
// SMOOTH SHADING : dot product ranges from -1~1, scale it so I get 0~1,
// but before it, I set the ambient light to .2,
// so it's .5/2.5 (2.5 is -1.5~1 range), add the .5 to the dark side
l_smooth = smoothstep( -1.5,1,dot(vtx_normal, normalize(mspos_light-vtx_position)) );
l_facingRatio = pow( 1.0-saturate( dot(vtx_normal, normalize(mspos_cam-vtx_position)) ), 2 );
l_position = mul(mat_modelproj, vtx_position);
l_texcoord0=vtx_texcoord0;
}
void fshader(
in float2 l_texcoord0: TEXCOORD0,
in float l_smooth,
in float l_facingRatio,
uniform float4 k_envirLightColor,
sampler2D tex_0 : TEXUNIT0,
out float4 o_color:COLOR)
{
float4 tex = tex2D(tex_0, l_texcoord0);
// o_color = float4( tex.rgb*l_smooth, tex.a );
o_color = float4( lerp(tex.rgb*l_smooth, k_envirLightColor.rgb, l_facingRatio) , l_facingRatio*2 );
}
The last “l_facingRatio*2” is what I changed. The “2” is a simple scalar- increasing this number will increase the power of the texture- it will make it less transparent.
I get it now. In the original scene before I changed the shader had the same problem. I think the Panda and the virus have segments that aren’t textured.
I created a variation on the Xray shader. This one doesn’t blend the colors with another color (white in our case), it just uses the texture from the model.
//Cg
//XRay shader number 2
//Shader maintain object texture
void vshader(
float4 vtx_position : POSITION,
float2 vtx_texcoord0 : TEXCOORD0,
float3 vtx_normal : NORMAL,
uniform float4x4 mat_modelproj,
uniform float4 mspos_cam,
uniform float4 mspos_light,
out float l_smooth,
out float l_facingRatio,
out float2 l_texcoord0 : TEXCOORD0,
out float4 l_position : POSITION
)
{
// SMOOTH SHADING : dot product ranges from -1~1, scale it so I get 0~1,
// but before it, I set the ambient light to .2,
// so it's .5/2.5 (2.5 is -1.5~1 range), add the .5 to the dark side
l_smooth = smoothstep( -1.5,1,dot(vtx_normal, normalize(mspos_light-vtx_position)) );
l_facingRatio = pow( 1.0-saturate( dot(vtx_normal, normalize(mspos_cam-vtx_position)) ), 2 );
l_position = mul(mat_modelproj, vtx_position);
l_texcoord0=vtx_texcoord0;
}
void fshader(
in float2 l_texcoord0: TEXCOORD0,
in float l_smooth,
in float l_facingRatio,
uniform float4 k_envirLightColor,
sampler2D tex_0 : TEXUNIT0,
out float4 o_color:COLOR)
{
float4 tex = tex2D(tex_0, l_texcoord0);
// o_color = float4( tex.rgb*l_smooth, tex.a );
o_color = float4( lerp(tex.rgb*l_smooth, tex.rgb*l_smooth, l_facingRatio) , l_facingRatio*2 );
}