4 registered members (ozgur, Ayumi, VHX, monarch),
1,161
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Multi texture blending, Vertex manipulation,UV map offset change
[Re: Juggernaut]
#399351
04/14/12 14:05
04/14/12 14:05
|
Joined: Mar 2011
Posts: 3,150 Budapest
sivan
Expert
|
Expert
Joined: Mar 2011
Posts: 3,150
Budapest
|
hi if texture blending needed for terrain: terraintex.fx (fixed function effect - alpha blending, no limit) or terraintex3.fx (shader, limited) mesh vertex manipulation: http://www.conitec.net/beta/ent_getvertex.htm by accessing D3DVERTEX
|
|
|
Re: Multi texture blending, Vertex manipulation,UV map offset change
[Re: sivan]
#399430
04/15/12 11:15
04/15/12 11:15
|
Joined: Mar 2012
Posts: 43
Juggernaut
OP
Newbie
|
OP
Newbie
Joined: Mar 2012
Posts: 43
|
Hello Sivan, Thank you for pointing me to the right shader files for texture blending in case of terrains. What about other models - do I have to use shader files in their case too ? "mesh vertex manipulation: http://www.conitec.net/beta/ent_getvertex.htm by accessing D3DVERTEX" - this thing is not currently in the A8 version, it has been incorporated in the upcoming beta. So I guess I will have to directly use DirectX 9 functions to do the vertex manipulation as you have suggested. Does anybody know about the third problem - changing the UV map off-set or co-ordinates of a 3D mesh at runtime ? Thanks,
|
|
|
Re: Multi texture blending, Vertex manipulation,UV map offset change
[Re: Juggernaut]
#399441
04/15/12 12:52
04/15/12 12:52
|
Joined: Mar 2011
Posts: 3,150 Budapest
sivan
Expert
|
Expert
Joined: Mar 2011
Posts: 3,150
Budapest
|
ent_getvertex is not beta, I use it for terrain deformation. I have no experience with it for models, but must work. someone definitely tried to apply terrain shaders for models, but don't know results... just try to search this forum. I'm also interested in the uv manipulation (it must be possible)
|
|
|
Re: Multi texture blending, Vertex manipulation,UV map offset change
[Re: Juggernaut]
#399557
04/17/12 09:23
04/17/12 09:23
|
Joined: Mar 2011
Posts: 3,150 Budapest
sivan
Expert
|
Expert
Joined: Mar 2011
Posts: 3,150
Budapest
|
hi
I just read another post, and found out that by ent_getvertex it is possible to access the D3DVERTEX pointer of any model/terrain vertex called c.v if:
CONTACT* c = ent_getvertex(entity,NULL,vertex_number);
and as described in atypes.h:
typedef struct { float x,y,z; // position in DirectX coordinates float nx,ny,nz; // normal float u1,v1; // first coordinate set, for textures float u2,v2; // second coordinate set, for shadow maps float x3,y3,z3,w3; // third coordinate set, for tangent vector and handedness #ifdef A8 float tu4,tv4; // 4th coordinate set, for additional data #endif } D3DVERTEX;
very similar to mesh deformation, but now c.v.u1 and v1 are what you need (floats!). And then ent_setvertex(entity,c,vertex_number);
|
|
|
|