[fixed] b3d Shinier since 1.6

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Auria
Competition winner
Posts: 120
Joined: Wed Feb 18, 2009 1:11 am
Contact:

[fixed] b3d Shinier since 1.6

Post by Auria »

Hi. Since the 1.6 update, all materials that are "flat colors" (non-UV-mapped) are very shiny, much shinier that other UV-mapped materials, which have, AFAIK, exactly the same settings.

The renderer plugin is OpenGL.
I attached a screenshot so you can see : the elephant and the kart's wheels are bright white, but all textured stuff around are OK. As far as I know, this started with irrLicht 1.6, and was Ok before.

Is that a known change?

Image
Screenshot here : http://www.mediafire.com/imageview.php? ... nc&thumb=4
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Well, what are the material settings, which kind of mesh format do you use, did you ensure correct normals?
Auria
Competition winner
Posts: 120
Joined: Wed Feb 18, 2009 1:11 am
Contact:

Post by Auria »

I've tried a whole range of things, up to :

Code: Select all

            material.AmbientColor = video::SColor(255, 50, 50, 50);
            material.DiffuseColor = video::SColor(255, 50, 50, 50);
            material.EmissiveColor = video::SColor(255, 0, 0, 0);
            material.SpecularColor = video::SColor(255, 50, 50, 50);
            material.Shininess = 0.0f;
I see the model much, much darker but the shininess stays in
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Please show the whole material settings (including material type, etc). Or point me into your SVN to find the necessary code.
Also note that beginning with Irrlicht 1.6 the OpenGL rendering has changed for non-textured materials. The diffuse and ambient settings are by default taken from vertex colors, while emissive and specular are taken from the material. This can be changed in the SMaterial member ColorMaterial.
Auria
Competition winner
Posts: 120
Joined: Wed Feb 18, 2009 1:11 am
Contact:

Post by Auria »

hybrid wrote:Please show the whole material settings (including material type, etc). Or point me into your SVN to find the necessary code.
This is actually the only material-related code that is applied to this material as far as I know; everything else comes straight out of the B3D loader. (Model can be found here http://supertuxkart.svn.sourceforge.net ... elephpant/ if you ever want to see it)
hybrid wrote: Also note that beginning with Irrlicht 1.6 the OpenGL rendering has changed for non-textured materials. The diffuse and ambient settings are by default taken from vertex colors, while emissive and specular are taken from the material. This can be changed in the SMaterial member ColorMaterial.
Interesting, this sounds consistent with the change we saw with the 1.6 transition. Interestingly enough, I tried playing with the ColorMaterial parameter, but no matter how I alter the model's color, the high shininess always seems to stay
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Does it help if you set the specular color to black?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Auria
Competition winner
Posts: 120
Joined: Wed Feb 18, 2009 1:11 am
Contact:

Post by Auria »

BlindSide wrote:Does it help if you set the specular color to black?
Nope, still as much white shining :(

EDIT: oh, and I also tried "material.MaterialType = irr::video::EMT_SOLID;", no change
Auria
Competition winner
Posts: 120
Joined: Wed Feb 18, 2009 1:11 am
Contact:

Post by Auria »

Rehi,

Hiker (our project leader) found a very nice and easy way to reproduce the problem : simply download the elephant B3D file from the SVN location mentionned above, then open it in the irrLicht demo #9 (mesh viewer).

Reslt is as follows below :
Image
hiker
Posts: 58
Joined: Thu May 31, 2007 5:12 am

Post by hiker »

Hi,

I made a separate package of the model and the texture it uses:
http://luding.org/elephpant.tar.bz2.
Just unpack in the directory where the meshviewer is, and load it. You have to scale the model up by about 20 (in the scaling fields of the mesh viewer) to make it large enough.

Any suggestions on what we should be doing is appreciated!

Cheers,
Joerg
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Hm, I tried it on OpenGL/Linux with 1.5, 1.6 and trunk and I think I can't reproduce it:

Image
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

The result Auria showed looks the same as CuteAliens but I thought we were discussing shiny elephants not white elephants?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
hiker
Posts: 58
Joined: Thu May 31, 2007 5:12 am

Post by hiker »

Hi,

thanks for the quick answers.
BlindSide wrote:The result Auria showed looks the same as CuteAliens but I thought we were discussing shiny elephants not white elephants?
Maybe I was too quick in stating that the issue can be reproduced with the model viewer - sorry for that. I just had the idea of using the viewer and noticed that the areas that are shiny are white in the viewer, I didn't compare with irrlicht 1.5. So looks like those are different issues then. So in order to get an example up and running that shows our problem: do you have any idea what we would need to change in the viewer to see the part of the models that have colours assigned in blender, but not a texture? I would hope that once we have the colours we might be able to either reproduce the shininess-issue, or solve it :)

Thanks a lot!
Joerg
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Auria wrote:I see the model much, much darker but the shininess stays in
Just to avoid we're talking about different things. You are not talking about a model beeing brighter or darker, but this is about light-reflections which show some sharper contrast? Or some over-saturation of some areas but not others?

Maybe it would help if you had an old screenshot also so we can see the difference.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

A noticeable difference is found when enabling lighting. Then 1.5 does make the whole mesh basically just black. However, the newer versions (1.6/trunk) do produce slightly shaded edges at the mouth etc. Which colors are assigned to the elephant? I'd assume plain white, which would lead to very bright vertex colors (since ambient color etc are added)
Auria
Competition winner
Posts: 120
Joined: Wed Feb 18, 2009 1:11 am
Contact:

Post by Auria »

You can see an old screenshot here : http://1.bp.blogspot.com/_im4Yv1xoVXw/S ... h/STK1.jpg
That's how the elephant is supposed to look like
Just to avoid we're talking about different things. You are not talking about a model beeing brighter or darker, but this is about light-reflections which show some sharper contrast? Or some over-saturation of some areas but not others?
Actually, I just meant that I've been able to change pretty much all other light settings; i.e. I've been able to reduce the ambient light a lot so that the elephant is darker; but even when I do so the shininess stays in. i.e. i've been able to tweak pretty much every setting but the shininess
Which colors are assigned to the elephant?
Blue, I believe, especially given the older screenshot above. Unless you are talking of something else than vertex color (material colors, I've played with them all but the shininess always seems to stay)
Post Reply