I am using a DirectionalLight3D to illuminate you Moon sphere, here it
is with the default white light colour applied:
http://groups.google.com/group/away3d-dev/web/Capture_White.jpg
If I change the .color of the directional light (in this case I have
set it to 0xFF00D0 - which is a bright purple/magenta colour) then two
unexpected things happen. Firstly the shadow is no longer rendered
correctly, and secondly the colour applied seems to be the inverse of
light source?
Here is the render with the only change being the light source color
set to 0xFF00D0:
http://groups.google.com/group/away3d-dev/web/Capture_Shaded.jpg
The relevant bits of code are:
sun = new DirectionalLight3D({color:0xFFFFFF,brightness:1.2,ambient:
0.1,diffuse:0.9,specular:0});
var moonMaterial:Dot3BitmapMaterialF10 = new Dot3BitmapMaterialF10
(Cast.bitmap(moonMap0),Cast.bitmap(normalMap));
moonMaterial.shininess = 0;
moonMaterial.specular = 0;
Anything obvious I am doing wrong?
Thanks
Mark
Regards
Mark
Mark
I've combined several tutorials :) I'll strip my code down to the
minimum and post it in the files section along with the images etc.
It may be tomorrow before I can do this though - kids have taken over
my main PC (which has Flash CS4 installed on it) to play games!
Mark
> rob.bate...@gmail.comwww.infiniteturtles.co.ukwww.away3d.com- Hide quoted text -
>
> - Show quoted text -
I have put a zip file in the Files section:
http://groups.google.com/group/away3d-dev/web/simple_Moon3D.zip
In Moon3D.as...
Lines 114,115 change the light source.
I have stripped out all my extrenous code for tweening and external
interfaces etc.
Hopefully this gives you enough to go on - either a bug or error on my
part.
I took some of the code (and Asteroid normal map) from here:
http://blog.tartiflop.com/tag/normal-mapping/
Many thanks
Mark
> > rob.bate...@gmail.comwww.infiniteturtles.co.ukwww.away3d.com-Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
Many thanks if you can afford the time.
Mark
> > > rob.bate...@gmail.comwww.infiniteturtles.co.ukwww.away3d.com-Hidequoted text -
I did notice that there seem to be some debug messages when the movie
runs now, I don't know if they are related to your code change:
_szx 1
_szy 0
_szz -3.4450524030726903e-16
Cheers
Mark
On Feb 3, 10:39 am, Rob Bateman <rob.bate...@gmail.com> wrote:
> Hey Mark
>
I spoke too soon, though the light source colour problem has been
resolved, a new fault seems to have been introduced.
The Ambient light shadow no longer lines up with the direct light
shadow - for some angles, not all.
Take a look at the attached image, it is looking down on the pole of
my Moon sphere, the ambient light is set to zero, but you can see a
wedge between the true shadow edge (from direct light) and where the
deep ambient (black in this case) shadow starts. As I say this does
not happen for all angles of rotation of the light source around the
sphere, so I suspect it is a quadrant thing for a trig function
somewhere.
http://groups.google.com/group/away3d-dev/web/misaligned_ambient.jpg
Apologies for the low contrast image, I'm playing around trying to
stop burn out in the high-lights whilst retaining some definition up
the shadow.
Regards
Mark
> rob.bate...@gmail.comwww.infiniteturtles.co.ukwww.away3d.com
I couldn't reporduce this on another computer, until I noticed that I
only get the effect if I change the Dot3 material properties:
MoonMaterial.specular = 0.2; //0.2 or greater to get the effect.
Regards
Mark
On Feb 7, 5:58 pm, MarkC <m...@wilmslowastro.com> wrote:
> One more image...http://groups.google.com/group/away3d-dev/web/misaligned_ambient2.jpg
> > > rob.bate...@gmail.comwww.infiniteturtles.co.ukwww.away3d.com- Hide quoted text -