> @Fabrice: As always, your answers are deeply technical (Not all
> technical things you say is digestible for me,
no, that's my french accent mixed to the english :)

k, let me try explain again, the light way:)
A normalmap is nothing but the faces normal information stored into pixel 
color. (say a color definition of the surface of your model)
where x,y and z are represented in r,g and b.

When I import your model I can see its rotated 90 degrees. And its probably not 
the case into your app right?
so y up in your app is 90 degrees rotated compared to Away coordinates system.

back to normalmap generation. In your app if you generate the map, the map is 
drawn following these coordinates
but in Prefab or Away, the colors are using the specs of your model+a rotation 
due to the diff between both systems.
As a result, the normals(colors) that the material reads to calculate an angle 
to light are not pointing the same way as in your app, the builded colors are 
say " shifted"
by the same amount of rotation.

It will not affect the functionality of the dot3material, but will affect its 
rendering in terms of perception.
because where you would expect the light to be, for instance if you set it 
directly on top of your model, if you do render in Away, it will look like
if the light is coming from the left side on your model.

(Note that its probably also inverted on x axis because of its right handed 
origin... so light would come from right :))  )

I hope this makes sens to you now. If not drop your model in Prefab, render the 
normalmap and compare your map colors and Prefab's map colors.

Fabrice
PS: if you are familiar with colormatrix filter, you could also shift the 
colors to "correct" if you plan to use more of these.




On May 15, 2010, at 10:13 PM, flashangel wrote:

> Hey all,
>    Thanks for wonderful response first of all.
> 
> @David: You said the PERFECT!!!
> 
> I had commented the line:
> scene.addLight(directional);
> 
> After commenting out this line, it started appearing. It is appearing
> wrong as Fabrice indicated about. Thanks a bunch, it was an experience
> of hair-pulling before otherwise.
> 
> @Fabrice: As always, your answers are deeply technical (Not all
> technical things you say is digestible for me, still to go miles in 3D
> area though very very good at AS3). I wanted to know how you found out
> what you found out :). i.e.
> When you say "x is inverted and y is rotated 90 degrees ". I hope you
> are saying it about the RGB values for pixel in the normal map. It is
> kind of debugging technique that you know about and rest of us do not.
> Also, may be, it could also involve good deal of knowledge of 3D
> concepts (which I do not have at the moment) as well; I don't know. I
> do not know how you guys leading this engine are learning these things
> (I just want to copy that learning path :)). I am reading "Mathematics
> for 3D Game Programming and Computer Graphics, Second Edition". Please
> recommend me if I am not on the PERFECT path. I still keep wandering
> here and there not knowing about the best way to go whenever I tarting
> learning. May it be due to the fact that I have not done any 3D
> modelling course; but I almost always find myself not confident
> whenever it comes learning 3D engine things implemented n Away3D, no
> matter I find it EXTREMELY interesting. I just do not undestand where
> to start to get a proper head-start for the concept. I feel any links/
> books/points you recommend will give me and other developers like me
> proper way of learning. I do want to tell that I am good and always
> interested in learning mathematics.
> 
>    As you said about lights: I am sorry, I was not using directional
> lights. I will correct and post here again.
> 
>    Regarding generating normal maps: As you suggested, I am going to
> try generating the normal map using Prefab. I will definitely post the
> results.
> 
> 
> @Mariodesign: I translated your message in English. Translation is a
> bit funny :), but yeah it definitely gave me an idea. Thanks for your
> inputs. As read from wikipedia and few other books, I know that
> complex 3D model is used for normal map generation. It is then applied
> to the low-poly model for getting the smoother finish of using the
> normal map information generated from complex 3D mesh, as it contains
> 3 (R, G, B values corresponding to the 3 axes) values in single
> number. However, I was in confusion about how to generate the normal
> maps accurately and perfect workflow. David and Fabrice have been to
> rescue as always. Thanks to you too for inputs given.I will post my
> next results. here.
> 

Reply via email to