|
3 registered members (Quad, AndrewAMD, TipmyPip),
5,117
guests, and 4
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Merge 2 Meshes/Entities during game...
[Re: Benni003]
#400664
05/05/12 19:16
05/05/12 19:16
|
Joined: Mar 2012
Posts: 927 cyberspace
Wjbender
User
|
User
Joined: Mar 2012
Posts: 927
cyberspace
|
look into ent_buffers , ent_vertices. ent_buffers wil give you access to the
triangles buffers (indices into vertices array ,3 vertices forms a triangle) and the vertices buffers (an array of vectors-positions of vertices)
it will also return the amount of triangles in the triangle buffer and ent_vertices if its a model will return you the amount of vertices
so you could also use ent_getmesh and ent_setmesh which deals with d3dmesh/buffers of your target meshes
if they are animated im not sure how that would be handled ,maby a parent and child relationship (in model terms)
i guess theres more than one way to handle it(merging them) depending on your situation but a start would be to look into those functions theres also ent_status which would give you valuable information if you need it..
if perhaps you could be more specific in details as to what you want to achieve apart from merging meshes ,like are they animated or not etc etc
Compulsive compiler
|
|
|
Re: Merge 2 Meshes/Entities during game...
[Re: Benni003]
#400686
05/06/12 09:51
05/06/12 09:51
|
Joined: Mar 2012
Posts: 927 cyberspace
Wjbender
User
|
User
Joined: Mar 2012
Posts: 927
cyberspace
|
i will see when i have time if i could perhaps code a function to help you with this and then post the code up here if i succeed
Compulsive compiler
|
|
|
Re: Merge 2 Meshes/Entities during game...
[Re: Benni003]
#400750
05/07/12 09:36
05/07/12 09:36
|
Joined: Mar 2012
Posts: 927 cyberspace
Wjbender
User
|
User
Joined: Mar 2012
Posts: 927
cyberspace
|
this is as far as i can help you out demo note : this demo does not take entity rotation into account it uses the rotation of the models file, and i dont know if the uv's are correct i didnt test on textured models and also you will have to do the materials i think but anyway i cant help any further than this... Oh yes i forgot you have to take position in concideration and offset vertices positions acordingly same for scale if i am not mistaken
Last edited by Wjbender; 05/07/12 10:01.
Compulsive compiler
|
|
|
|