Posted By: EvilSOB
I need someone to fix my code...really! [ent_buffer and normals] - 05/17/12 16:24
OK Im really having to lower myself to this, but its driving me nuts.
I STILL cant find any way to manipulate the mesh of a model and then
update their normals to be correct to the new surface...
Yes, there are multiple threads around on this, but they either
confuse me, dont suit my problem, or dont work for me.
So, below you will find a complete script showing my problem.
All you need to do to test is create or rename a model (not terrain)
to "testmodel.mdl" and run the code.
It then displays the normal of 'A' vertex during the whole manipulation process.
It should change when the normals get corrected (I understand)
but they never do...
Can a few of you guys test this (un-modified) with verious
models to see if there is some form of pattern...
BUT ... most importantly, I need someone to "fix" the broken
part of my code ... or insert the missing piece ... or whatever.
The active code in this script is pretty simple, and I would LIKE to be able
to just call ent_fixnormals, but if I need to manually calculate and
set the normals, its do-able, BUT I DONT KNOW HOW...
So somebody ... please ... make this code work, and then I
will be able to figure out HOW it works, and fix the hole
in my understanding...
Thanks muchly guys...
I STILL cant find any way to manipulate the mesh of a model and then
update their normals to be correct to the new surface...
Yes, there are multiple threads around on this, but they either
confuse me, dont suit my problem, or dont work for me.
So, below you will find a complete script showing my problem.
All you need to do to test is create or rename a model (not terrain)
to "testmodel.mdl" and run the code.
It then displays the normal of 'A' vertex during the whole manipulation process.
It should change when the normals get corrected (I understand)
but they never do...
Can a few of you guys test this (un-modified) with verious
models to see if there is some form of pattern...
BUT ... most importantly, I need someone to "fix" the broken
part of my code ... or insert the missing piece ... or whatever.
The active code in this script is pretty simple, and I would LIKE to be able
to just call ent_fixnormals, but if I need to manually calculate and
set the normals, its do-able, BUT I DONT KNOW HOW...
So somebody ... please ... make this code work, and then I
will be able to figure out HOW it works, and fix the hole
in my understanding...
Thanks muchly guys...
Click to reveal..