Sign in to follow this  

DirectX Managed creating huge Mesh problem without using .X files

This topic is 4730 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites

This topic is 4730 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this