Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Face Normals in Away3DLite
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  25 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Michael Iv  
View profile  
 More options May 2 2010, 5:38 pm
From: Michael Iv <explomas...@gmail.com>
Date: Mon, 3 May 2010 00:38:49 +0300
Local: Sun, May 2 2010 5:38 pm
Subject: [away3d] Face Normals in Away3DLite

Hi Guys , I was looking for Normal Face Vector in Lite and found none . I
tried to write my own . From my check It seems working ... But I would like
to get a confirmation from Math
experts here  .
I used the tuvs to create 2 vectors on the Face plane, then did cross
product . Was that right ?

Here is the code:
var face:Face=sp.faces[45];
                var v1:Vector3D=new Vector3D(face.t0,face.u0,face.v0);
                var v2:Vector3D=new Vector3D(face.t1,face.u1,face.v1);
                v1.normalize();
                v1.normalize();
                var normVect:Vector3D=new Vector3D();
                normVect=v1.crossProduct(v2);
               normVect.normalize();

Thanks.

--
Michael Ivanov ,Programmer
Neurotech Solutions Ltd.
Flex|Air |3D|Unity|
www.neurotechresearch.com
Tel:054-4962254
explomas...@gmail.com
t...@neurotech.co.il


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ken Railey  
View profile  
 More options May 2 2010, 10:24 pm
From: Ken Railey <ken.rai...@gmail.com>
Date: Sun, 2 May 2010 21:24:05 -0500
Local: Sun, May 2 2010 10:24 pm
Subject: Re: [away3d] Face Normals in Away3DLite

So using the texture coordinates is a bit of an unorthodox approach.  I
would take the cross product of two face edges and normalize that.  Beyond
that, I am not sure why to are normalizing v1 twice (or even once, just skip
it).  Also, that call to new Vector3D() when initializing normVect is
wasted, since it gets overwritten on the next line.

Also, after a quick glance at svn it seems like the Face class had a normal
at some point that is just commented out.  Maybe try using that?

http://code.google.com/p/away3d/source/browse/trunk/fp10/Away3DLite/s...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Iv  
View profile  
 More options May 3 2010, 1:33 am
From: Michael Iv <explomas...@gmail.com>
Date: Mon, 3 May 2010 08:33:04 +0300
Local: Mon, May 3 2010 1:33 am
Subject: Re: [away3d] Face Normals in Away3DLite

You are right , I just like to keep things sorted as much as possible .
Actually I thought also about Vertex Vectors , but then desired to try this
out .
v1.normalize x2 IS TYPING MISTAKE   :)
Why they commented normal?

Thanks For Help

--
Michael Ivanov ,Programmer
Neurotech Solutions Ltd.
Flex|Air |3D|Unity|
www.neurotechresearch.com
Tel:054-4962254
explomas...@gmail.com
t...@neurotech.co.il

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
savagelook  
View profile  
 More options Jun 21 2010, 11:09 am
From: savagelook <anthony.lukasav...@gmail.com>
Date: Mon, 21 Jun 2010 08:09:00 -0700 (PDT)
Subject: Re: Face Normals in Away3DLite
I would also like to know why the normals are commented out in
away3dlite, as of the latest trunk revision (2613)?  In the mean time
I'm going to use them and see if they work as expected.

On May 3, 1:33 am, Michael Iv <explomas...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
savagelook  
View profile  
 More options Jun 21 2010, 11:33 am
From: savagelook <anthony.lukasav...@gmail.com>
Date: Mon, 21 Jun 2010 08:33:26 -0700 (PDT)
Local: Mon, Jun 21 2010 11:33 am
Subject: Re: Face Normals in Away3DLite
Also, why are the vertices of faces now private with no getters or
setters?  Why were mapping coordinates used to calculate the normals
instead of the vertices like in Away3D 3.x?

On Jun 21, 11:09 am, savagelook <anthony.lukasav...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
savagelook  
View profile   Translate to Translated (View Original)
 More options Jun 21 2010, 11:56 pm
