Author Topic: [solved] blender_export_(smoothinggroups_?_problem)  (Read 2189 times)

weedkiller

  • Draco Rider
  • *****
  • Posts: 277
    • View Profile
[solved] blender_export_(smoothinggroups_?_problem)
« on: 19 March 2008, 14:09:09 »
Hi all,
i have some "beauty" problems with blender export to g3d.
I use the newest blender-exportscript and the glexempel .exe with wine to convert.

The problem is that ingame the models aren't smoothed correctly like seen on the image. I'm not sure where the problems begin but i will investigate. At the moment i know that normels are exported corectly and it should be something with smoothinggroups (wether a face has hard or smooth borders to others, for example a quad of triangles always has smooth borders inside).

Does anyone know any tricks inside blender to change facegroups? i only can set all smooth or hard but not different smoothingroups...

Ok, an image: The left one is original g3d with white texture and the other in and exported one with also white texture.

probably it helps to look at xml files, if the problem doesnt occure right after converting in every direction ;)
« Last Edit: 19 March 2008, 18:04:14 by weedkiller »

Duke

  • Guest
(No subject)
« Reply #1 on: 19 March 2008, 14:21:30 »
Well, on the pics I don't see a difference in smoothing, the right one is illuminated more and it seems some normals are flipped.
« Last Edit: 1 January 1970, 00:00:00 by Duke »

charlieg

  • Guest
(No subject)
« Reply #2 on: 19 March 2008, 16:17:29 »
Better place to ask this may be the FreeGameDev art forum here:
http://forum.freegamedev.net/index.php? ... &frm_id=11
« Last Edit: 1 January 1970, 00:00:00 by charlieg »

weedkiller

  • Draco Rider
  • *****
  • Posts: 277
    • View Profile
(No subject)
« Reply #3 on: 19 March 2008, 17:30:44 »
ok, i found two things:

-at first the "glow" is just to a high default diffuse-color setting. (0.8/0.8,/0.8 instead 0,52../0,52../0,52..)
i will have a look if that are "hardcoded" values in the blender-exporter.

-secondly i think that there are wrong normals (so appears not smoothed). The normals are stored for each point and not for faces and so sometimes there are different normals at one point so shading is with "borders" (in the image you see this at the side of the head)

I also will look after this in the py.
I only have to find a way how to get smoothed normals by blender or making correct smoothed ones out of the facenormals.

//EDIT:

Hehe, ok thanks you two, your hints were very useful. I did some mistakes whithin the blenderfile: I did't remove dublicated vertices when i importet the model, so its quite normal that he has different normals for different points even if they are at the same place.

For my northemenunits i will change the diffuse and specular values which the expoter writes to a hardcoded value as the appearance in blender are not the same in glest. So in blender the texture looks good on it but in glest it is much too bright.

So this is solved now.
« Last Edit: 1 January 1970, 00:00:00 by weedkiller »

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
(No subject)
« Reply #4 on: 19 March 2008, 21:26:07 »
Quote from: "weedkiller"
the "glow" is just to a high default diffuse-color setting. (0.8/0.8,/0.8 instead 0,52../0,52../0,52..)


 :o I never realised that the default for glest models was 0.52. I've been purposely setting all my models to 1.0!!  Thats why all the models I put in-game look like they had some uranium for breakfast.

I've got some work to do... *starts Blender*
« Last Edit: 1 January 1970, 00:00:00 by wciow »
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0