Mesh Names or Mesh Subset Names 
Author Message
 Mesh Names or Mesh Subset Names

Hi

In DirectX 8 for VB it was rather easy to grab the names
of each mesh (mesh subset).

Is there an easy way to get the names in Direct X 9?

The names of each mesh are very important for me.  I let
the user change colors in each model.  The models are
created by another company and could change.  With DX 8 I
had each mesh name coded to let the app know it could
change the mesh (subset) color.  The custom color would be
picked by the end user.

Anyway, it's killing me that this isn't a property for
each mesh subset...  

Can anyone help?

:)

Thanks



Sat, 09 Jul 2005 10:59:49 GMT  
 Mesh Names or Mesh Subset Names

What is the DX8 property you are referring to ? I don't remember a name on
each subset on DX8 (or do you mean the texture name ?)



Quote:

> Hi

> In DirectX 8 for VB it was rather easy to grab the names
> of each mesh (mesh subset).

> Is there an easy way to get the names in Direct X 9?

> The names of each mesh are very important for me.  I let
> the user change colors in each model.  The models are
> created by another company and could change.  With DX 8 I
> had each mesh name coded to let the app know it could
> change the mesh (subset) color.  The custom color would be
> picked by the end user.

> Anyway, it's killing me that this isn't a property for
> each mesh subset...

> Can anyone help?

> :)

> Thanks



Sat, 09 Jul 2005 17:43:29 GMT  
 Mesh Names or Mesh Subset Names

Hi...

Ok, I'll try to explain, correct me if I'm wrong.

DirectX 8 utilities loaded an x file by reading in each
mesh subset as separate objects.  It created its own
hierarchy of Mesh / Mesh subsets in the Frame Class.  The
frame class in DX 8 in my eyes is very close to the Mesh
class in DX 9.  

Now, in DX 8 each Frame Class had a collection of Mesh
Classes in it.  (Mesh classes being the Mesh / Mesh
subsets)

Each mesh class (Mesh Subset in dx9) contained a Name
Property "ObjectName"

Here is an example of me looking at the mesh (subset)
names for colors:

For idx = 0 To meshCount - 1

    tmpStr = Me.GetChildMesh(idx).m_Name

    If (tmpStr.Substring(2, 3) = "ELE") Then

        numColors = CInt(tmpStr.Substring(0, 2))
        If numColors > maxColors Then
            maxColors = numColors
            matMesh = idx
        End If
    End If

Next

Quote:
>-----Original Message-----
>What is the DX8 property you are referring to ? I don't
remember a name on
>each subset on DX8 (or do you mean the texture name ?)




>> Hi

>> In DirectX 8 for VB it was rather easy to grab the names
>> of each mesh (mesh subset).

>> Is there an easy way to get the names in Direct X 9?

>> The names of each mesh are very important for me.  I let
>> the user change colors in each model.  The models are
>> created by another company and could change.  With DX 8
I
>> had each mesh name coded to let the app know it could
>> change the mesh (subset) color.  The custom color would
be
>> picked by the end user.

>> Anyway, it's killing me that this isn't a property for
>> each mesh subset...

>> Can anyone help?

>> :)

>> Thanks

>.



Sun, 10 Jul 2005 05:15:27 GMT  
 Mesh Names or Mesh Subset Names

P.S.

It's not the texture name.

:)

Quote:
>-----Original Message-----
>What is the DX8 property you are referring to ? I don't
remember a name on
>each subset on DX8 (or do you mean the texture name ?)




>> Hi

>> In DirectX 8 for VB it was rather easy to grab the names
>> of each mesh (mesh subset).

>> Is there an easy way to get the names in Direct X 9?

>> The names of each mesh are very important for me.  I let
>> the user change colors in each model.  The models are
>> created by another company and could change.  With DX 8
I
>> had each mesh name coded to let the app know it could
>> change the mesh (subset) color.  The custom color would
be
>> picked by the end user.

>> Anyway, it's killing me that this isn't a property for
>> each mesh subset...

>> Can anyone help?

>> :)

>> Thanks

>.



Sun, 10 Jul 2005 05:16:52 GMT  
 Mesh Names or Mesh Subset Names
The Frame class in DirectX 8 was AFAIK provided as source code (not really
part of DX) in the "common" folder. You could probably easily check where
this name came from.

In DX9, Mesh.LoadHierarchyFromFile could be the closest thing. I've seen
frame names (and by checking the doc, I see a Name property part of the
MeshContainer class). But it doesn't go down to a "subset" (for me this is a
part of the underlying vertex buffer that is drawn using the DrawSubset
method).



Hi...

Ok, I'll try to explain, correct me if I'm wrong.

DirectX 8 utilities loaded an x file by reading in each
mesh subset as separate objects.  It created its own
hierarchy of Mesh / Mesh subsets in the Frame Class.  The
frame class in DX 8 in my eyes is very close to the Mesh
class in DX 9.

Now, in DX 8 each Frame Class had a collection of Mesh
Classes in it.  (Mesh classes being the Mesh / Mesh
subsets)

Each mesh class (Mesh Subset in dx9) contained a Name
Property "ObjectName"

Here is an example of me looking at the mesh (subset)
names for colors:

For idx = 0 To meshCount - 1

    tmpStr = Me.GetChildMesh(idx).m_Name

    If (tmpStr.Substring(2, 3) = "ELE") Then

        numColors = CInt(tmpStr.Substring(0, 2))
        If numColors > maxColors Then
            maxColors = numColors
            matMesh = idx
        End If
    End If

Next

Quote:
>-----Original Message-----
>What is the DX8 property you are referring to ? I don't
remember a name on
>each subset on DX8 (or do you mean the texture name ?)




>> Hi

>> In DirectX 8 for VB it was rather easy to grab the names
>> of each mesh (mesh subset).

>> Is there an easy way to get the names in Direct X 9?

>> The names of each mesh are very important for me.  I let
>> the user change colors in each model.  The models are
>> created by another company and could change.  With DX 8
I
>> had each mesh name coded to let the app know it could
>> change the mesh (subset) color.  The custom color would
be
>> picked by the end user.

>> Anyway, it's killing me that this isn't a property for
>> each mesh subset...

>> Can anyone help?

>> :)

>> Thanks

>.



Sun, 10 Jul 2005 17:04:25 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Mesh Picking, Boned Animation, Faked Meshes

2. Progressive meshes / Simplifying meshes

3. Mesh generation

4. Shaded Mesh over VB5 forms?

5. How to get the W component from a Mesh

6. Rotate A Mesh : Precudure

7. Transform Vector or Mesh(Not addressed here)

8. resizing mesh's Vertex buffer

9. Moving mesh?

10. Create mesh DX9 question, Lighting.VB example

11. Does anyone have a cooridnate display mesh?

12. Skin mesh/renderskins problem, geforce?

 

 
Powered by phpBB® Forum Software