From: savagelook <anthony.lukasav...@gmail.com>
Date: Mon, 21 Jun 2010 20:56:42 -0700 (PDT)
Local: Mon, Jun 21 2010 11:56 pm
Subject: Re: Face Normals in Away3DLite
While I'm still hoping for answers to my questions, I wanted to note
that I uncommented the normals code in the faces in away3dlite and it
works well.  I also was able to use it to put basic face linking
functionality into lite.  I'll post it up on my blog soon if any is
interested.

On Jun 21, 11:33 am, savagelook <anthony.lukasav...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Iv  
View profile  
 More options Jun 22 2010, 3:10 am
From: Michael Iv <explomas...@gmail.com>
Date: Tue, 22 Jun 2010 10:10:54 +0300
Local: Tues, Jun 22 2010 3:10 am
Subject: Re: [away3d] Re: Face Normals in Away3DLite

I talked to Rob Bateman about this issue a few weeks ago in relation to
another class. He said that some properties became private in order to not
be exposed for a regular user .(Still don't understand a reason for
this).But you can still access most of these using arcane namespace.

On Tue, Jun 22, 2010 at 6:56 AM, savagelook <anthony.lukasav...@gmail.com>wrote:

--
Michael Ivanov ,Programmer
Neurotech Solutions Ltd.
Flex|Air |3D|Unity|
www.neurotechresearch.com
http://blog.alladvanced.net
http://www.meetup.com/GO3D-Games-Opensource-3D/
Tel:054-4962254
explomas...@gmail.com
t...@neurotech.co.il

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
katopz  
View profile  
 More options Jun 22 2010, 3:38 am
From: katopz <kat...@gmail.com>
Date: Tue, 22 Jun 2010 14:38:01 +0700
Local: Tues, Jun 22 2010 3:38 am
Subject: Re: [away3d] Re: Face Normals in Away3DLite

Hey guys

it's for speed reason, dot access is slower, so private _vertices is just
bypass that dot and acting like referrer, you can saw bypass like this every
where in lite libs

if you really want to access vertices you can use mesh.vertices and provide
faceIndex for each face, or mesh.faces[index]

for normal comment out there is just under development for light somehow,
it's not in my field btw

hth

On 22 June 2010 14:10, Michael Iv <explomas...@gmail.com> wrote:

--
Regards
-----------------------------------------------------------
Todsaporn Banjerdkit, katopz, http://sleepydesign.com
Away3DLite and JigLibFlash Developer Team

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
savagelook  
View profile  
 More options Jun 23 2010, 11:37 am
From: savagelook <anthony.lukasav...@gmail.com>
Date: Wed, 23 Jun 2010 08:37:42 -0700 (PDT)
Local: Wed, Jun 23 2010 11:37 am
Subject: Re: Face Normals in Away3DLite
Thanks for the insights katopz.

For anyone interested I have just got face linking (on steroids)
working in lite.  All credit goes to the original FaceLink author as
98% is just copied code from there.  The rest is just minor
computational changes using Vector3D in the absence of Number3D.  The
code I have now requires minor changes to Face.as, but I'm going to
see if I can also do it without changing the source and maintain a
good framerate.  I'll post it up once I have it all ironed out.

On Jun 22, 3:38 am, katopz <kat...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
savagelook  
View profile  
 More options Jun 24 2010, 9:00 am
From: savagelook <anthony.lukasav...@gmail.com>
Date: Thu, 24 Jun 2010 06:00:15 -0700 (PDT)
Local: Thurs, Jun 24 2010 9:00 am
Subject: Re: Face Normals in Away3DLite
http://savagelook.com/blog/away3d/away3dlite-normals-and-face-linking

normals and face linking in away3dlite.  The face linking is not a
rolled up class like FaceLink in Away3D since the modifications were
minimal.  I did make changes to Face.as to include a normal and center
at creation time, so as long as you don't deform the mesh, everything
should work.  If you do deform the mesh (like with as3mod or manually)
you would just need to recalculate the normal and center for each face
affected.

