DirectX Managed creating huge Mesh problem without using .X files

Started by
6 comments, last by DrunkenHyena 19 years, 3 months ago
Hi all I am working with the mesh using managed DX. I want to create a huge mesh of size at leaast 1000 x 1000 vertices. But i have got a problem creating a mesh of size more then 100 x 200. I am using mesh class to create a mesh object. I have my own vertex buffer and index buffer. I do not want to use .x files. And i also want to apply picking that mesh to mark the selected triangle as a line or user selected free style shape.
Advertisement
Any particular reason why u don't want to go the .x way?
"There is no dark side of the moon." - Pink Floyd
hi
i am creating vertices and indices at run time so i a can't use .X file to load my data set. another reason is that i have 25000000 vertices in one grid to render so i can't store this data in .X file and read back to load in mesh class. so please can give detail description to create mesh class object and to use it to load vertexbuffer and indexbuffer.
thanks for reply

Neelam: your code can be failing because many reasons, one of them can be that if you're using triangle lists (vertex buffer + index buffer) and your index buffers are 16bit, that gives you an absolute limit of 65536 vertices, other limits could be memory size, like creating a vertex buffer too large to fit in (video) memory.

the best you can do is to break your model in chunks of about 10.000 vertices.

Specchum: X file format is evil, you need to learn too many things to take real profit of it, and for many people it is easier to learn the maths required to do your own file format, and you're free from a propietary file format as bonus.
Quote:Original post by vicviper
Neelam: your code can be failing because many reasons, one of them can be that if you're using triangle lists (vertex buffer + index buffer) and your index buffers are 16bit, that gives you an absolute limit of 65536 vertices,...

That'll certainly be it! 1000x1000 verts = 1000000
If you are developing a world format, this is something that you definetly want to overcome. If you are using 16-bit indices, you are limited to of 65,536 indices (remember, 16-bit = short = max of 65,536). All you have to do is change over to 32-bit indices (32-bit = int = a lot larger max).
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
thanks sir
i am happy with your suggestation , but luckly i have created mesh with following flags
vertexformat.use32bit|vertexformat.dynamic
and i have set vertexbuffer and index buffer with folowing function of mesh
Mesh.lockVertexbuffer(...)
Mesh.lockIndexbuffer (..)
and i hav displayed it by using drawsubset method og mesh class
but when i am using mesh.Intersect(...)
then it is giving wrong face index so if if you have encountered such type of problem then can you suggest me
thanks in advance

[Edited by - Neelam Sanjeev on January 5, 2005 8:38:59 AM]
Quote:Original post by circlesoft
If you are developing a world format, this is something that you definetly want to overcome. If you are using 16-bit indices, you are limited to of 65,536 indices (remember, 16-bit = short = max of 65,536). All you have to do is change over to 32-bit indices (32-bit = int = a lot larger max).


Assuming of course that 32-bit indices are supported...
Stay Casual,KenDrunken Hyena

This topic is closed to new replies.

Advertisement