Paged Geometry stupidness

PrdglSqrl

04-12-2007 00:29:06

I'm attempting to set up forests in my app, and having some issues.

I want to replicate a Fern mesh I made across my landscape. Now, the following code runs just fine, but I can't see any ferns.


app.trees = forests.PagedGeometry()

app.trees.setCamera(app.camera)
app.trees.setBounds( ogre.FloatRect(0, 0, 1500, 1500) )
app.trees.setPageSize(513)
app.trees.addDetailLevelBatchPage(500)
app.trees.addDetailLevelImpostorPage(1000, 50)

app.treeLoader = forests.TreeLoader3D(app.trees, ogre.FloatRect(0, 0, 500, 500))
app.trees.setPageLoader(app.treeLoader)
ent = app.sceneManager.createEntity("Fern", "Fern.mesh")

app.treeLoader.addTree(ent, ogre.Vector3(0, 0, 2), ogre.Degree(0), 50)
app.treeLoader.addTree(ent, ogre.Vector3(4, 0, 123), ogre.Degree(0), 50)
app.treeLoader.addTree(ent, ogre.Vector3(8, 0, 4), ogre.Degree(0), 50)
app.treeLoader.addTree(ent, ogre.Vector3(20, 0, 4), ogre.Degree(0), 50)


I compared this code very closely to what's in the forests demo, and could see nothing wrong. I've also tested the mesh to make sure it's good, and it is.

Oh! I am updating, too.

Any ideas why I can't see the meshes?

bharling

04-12-2007 09:49:13

Are you exporting your mesh from blender ? I found a bug with the exporter as I was making the forest demo - blender meshes are exported rotated on the wrong axis, most of my trees were pointing either sideways or straight down, thus you couldn't see them.

Its pretty easy to fix with meshmagick (just google it)

PrdglSqrl

04-12-2007 18:49:40

Well, you were right about the mesh being screwed up, so I fixed it. But that can't be it, because I tried several different meshes that weren't messed up at all.

So I'm still not getting any results.

Does the type of SceneManager that's being used matter at all?

[edit]
I also changed the cull hardware option in the material for the mesh to none so that I could see no matter what angle I was facing, and got nothing.
[/edit]