One note, katopz mentioned that you could access a face's vertices
through face.mesh.vertices, but I never got around to trying that.  By
doing that and maintaining your own vectors of face centers and
normals, you could create this face linking code without making
changes to Face.as, if you were so inclined.

On Jun 23, 11:37 am, savagelook <anthony.lukasav...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Iv  
View profile  
 More options Jun 24 2010, 9:58 am
From: Michael Iv <explomas...@gmail.com>
Date: Thu, 24 Jun 2010 16:58:18 +0300
Local: Thurs, Jun 24 2010 9:58 am
Subject: Re: [away3d] Re: Face Normals in Away3DLite

Thanks for this info :))

On Thu, Jun 24, 2010 at 4:00 PM, savagelook <anthony.lukasav...@gmail.com>wrote:

--
Michael Ivanov ,Programmer
Neurotech Solutions Ltd.
Flex|Air |3D|Unity|
www.neurotechresearch.com
http://blog.alladvanced.net
http://www.meetup.com/GO3D-Games-Opensource-3D/
Tel:054-4962254
explomas...@gmail.com
t...@neurotech.co.il

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Kapelyan  
View profile  
 More options Jun 24 2010, 10:44 am
From: Peter Kapelyan <flashn...@gmail.com>
Date: Thu, 24 Jun 2010 10:44:30 -0400
Local: Thurs, Jun 24 2010 10:44 am
Subject: Re: [away3d] Re: Face Normals in Away3DLite

Hmm it doesn't seem aligned to the face (those things should be turning too,
no?).

On Thu, Jun 24, 2010 at 9:00 AM, savagelook <anthony.lukasav...@gmail.com>wrote:

--
___________________

Actionscript 3.0 Flash 3D Graphics Engine

HTTP://AWAY3D.COM


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
savagelook  
View profile  
 More options Jun 24 2010, 12:04 pm
From: savagelook <anthony.lukasav...@gmail.com>
Date: Thu, 24 Jun 2010 09:04:16 -0700 (PDT)
Local: Thurs, Jun 24 2010 12:04 pm
Subject: Re: Face Normals in Away3DLite
Shoot, I forgot to mention I didn't do the alignment yet.  I'm gonna
make another demo soon using planes to show the alignment part.
Should look pretty neat with just the planes and an invisible source
mesh.

On Jun 24, 10:44 am, Peter Kapelyan <flashn...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
savagelook  
View profile  
 More options Jun 24 2010, 11:08 pm
From: savagelook <anthony.lukasav...@gmail.com>
Date: Thu, 24 Jun 2010 20:08:00 -0700 (PDT)
Subject: Re: Face Normals in Away3DLite
http://www.savagelook.com/demos/normals_align/sandbox.html

I started on the alignment but I had a problem.  For some reason the
planes keep rotating along the normals even after adding the lookAt()
call when I'm updating the linked planes.  Can anyone who knows 3d
math better than me explain why this is happening, its in the link
above.  Thanks, its driving me nuts and I can't figure it out.

On Jun 24, 12:04 pm, savagelook <anthony.lukasav...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shawn  
View profile  
 More options Jun 25 2010, 3:59 am
From: Shawn <sh...@moosemouse.com>
Date: Fri, 25 Jun 2010 00:59:37 -0700 (PDT)
Local: Fri, Jun 25 2010 3:59 am
Subject: Re: Face Normals in Away3DLite
I believe the problem is with the lookAt's upAxis. lookAt first points
the z axis at the target and then tries to align a local up axis with
the scene's Y_AXIS. So, as your faces move they keep adjusting to
match their up axes with the scene's Y_AXIS.

Unless you want to use parenting, the only way I know to fix this is
to use an "up object" to aim the up axis at after the lookAt has been
done. I have a test of an up object with a link to the code here:
http://moosemouse.com/up-object-test.html

I have been using this for something quite different so it may not
immediately make sense to your project. But I *think* this is one way
to fix your problem. It is late so I am calling it a night, but let me
know if you would like further clarification.

