New 3D commands

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

New 3D commands

Post by Polo »

Can we please have those so that basic mesh operations are supported through PB procedures?

MeshVertexTextureCoordinate(u, v, texcoordset = 0) => add the ability to use multiple texture coordinates
Result = AddMaterialLayer(#Material, TextureID [, Mode], texcoordset = 0)

:)
Last edited by Polo on Sun Sep 30, 2012 2:02 pm, edited 1 time in total.
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: New 3D commands

Post by DarkDragon »

There's already AddMaterialLayer = the second command you're wishing. Materials don't have anything to do with texture coordinates, only textures are in relationship with them.
bye,
Daniel
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: New 3D commands

Post by Polo »

DarkDragon wrote:There's already AddMaterialLayer = the second command you're wishing. Materials don't have anything to do with texture coordinates, only textures are in relationship with them.
Nope - I ask for a way to set up a material so I can choose which texture coordinate sets it uses. It's not a matter of adding multiple material to a specific surface.
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: New 3D commands

Post by DarkDragon »

Polo wrote:
DarkDragon wrote:There's already AddMaterialLayer = the second command you're wishing. Materials don't have anything to do with texture coordinates, only textures are in relationship with them.
Nope - I ask for a way to set up a material so I can choose which texture coordinate sets it uses. It's not a matter of adding multiple material to a specific surface.
AddMaterialLayer adds a specific texture to an existing material. So you want texture 1 to be the regular one and texture 2 the lightmap for example. AddMaterialLayer does exactly this (the order of the calls matters). So the only difference between your version and the AddMaterialLayer is the parameter for the texture coordinate set. So you should change your request to "Add an optional parameter to AddMaterialLayer to specify the texture coordinate set" instead of "Create a fully new function for the same procedure just with one parameter different".
bye,
Daniel
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: New 3D commands

Post by Polo »

DarkDragon wrote:Nope - I ask for a way to set up a material so I can choose which texture coordinate sets it uses. It's not a matter of adding multiple material to a specific surface.
AddMaterialLayer adds a specific texture to an existing material. So you want texture 1 to be the regular one and texture 2 the lightmap for example. AddMaterialLayer does exactly this (the order of the calls matters). So the only difference between your version and the AddMaterialLayer is the parameter for the texture coordinate set. So you should change your request to "Add an optional parameter to AddMaterialLayer to specify the texture coordinate set" instead of "Create a fully new function for the same procedure just with one parameter different".[/quote]
Sure ;)
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Re: New 3D commands

Post by Comtois »

Polo wrote:Can we please have those so that basic mesh operations are supported through PB procedures?

MeshVertexTextureCoordinate(u, v, texcoordset = 0) => add the ability to use multiple texture coordinates

:)
you have to call MeshVertexTextureCoordinate(u, v) multiple times between AddMeshVertex(x, y, z) calls to add multiple texture coordinates to a vertex.

Ogre increment 'texcoordset' each time you call MeshVertexTextureCoordinate(u, v).

And each time you call AddMeshVertex() Ogre initializes texcoordset to zero.
Please correct my english
http://purebasic.developpez.com/
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: New 3D commands

Post by Polo »

Comtois wrote:
Polo wrote:Can we please have those so that basic mesh operations are supported through PB procedures?

MeshVertexTextureCoordinate(u, v, texcoordset = 0) => add the ability to use multiple texture coordinates

:)
you have to call MeshVertexTextureCoordinate(u, v) multiple times between AddMeshVertex(x, y, z) calls to add multiple texture coordinates to a vertex.

Ogre increment 'texcoordset' each time you call MeshVertexTextureCoordinate(u, v).

And each time you call AddMeshVertex() Ogre initializes texcoordset to zero.
Right then can this be added on the docs? :)

The request for material still stands :)
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: New 3D commands

Post by Polo »

Thanks to Fred for adding this! I'll try it out when I can :)
Post Reply