|
|
Re: ent_fixnormals / moved bones
[Re: jcl]
#387118
11/14/11 14:48
11/14/11 14:48
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
This is possible, but you must do it manually. Thanks for your fast comments  Can you give me some hints how to achieve that? I did'nt tried that before. I would like to try that.
|
|
|
Re: ent_fixnormals / moved bones
[Re: jcl]
#387120
11/14/11 15:00
11/14/11 15:00
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
|
|
|
Re: ent_fixnormals / moved bones
[Re: HeelX]
#387278
11/16/11 14:00
11/16/11 14:00
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
OK...
So if we do our own vertex deformations, and need to re-calculate all the normals, HOW do we re-calculate them?
Can you give me any hints or google-search terminology I can use to figure out how?
(I could have sworn I saw a formula in this thread before, but it seems to have vanished)
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: ent_fixnormals / moved bones
[Re: EvilSOB]
#387386
11/17/11 20:38
11/17/11 20:38
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
Serious User
|
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
why do we have to recalculate the whole thing anyway? o.O
I thought for rendering, the transformed face is used, but in this case an old position is used. Can someone enlight me o.o
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: ent_fixnormals / moved bones
[Re: jcl]
#387572
11/20/11 21:56
11/20/11 21:56
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
Call ent_getvertex, and then modify all the normals of the D3DVERTEX* list that you got. This should directly affect the normals. Hi, I tried this snippet, which should generate for all vertices a "rotating" normal, but it is all grey, all the time, from all sides:
int i;
for (i = 0; i < ent_status(e, 0); i++)
{
CONTACT c;
ent_getvertex(e, &c, i);
VECTOR n;
vec_set(&n, vector(1,0,0));
vec_rotate(&n, vector(time_step * 4, 0, 0));
vec_set((c.v)->nx, &n);
}
Other than this, can't you add a parameter or so to ent_fixnormals that enforces normal calculation on the current mesh (however it was transformed by the user)?
Last edited by HeelX; 11/20/11 21:57.
|
|
|
|