blender exporter and muulti texturing

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
amigoface
Greenskin
Posts: 132
Joined: Mon Oct 13, 2008 3:01 pm

blender exporter and muulti texturing

Post by amigoface » Thu Sep 01, 2011 5:28 pm

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
0 x

hartsantler
Greenskin
Posts: 107
Joined: Tue Nov 16, 2010 7:33 am

Re: blender exporter and muulti texturing

Post by hartsantler » Fri Sep 09, 2011 10:08 pm

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'
0 x

User avatar
amigoface
Greenskin
Posts: 132
Joined: Mon Oct 13, 2008 3:01 pm

Re: blender exporter and muulti texturing

Post by amigoface » Thu Sep 15, 2011 12:56 pm

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 ;)
0 x

hartsantler
Greenskin
Posts: 107
Joined: Tue Nov 16, 2010 7:33 am

Re: blender exporter and muulti texturing

Post by hartsantler » Thu Sep 22, 2011 3:14 pm

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.
0 x

User avatar
amigoface
Greenskin
Posts: 132
Joined: Mon Oct 13, 2008 3:01 pm

Re: blender exporter and muulti texturing

Post by amigoface » Tue Sep 27, 2011 4:40 pm

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
0 x

hartsantler
Greenskin
Posts: 107
Joined: Tue Nov 16, 2010 7:33 am

Re: blender exporter and muulti texturing

Post by hartsantler » Tue Sep 27, 2011 7:29 pm

hi amigoface, post your latest blend file and i will take a look at it.
0 x

User avatar
amigoface
Greenskin
Posts: 132
Joined: Mon Oct 13, 2008 3:01 pm

Re: blender exporter and muulti texturing

Post by amigoface » Wed Sep 28, 2011 2:07 pm

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
0 x

hartsantler
Greenskin
Posts: 107
Joined: Tue Nov 16, 2010 7:33 am

Re: blender exporter and muulti texturing

Post by hartsantler » Wed Sep 28, 2011 6:27 pm

hi amigoface, you can only use UV mapping. The other mapping options in blender like: generated, object, etc... are not supported.
0 x

User avatar
amigoface
Greenskin
Posts: 132
Joined: Mon Oct 13, 2008 3:01 pm

Re: blender exporter and muulti texturing

Post by amigoface » Thu Sep 29, 2011 9:09 am

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
0 x

hartsantler
Greenskin
Posts: 107
Joined: Tue Nov 16, 2010 7:33 am

Re: blender exporter and muulti texturing

Post by hartsantler » Thu Oct 20, 2011 2:47 pm

Hi Amigoface, here's the tutorial as promised, if you have more questions please post them here in this thread.
[youtube]3EpwEsB0_kk[/youtube]
0 x

User avatar
amigoface
Greenskin
Posts: 132
Joined: Mon Oct 13, 2008 3:01 pm

Re: blender exporter and muulti texturing

Post by amigoface » Fri Oct 28, 2011 11:34 am

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
0 x

Post Reply