[Papervision3D] Update vertex-coordinates for shading
Clox
ogggan at gmail.com
Tue Sep 23 17:00:50 PDT 2008
Thanks Ralph, though it seems that doesn't help either.
Even if setting geometry.ready to true after im done with the
vertex-movement the shading still wont update.
I would like this:
var v0=new Vertex3D(0,0,0);
var v1=new Vertex3D(50,0,50);
var v2=new Vertex3D(0,50,0);
face=new Triangle3D(mesh,[v0, v1, v2]);
to have the same effect on the shading as this:
var v0=new Vertex3D(0,0,0);
var v1=new Vertex3D(50,0,0);
var v2=new Vertex3D(0,50,0);
face=new Triangle3D(mesh,[v0, v1, v2]);
v1.z=50;
Thanks for helping =)
Ralph Hauwert wrote:
>
> trianglemesh3d.geometry.ready = true;
>
> That would do the trick
>
> Ralph.
>
> On 23 sep 2008, at 22:02, Clox wrote:
>
>>
>> Thanks a lot for the reply, Steve D-7
>>
>> I didn't know normals affected the shading.
>> After moving a vertex i use face.createNormal() on the face, this
>> updates
>> the normal so it's the same as it would have been if that vertex was
>> placed
>> there initially, this still didn't update the shading though. I found
>> another normal under face.face3DInstance.faceNormal, I tried
>> updating this
>> one as well but no luck...
>> Any other ideas?
>>
>> Thanks a bunch =)
>>
>>
>> Steve D-7 wrote:
>>>
>>> Since shaders work primarily on the normal of the face, you might
>>> just
>>> have
>>> to re-calculate the normal of any connected faces of the moved
>>> vertice.
>>> There is a method that does this automatically, but I can not
>>> recall it
>>> and
>>> don't have my papervision docs handy.
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Update-vertex-coordinates-for-shading-tp19626819p19635736.html
>> Sent from the Papervision3D mailing list archive at Nabble.com.
>>
>>
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
--
View this message in context: http://www.nabble.com/Update-vertex-coordinates-for-shading-tp19626819p19639492.html
Sent from the Papervision3D mailing list archive at Nabble.com.
More information about the Papervision3D
mailing list