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 »

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.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Problems converting blender2.65a to ogremesh.

Post by Kojack »

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.
se5a
Gnoblar
Posts: 14
Joined: Fri Oct 27, 2006 9:12 am

Re: Problems converting blender2.65a to ogremesh.

Post by se5a »

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.
bstone
OGRE Expert User
OGRE Expert User
Posts: 1920
Joined: Sun Feb 19, 2012 9:24 pm
Location: Russia
x 201

Re: Problems converting blender2.65a to ogremesh.

Post by bstone »

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.
se5a
Gnoblar
Posts: 14
Joined: Fri Oct 27, 2006 9:12 am

Re: Problems converting blender2.65a to ogremesh.

Post by se5a »

Excellent! I think I've found it, thanks guys!
se5a
Gnoblar
Posts: 14
Joined: Fri Oct 27, 2006 9:12 am

Re: Problems converting blender2.65a to ogremesh.

Post by se5a »

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?
Post Reply