3 registered members (Akow, TipmyPip, tomaslolo),
788
guests, and 11
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
ent_for_block / ent_to_block ?
#327789
06/08/10 16:38
06/08/10 16:38
|
Joined: Nov 2007
Posts: 1,143 United Kingdom
DJBMASTER
OP
Serious User
|
OP
Serious User
Joined: Nov 2007
Posts: 1,143
United Kingdom
|
Hi, I was wondering if it is a sensible idea to suggest a function that can convert a block into an entity.
This would allow block deformation at runtime, for debugging purposes or to create thrid party editors.
This is probably already achievable using 'ent_getmesh' and then a range of D3D functions, but many people, including myself, probably don't have this knowledge; and this is why I think a simple function would be much easier.
I think this is a realistic idea, but i'm happy to hear why it would suck, eg hard to update lightmaps, etc.
Thanks.
|
|
|
Re: ent_for_block / ent_to_block ?
[Re: jcl]
#328854
06/15/10 16:46
06/15/10 16:46
|
Joined: Nov 2007
Posts: 1,143 United Kingdom
DJBMASTER
OP
Serious User
|
OP
Serious User
Joined: Nov 2007
Posts: 1,143
United Kingdom
|
Thanks, I think i'm pretty comfortable with the .wmb format, and can read/write most parts of it, so editing an existing block / writing a new block into a level file isn't a problem.
I'm more concerned with visually representing blocks in my level. Sure I can just use level_load and blocks come, but cannot be manipulated at runtime because as you said, this is hard.
I wanted to 'fake' this by creating entities, with the exact same properties of the blocks (or most properties), and then they can be manipulated however.
The problem is getting the mesh of the block and then setting that mesh to a new entity.
If I can't support blocks in my editor, I suppose it's not the end of the world, its just nice to complete the set.
Last edited by DJBMASTER; 06/15/10 16:48.
|
|
|
Re: ent_for_block / ent_to_block ?
[Re: DJBMASTER]
#328857
06/15/10 16:55
06/15/10 16:55
|
Joined: Apr 2005
Posts: 4,506 Germany
fogman
Expert
|
Expert
Joined: Apr 2005
Posts: 4,506
Germany
|
ent_buffers(ENTITY* ent, var num, var lod, void** ppVerts, void** ppTris, void** ppAttribs); "Returns the vertex, index, and attribute buffer of the entity mesh. The buffers can be used to read or manipulate the entity mesh on a lower level than with ent_setvertex." Further: "ent - model, terrain, or wmb entity pointer, or level_ent for level blocks." http://www.conitec.net/beta/ent_buffers.htm
no science involved
|
|
|
|