Best,
Shawn

On Jun 24, 8:08 pm, savagelook <anthony.lukasav...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
savagelook  
View profile  
 More options Jun 25 2010, 8:22 am
From: savagelook <anthony.lukasav...@gmail.com>
Date: Fri, 25 Jun 2010 05:22:26 -0700 (PDT)
Local: Fri, Jun 25 2010 8:22 am
Subject: Re: Face Normals in Away3DLite
I'm looking at your code now to see how I can apply it, but what do
you mean by "use parenting" to solve this problem?  I'm open to
anything.

On Jun 25, 3:59 am, Shawn <sh...@moosemouse.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
savagelook  
View profile  
 More options Jun 25 2010, 9:02 am
From: savagelook <anthony.lukasav...@gmail.com>
Date: Fri, 25 Jun 2010 06:02:51 -0700 (PDT)
Local: Fri, Jun 25 2010 9:02 am
Subject: Re: Face Normals in Away3DLite
Well, I think your code/math is over my head for now, but I get what
you meant by parenting.  I put the source object and the linked
objects inside an ObjectContainer3D and everything works as expected.
This should suit my needs for now.  I've got a book on 3d math I
ordered a little while ago that I haven't had time to dive into yet.
Looks like this might be the catalyst for finally reading it.

On Jun 25, 8:22 am, savagelook <anthony.lukasav...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shawn  
View profile  
 More options Jun 25 2010, 11:36 am
From: Shawn <sh...@moosemouse.com>
Date: Fri, 25 Jun 2010 08:36:52 -0700 (PDT)
Local: Fri, Jun 25 2010 11:36 am
Subject: Re: Face Normals in Away3DLite
Yes, that is how I would have done it with parenting :)

On Jun 25, 6:02 am, savagelook <anthony.lukasav...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
savagelook  
View profile  
 More options Jun 25 2010, 11:09 pm
From: savagelook <anthony.lukasav...@gmail.com>
Date: Fri, 25 Jun 2010 20:09:20 -0700 (PDT)
Local: Fri, Jun 25 2010 11:09 pm
Subject: Re: Face Normals in Away3DLite
http://savagelook.com/blog/away3d/away3dlite-face-linking-take-2

ok, there's my code using an ObjectContainer3D to keep the alignment
correct.  I'm guessing there's a way to do it with upAxis, but it's
beyond me until I do some 3d math studying.  Oh, and I left a little
something special for you peter ;)

On Jun 25, 11:36 am, Shawn <sh...@moosemouse.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
katopz  
View profile  
 More options Jun 25 2010, 11:32 pm
From: katopz <kat...@gmail.com>
Date: Sat, 26 Jun 2010 10:32:35 +0700
Local: Fri, Jun 25 2010 11:32 pm
Subject: Re: [away3d] Re: Face Normals in Away3DLite

Hey guys

ObjectContainer3D approach is easy, but  it will slow thing down a bit,
if you seek for better speed, you can try apply matrix transforms directly
to it vertices (like freeze transforms prev mail)
just like ObjectContainer3D did this automatically while render loop
get rid of ObjectContainer3D will reduce look up time obviously

you can learn this approach via Sprite3D, credit by mr. incredible Rob :)

fyi : it's a bit complex, try it only if you want to learn, need more fps or
more headache ;)

hth

On 26 June 2010 10:09, savagelook <anthony.lukasav...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Kapelyan  
View profile  
 More options Jun 26 2010, 9:52 am
From: Peter Kapelyan <flashn...@gmail.com>
Date: Sat, 26 Jun 2010 09:52:17 -0400
Local: Sat, Jun 26 2010 9:52 am
Subject: Re: [away3d] Re: Face Normals in Away3DLite

Hmmm,

I don't know if to take that as a compliment or if thems fightin' words :O

J/k But, here comes the rain again.

A (the?) correct Facelink should work on animated models as well like in
this demo:
http://www.closier.nl/playground/facelink/facelink2.html

