Problems converting blender2.65a to ogremesh.

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
se5a
Gnoblar
Posts: 14
Joined: Fri Oct 27, 2006 9:12 am

Problems converting blender2.65a to ogremesh.

Post by se5a » Fri Dec 28, 2012 12:46 am

exported a simple cube with a texture using blender2ogre 0.5.9
used the OgreXMLConverter command line tool to convert the xml to a mesh.
copied the files to the right places and stuck it in an mogre code similar to the tutorial.
in ogre the cube shows up, the colour of the texture, but the texture itself does not. kind of odd.

for want of a better place, here's a link to screenshots of ogre and the texture: https://plus.google.com/111909871759064 ... E1pVBHP4zL

what am I doing wrong here?
I'm not used to blender so I'm fumbling my way around it as it is, but trying to do just this really basic thing has me stumped.
0 x

User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7152
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 19

Re: Problems converting blender2.65a to ogremesh.

Post by Kojack » Fri Dec 28, 2012 6:18 am

Looks like there's no uv coordinates on the cube. That will make it stretch one of the corner pixels of the texture over the entire model.
Have a look inside the xml file to see if uv coords are included.
You should see a heap of (well, 24) something like this:

Code: Select all

<vertex>
    <position x="-50" y="-50" z="50" />
    <normal x="0" y="-1" z="0" />
    <texcoord u="1" v="1" />
</vertex>
(The texcoord line is the one you might be missing)
I'm not much of a blender user, so no idea how to fix that.
0 x

se5a
Gnoblar
Posts: 14
Joined: Fri Oct 27, 2006 9:12 am

Re: Problems converting blender2.65a to ogremesh.

Post by se5a » Fri Dec 28, 2012 10:10 am

Oh! didn't notice this get posted, with all those stickies up there.

yeah I'm missing the textcoord. so how do I get that exported correctly? I'm guessing its something in the 'ogre' settings that the blender2ogre sticks in. but which?
is it the material or the texture?
I've found the settings to get the ogrexml exporter pointed from blender2ogre and the other config things now which helps a little.
0 x

bstone
OGRE Expert User
OGRE Expert User
Posts: 1920
Joined: Sun Feb 19, 2012 9:24 pm
Location: Russia

Re: Problems converting blender2.65a to ogremesh.

Post by bstone » Fri Dec 28, 2012 12:50 pm

You have to add a UV set to your object mesh in blender. Otherwise there's nothing to export. Once it's there the exporter will pick it and you'll see it in the mesh xml output.
0 x

se5a
Gnoblar
Posts: 14
Joined: Fri Oct 27, 2006 9:12 am

Re: Problems converting blender2.65a to ogremesh.

Post by se5a » Fri Dec 28, 2012 4:00 pm

Excellent! I think I've found it, thanks guys!
0 x

se5a
Gnoblar
Posts: 14
Joined: Fri Oct 27, 2006 9:12 am

Re: Problems converting blender2.65a to ogremesh.

Post by se5a » Sun Dec 30, 2012 11:20 pm

I attempted to mess around with bump mapping. and just ended up with a darker object. didn't mess around too much there need to have another look.

what are the different passes and how do I use them effectively?

if I wanted to do the corona around the sun, (and I guess atmosphere on planets) what would be the best way to do it? I'm guessing a second larger sphere with transperency? but would that just look like a shell?
0 x

Post Reply