thx rdb, that helps allot…but…
another 2 question regarding normalmaps/parallax:
1: I specify the used normalmap in the egg file (and put the parallax into the alpha), so the texture is already loaded, when i create the actor (but the alpha isn’t i guess). Is there a way to “get” the applyed Normalmap from my actor-node and then re-apply it together with the parallax-alpha-map without knowing the texture name/lokation? Or even better: can i tell panda to recognise if there is an alpha in my normalmap file and then apply it as parallax-map???
The problem is i dont want to specify every parallaxmap-name/path for every actor in my code but in the egg file…
or can i simply change the part in the egg-file where the normlamap gets applyed? from
<Texture> phong1SG.tref1 {
"bg_n.jpg"
<Scalar> format { rgb }
<Scalar> wrapu { repeat }
<Scalar> wrapv { repeat }
<Scalar> minfilter { linear_mipmap_linear }
<Scalar> magfilter { linear }
<Scalar> envtype { normal }
}
to
<Texture> phong1SG.tref1 {
"bg_n.jpg"
<Scalar> format { rgba }
<Scalar> wrapu { repeat }
<Scalar> wrapv { repeat }
<Scalar> minfilter { linear_mipmap_linear }
<Scalar> magfilter { linear }
<Scalar> envtype { normalheight}
}
tryed it but it dont works, cause “normalheight” is unknown… is it possible that way with the right “keyword” ;D ???
2: is there a way to turn normalmapping off (in config or in code)…need this as option in my game for the not so fast machines… (i cant just not call “setshaderauto” because i may need it for the shadows…)
thx for your help!!!
edit: and another question:
3: is it possible to specify the specular color of my model via texture?
edit2: i tryed to apply a parallaxmap as shown in the manual like:
m=loader.loadModel("ob.egg")
tex = loader.loadTexture("testpara.jpg")
ts = TextureStage('ts')
ts.setMode(TextureStage.MHeight)
m.setTexture(ts, tex)
m.setShaderAuto()
m.reparentTo(render)
the model has a normal/specular/gloss/glow and diffuse map specified in the egg file and is loading/rendering correct without the parallax but if i try the code above i get following error:
:gobj(error): created-shader: (22) : error C5102: input semantic attribute “TEXCOORD” has too big of a numeric index (8)
:gobj(error): created-shader: (23) : error C5102: input semantic attribute “TEXCOORD” has too big of a numeric index (9)
:gobj(error): created-shader: (25) : error C5102: output semantic attribute “TEXCOORD” has too big of a numeric index (8)
:gobj(error): Shader encountered an error.
:gobj(error): created-shader: (22) : error C5102: input semantic attribute “TEXCOORD” has too big of a numeric index (8)
:gobj(error): created-shader: (23) : error C5102: input semantic attribute “TEXCOORD” has too big of a numeric index (9)
:gobj(error): created-shader: (25) : error C5102: output semantic attribute “TEXCOORD” has too big of a numeric index (8)
:gobj(error): created-shader: (21) : error C5041: cannot locate suitable resource to bind parameter “l_eyevec”
:gobj(error): created-shader: (25) : error C5041: cannot locate suitable resource to bind parameter “l_binormal”
what am i doing wrong?