However, I don't think Fabrices code works right 100% of the time. When a
certain face in an animation faces a certain way (opposite? etc), the link
seems to rotate the object the wrong way.This may be one of the hardest
things to get right, since it's pretty hard to test.

The coolest thing about this feature to me is the ability to attached a gun
or backpack on a moving model for a game. You can then have tons of separate
models made that just magically "stick" to where they are supposed to be.
And there is the problem, it seems more like magic than something that is
possible :O

I have seen this feature in other 3d engines, not sure, but I think I
usually saw it as attach to vertice, not face.

Anyways I wanted to congratulate you for getting stuff to work so far, it
looks like it could be really handy!

-Peter "Party" Pooper :P

On Fri, Jun 25, 2010 at 11:09 PM, savagelook
<anthony.lukasav...@gmail.com>wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fabrice3D  
View profile  
 More options Jun 26 2010, 3:15 pm
From: Fabrice3D <fabric...@gmail.com>
Date: Sat, 26 Jun 2010 21:15:15 +0200
Local: Sat, Jun 26 2010 3:15 pm
Subject: Re: [away3d] Re: Face Normals in Away3DLite

thats why the offset is made for, you can pass a negative offset as well,
but this also means that in certain cases the object would look like if its inverted.

> When a certain face in an animation faces a certain way (opposite? etc), the link seems to rotate the object the wrong way.

Problem here is more of a visual perception kind than a math one I think.

> This may be one of the hardest things to get right, since it's pretty hard to test.

actually, it remembers me I started wrote a "face" explorer just for this purpose a while ago for Prefab for a personal project, but never finsihed it.
may be I will as it seems the class is being used fairly often.

> The coolest thing about this feature to me is the ability to attached a gun or backpack on a moving model for a game.

I've seen already pretty creative uses of it, but yes, tmp attached items such as guns while keeping independant object behavior were
the reasons why I wrote it in the first place :)

Fabrice

On Jun 26, 2010, at 3:52 PM, Peter Kapelyan wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shawn  
View profile  
 More options Jun 27 2010, 3:39 am
From: Shawn <sh...@moosemouse.com>
Date: Sun, 27 Jun 2010 00:39:01 -0700 (PDT)
Local: Sun, Jun 27 2010 3:39 am
Subject: Re: Face Normals in Away3DLite
I am probably opening myself up for my own Clark Griswold moment, but
I took a shot at the FaceLinking in away3dlite. I tweaked the
FaceLink.as from away3D the best I know how to get it to work with
away3Dlite. I am not an expert programmer, but I *think* it works...

Here is a test swf and some links to faceLinkTest.as and my tweaked
for lite FaceLink.as :
http://moosemouse.com/face-link-test.html

Shawn

P.S. - I don't really know the protocols for tweaking someone else's
code, so if I have done something uncool please let me know.

On Jun 26, 12:15 pm, Fabrice3D <fabric...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
savagelook  
View profile  
 More options Jun 27 2010, 1:51 pm
From: savagelook <anthony.lukasav...@gmail.com>
Date: Sun, 27 Jun 2010 10:51:56 -0700 (PDT)
Local: Sun, Jun 27 2010 1:51 pm
Subject: Re: Face Normals in Away3DLite
Oy, I'm out of my element here!  Thanks guys for the patience and
guidance.  My notes are just the ramblings of a programmer not
particularly proficient in 3d programming or 3d math, just one thats
finds it all very cool.

On Jun 27, 3:39 am, Shawn <sh...@moosemouse.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fabrice3D  
View profile  
 More options Jun 27 2010, 3:15 pm
From: Fabrice3D <fabric...@gmail.com>
Date: Sun, 27 Jun 2010 21:15:40 +0200
Local: Sun, Jun 27 2010 3:15 pm
Subject: Re: [away3d] Re: Face Normals in Away3DLite
Since you do share, I do not see anything uncool here :)

Fabrice

On Jun 27, 2010, at 9:39 AM, Shawn wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »