Page 1 of 1

Blender objects invisible

PostPosted: 18 Mar 2013, 13:59
by heyda
Hi,
thanks to WillemS, I finally got a working export from OSM2World, Blender and STK :)
Sadly there seem to be big troubles with getting all the geometries to STK. Does anybody have an idea, why all the remaining buildings etc. don't appear in STK?

It would be great, if anybody could take a second view at the blend and STK files
http://ikaria.informatik.uni-rostock.de ... nsaSTK.zip
I used STK 0.8, STK RDK a SVN few weeks old and Blender 2.65a

Re: Blender objects invisible

PostPosted: 18 Mar 2013, 14:09
by ctdabomb
do they show up in blender but not STK? try recalculating normals. if you have artist debug mode enabled, you should be able to hit ctrl-f10 (i think) to show wires like thing for all geometry. you can try that also.

Re: Blender objects invisible

PostPosted: 20 Mar 2013, 00:55
by Auria
The main issue appears to be the names of the objects. I am not sure if they are too long of the exporter/importer doesn't like Unicode name, but for now this appears to be an issue

Re: Blender objects invisible

PostPosted: 20 Mar 2013, 01:53
by Auria
I have just corrected this bug in SVN, if you update to the very latest version of the scripts, this issue should disappear

Re: Blender objects invisible

PostPosted: 29 Mar 2013, 16:59
by heyda
Great, that works fine :)
You can see all the geometry and collision detection is ok.2

We have still two problems yet:
1. Trees have black alpha
In Blender (switch to textured 3d view) the alpha is working fine, but not in STK. The texture contains the alpha channel, but maybe it's a problem of the composed material, as it's diffuse color is black?

2. Some buildings still white
From my POV there are problems with objects which contain composed materials (colour and texture) or just colours.

Anybody experiences with such kind of composed objects with the STK/irrlicht toolchain?

Re: Blender objects invisible

PostPosted: 29 Mar 2013, 17:12
by WillemS
Wow, that looks nice :)

heyda {l Wrote}:1. Trees have black alpha
In Blender (switch to textured 3d view) the alpha is working fine, but not in STK. The texture contains the alpha channel, but maybe it's a problem of the composed material, as it's diffuse color is black?


This should be solved by setting the Compositing type to Alpha test for every such transparent tree image, under the SuperTuxKart Image Properties in Blender.

Re: Blender objects invisible

PostPosted: 29 Mar 2013, 22:50
by heyda
Thanks, setting to "alpha blend" works fine for the trees :)

Now we just need to fix the color issues. Any ideas?

Re: Blender objects invisible

PostPosted: 30 Mar 2013, 16:23
by WillemS
heyda {l Wrote}:Now we just need to fix the color issues. Any ideas?


OSM2World uses OpenGL colored materials for this, and it seems Blender doesn't support it, and neither does STK :( So what would be probably needed is an extension/change to OSM2World, that generates coloured textures automatically if another colour is needed. For example, it could generate textures, say, wall_red and wall_brown from a wall texture, and output them. However that is going to use a lot of memory.
Alternatively, OSM2World could start using vertex colours instead of colouring the faces, but I think that too would require large changes in OSM2World. :(

By the way, would a tutorial for others on the STK Wiki be useful? I could write one if this is wanted :)

Re: Blender objects invisible

PostPosted: 30 Mar 2013, 19:53
by heyda
I will ask Tordanik, what changes might be easy to realise.

As a short Tutorial, I started an article here: http://wiki.openstreetmap.org/wiki/Supertuxkart

Re: Blender objects invisible

PostPosted: 31 Mar 2013, 15:27
by WillemS
heyda {l Wrote}:I will ask Tordanik, what changes might be easy to realise.

As a short Tutorial, I started an article here: http://wiki.openstreetmap.org/wiki/Supertuxkart


That is comprehensive already :D
I made some small clarifications about having to copy the textures alongside the OBJ file. If I didn't do that, Blender broke the texture paths, which caused STK to lose the textures, even if they were present in the STK folder.

Now hoping that this gets the attention of some mappers to do some more micromapping :)