Page 1 of 1

blender exporter and muulti texturing

Posted: Thu Sep 01, 2011 5:28 pm
by amigoface
hi,
does the blender exporter support multi texturing ?

i have added a second uvmap unit to make some decals to my textured model but the exporter seem to export only the first texture unit

any help is welcome

thanks and good day

Re: blender exporter and muulti texturing

Posted: Fri Sep 09, 2011 10:08 pm
by hartsantler
hi amigoface,
Multi-texturing has been supported for awhile, there were a few bugs that were recently fixed with this, so you should upgrade and retry. Note that OgreMeshy also has some bugs with multi-textures and "modulate", I have tested with Tundra2 and confirmed that it can show multi-textures properly, so you might want to use Tundra2 as a viewer.

I will post a youtube video on this thread later that better describes how to work with multiple textures, it is a bit different than the Blender way of doing things since Ogre has its own very different system.

For now i will quickly describe the system, the main option to consider is under the Influence panel: "blend" type, in blender this defaults to "Mix". This option will determine what blend mode is used in the Ogre generated .material. Where you assign the texture makes no difference, ie. it can be the Intensity, Color, Alpha, Ambient, etc - all will be used. Note that all textures are collected from these sub-slots and will use the same blend type. This should probably change in the future, since the user will expect Alpha subslot to use the alpha channel.

Not all blend types are supported, since Ogre has a limited set, or they simply don't have any close matching to Blender's settings. The supported types, and their Ogre mapping is listed below.

Code: Select all

            btype = slot.blend_type

            if rgba and slot.use_stencil:
                texop =     'blend_current_alpha'        # 'blend_texture_alpha' shadeless
            elif btype == 'MIX':
                texop = 'blend_manual'
            elif btype == 'MULTIPLY':
                texop = 'modulate'
            elif btype == 'SCREEN':
                texop = 'modulate_x2'
            elif btype == 'LIGHTEN':
                texop = 'modulate_x4'
            elif btype == 'ADD':
                texop = 'add'
            elif btype == 'SUBTRACT':
                texop = 'subtract'
            elif btype == 'OVERLAY':
                texop = 'add_signed'
            elif btype == 'DIFFERENCE':
                texop = 'dotproduct'        # nothing closely matches blender
            else:
                texop = 'blend_diffuse_colour'

Re: blender exporter and muulti texturing

Posted: Thu Sep 15, 2011 12:56 pm
by amigoface
hi hartsantler ,

well i tried all the options without success

please see the attached blend file
http://www.mediafire.com/?48x8i82vcfcklxu


and of course video tutorials are always more than welcome ;)

Re: blender exporter and muulti texturing

Posted: Thu Sep 22, 2011 3:14 pm
by hartsantler
hi Amigoface,
I had a look at your file, when previewing in Tundra2 or OgreMeshy the UV's appear wrong to what i see in Blender's view port. However, try changing Blender's view rendering from "Multitexture" to "GLSL" and you should see almost the same UV errors appear in the GLSL view. Blender2ogre will try to match the best it can the GLSL view in Blender, NOT the MultiTexture view mode.

Re: blender exporter and muulti texturing

Posted: Tue Sep 27, 2011 4:40 pm
by amigoface
hi hartsantler,

after some tests i can't get this working right
i tried making decal with an empty in glsl , it work in blender but show wrong after exporting


how can i make a runway and get it working correctly in ogre ???

any help is welcome

Re: blender exporter and muulti texturing

Posted: Tue Sep 27, 2011 7:29 pm
by hartsantler
hi amigoface, post your latest blend file and i will take a look at it.

Re: blender exporter and muulti texturing

Posted: Wed Sep 28, 2011 2:07 pm
by amigoface
http://www.mediafire.com/?jnzh52uyoadheqh

please note that the decal texture take it's coordinates from an empty object

as usual

any help is welcome

Re: blender exporter and muulti texturing

Posted: Wed Sep 28, 2011 6:27 pm
by hartsantler
hi amigoface, you can only use UV mapping. The other mapping options in blender like: generated, object, etc... are not supported.

Re: blender exporter and muulti texturing

Posted: Thu Sep 29, 2011 9:09 am
by amigoface
hi hartsantler,

ok but in my case, how could you achievve this ?

i have a long runway that i have to place some decals over
since 2 UVtexture coordinates didn't worked for me after exporting

Re: blender exporter and muulti texturing

Posted: Thu Oct 20, 2011 2:47 pm
by hartsantler
Hi Amigoface, here's the tutorial as promised, if you have more questions please post them here in this thread.
[youtube]3EpwEsB0_kk[/youtube]

Re: blender exporter and muulti texturing

Posted: Fri Oct 28, 2011 11:34 am
by amigoface
Hi hartsantler ,

first thanks for the tutorial .

next
i still cannot get my runway with decal correctly exported


here the blend file :
http://www.mediafire.com/?nnnnsks5ndaifyy


btw : i am using blender 2.6 with version 0.5.5 of the exporter
and the plane has 2 uv layers :
one for the raod
and the second for the decals

please i really appreciate your assistance on this

if i did things wrong please show me the right direction