[Implemented] make Submeshes available in PB OGRE and ...

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Hoessi666
User
User
Posts: 24
Joined: Fri Feb 05, 2010 6:44 pm

[Implemented] make Submeshes available in PB OGRE and ...

Post by Hoessi666 »

...enable different Light-Ranges.

If you want to use one Mesh (Created with SetMEshData) as a Level, you´ll need different Textures on the Mesh (some Floors, some Ceilings and some Walls).

In PB-OGRE it is not possible to put different Textures on one Mesh (if you use u-/v-coordinates in the Mesh to use different parts of one Texture, you cannot "tile" them (don´t know, if thats the right expression?!) and even if it would work, the MainTexture could be very big in the end (and therefore not functional with the GraphicsCard)...)

OGRE has the possibility to use SubMeshes to build a Mesh from different parts that can be textured etc. in different ways, but they are not accessible in PB...( http://www.ogre3d.org/docs/api/html/cla ... bMesh.html). It seems to be the same technique that uses Blitz3D under the name "Surfaces".

Additionally, I haven´t seen a command that defines the Range of a Light.... :(
User avatar
J. Baker
Addict
Addict
Posts: 2181
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: 3D - make Submeshes available in PB OGRE and ...

Post by J. Baker »

Hoessi666 wrote:In PB-OGRE it is not possible to put different Textures on one Mesh (if you use u-/v-coordinates in the Mesh to use different parts of one Texture, you cannot "tile" them (don´t know, if thats the right expression?!) and even if it would work, the MainTexture could be very big in the end (and therefore not functional with the GraphicsCard)...)
I not sure exactly what you are trying to explain but I do know that you can use multiple textures for a single mesh in PB/OGRE. Such as, one texture for the arms, one for the head, and so forth.
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef


Even the vine knows it surroundings but the man with eyes does not.
Hoessi666
User
User
Posts: 24
Joined: Fri Feb 05, 2010 6:44 pm

Re: 3D - make Submeshes available in PB OGRE and ...

Post by Hoessi666 »

You mean the Robot-Model, right?
Hoessi666 wrote:if you use u-/v-coordinates in the Mesh to use different parts of one Texture, you cannot "tile" them (don´t know, if thats the right expression?!) and even if it would work, the MainTexture could be very big in the end (and therefore not functional with the GraphicsCard)...)
I think it is done as decribed above: One TExture, an different parts of this texture are used via uv-coordinates to put these different parts of the Texture on different parts of the mesh).
But imagine: What would you do, if you build a whole Level and hav maybe dozens of big Textures...Put them all in one? I don´t know if GfX-Cards can handle such a big Texture...? And additionally, you wouldn´t be able to tile them on a wall for e.g.: Maybe you have a Texturepart that fits for "Height 1". If you have a Wall with "Height 2", you usually want the Texture tiled, in this case it should be put two times on the bigger wall.
If you use the uv-Coords, you cannot tile, the Texture-part ist stretched to the bigger size. Or am I getting this wrong? in B3D it works like that...

So if you could load all the different Textures separately (Floor1, Floor2, Wall1, Ceiling 2,...) and put them on the Different parts of the Mesh, like texturing a single Mesh it would be nice! B3D uses "Surfaces" for that, OGre has SubMeshes which have the same Function (you could call it individual Mesh-Parts or something like that), but they are not accessible via PB...

Using a single Mesh for each different Texture in a Level would result in many Meshes/Entities which would result in a slower speed of the game!
User avatar
J. Baker
Addict
Addict
Posts: 2181
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: 3D - make Submeshes available in PB OGRE and ...

Post by J. Baker »

The terrain can have a texture of 4096x4096 along with a detail texture that does tile. Then, of course, your objects would have their own textures. So you could actually make a pretty detailed game. But the more detail the slower the game. That's when you start thinking what needs to be used to keep at an optimized speed.

I like to think, if it can run on a netbook (1.6ghz processor, 1gb memory) then you have a nice optimized game that would be available mostly for everyone. ;)
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef


Even the vine knows it surroundings but the man with eyes does not.
Hoessi666
User
User
Posts: 24
Joined: Fri Feb 05, 2010 6:44 pm

Re: 3D - make Submeshes available in PB OGRE and ...

Post by Hoessi666 »

J. Baker wrote:The terrain can have a texture of 4096x4096 along with a detail texture that does tile. Then, of course, your objects would have their own textures. So you could actually make a pretty detailed game. But the more detail the slower the game. That's when you start thinking what needs to be used to keep at an optimized speed.

I like to think, if it can run on a netbook (1.6ghz processor, 1gb memory) then you have a nice optimized game that would be available mostly for everyone. ;)
And what about indoor levels like in Quake? And waht about more complex objects on terrain?
No, I think the problem goes deeper into the implementation of OGRE in PB...
But thanks anyway...
Post Reply