Hi, i wonder if there is something in this discussion
that might be related to the reason why when applying
a texture appearance to a sphere while running directx
install I am able to see lighting effects, however
with opengl I don't see the lights.

I saw that the discussion reffered to

new TexCoordGeneration ()

whereas my implementation, as follows maybe the newbie
approach, thoughts appreciated :)

Material material = new Material( white , white ,
white , white , shiny );
        material.setLightingEnable( true );

Appearance app = new Appearance() ;
app.setMaterial( material ) ;

Texture2D tex = (Texture2D) new TextureLoader(
image_url, component ).getTexture();
        tex.setMagFilter( Texture.FASTEST );
app.setTexture( tex );
TextureAttributes texAttr = new TextureAttributes();
        texAttr.setTextureMode( TextureAttributes.MODULATE );
app.setTextureAttributes( texAttr );
int numSegments = 20;
Sphere sphere = new Sphere( radius,
                                                Sphere.ENABLE_GEOMETRY_PICKING |
Sphere.GENERATE_NORMALS |
                                                Sphere.GENERATE_TEXTURE_COORDS, 
numSegments, app
);

Greg.





--- Alessandro Borges <[EMAIL PROTECTED]>
wrote:
> Thanks Kelvin!
>
> I will update my code ;-)
>
> > It should use,
> >
> >    genNormalMap = new
> TexCoordGeneration(texGenMode,
> >     TexCoordGeneration.TEXTURE_COORDINATE_3);
>
> Maybe a reminder in the TextureCubeMap docs help
> newbies ;-)
>
> Alessandro
>
> ----- Original Message -----
> From: "Kelvin Chung" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, January 13, 2003 9:14 PM
> Subject: Re: [JAVA3D] CubeMapTexture issues
>
>
> > Hi Alessandro,
> >
> >      There is a bug in your cubemap example,
> >
> > It should use,
> >
> >    genNormalMap = new
> TexCoordGeneration(texGenMode,
> >     TexCoordGeneration.TEXTURE_COORDINATE_3);
> >
> > instead of
> >
> >    genNormalMap = new
> TexCoordGeneration(texGenMode,
> >     TexCoordGeneration.TEXTURE_COORDINATE_2);
> >
> > for Reflection map.
> >
> > Besides, there is no need to add
> >     Sphere.GENERATE_TEXTURE_COORDS
> > flag in Sphere (optional)
> >
> > After that OpenGL version works fine.
> >
> > DirectX version works before probably the driver
> fix it
> > internally in hardware mode. But if you use
> >
> > java -Dj3d.d3device=reference RunJ3DemoCubeMap
> >
> > (assume DirectX SDK install) the result is same as
> OGL
> > version with texture coordinate mess up before the
> fix.
> >
> > The good news is that you will not see an extra
> garbage line
> > under OGL version. We're still looking at why the
> line
> > appear under DirectX version.
> >
> > Note that due to bug 4801176 -
> >
> >  Sphere Texture map reverse when
> GENERATE_NORMALS_INWARD is used
> >
> > you will see texture map differently under v1.3.1
> beta1 which is fixed
> > in the next beta2 release.
> >
> > Thanks.
> >
> > - Kelvin
> > -----------------
> > Java 3D Team
> > Sun Microsystems Inc.
> >
> >
> >
> > Alessandro borges wrote:
> >
> > >Hi, Kelvin.
> > >
> > >Below is the link to a page about my experiences
> with
> > >cube map texturing.
> > > I could not run in OpenGL, but runs fine in
> DirectX,
> > >but DirectX gives a strange line in the botton of
> the
> > >textures (?).
> > >
> > >But it is a amazing feature ! very impressive and
> not
> > >so hard to build.
> > >
> >
>
>http://www.cpm2002.hpg.ig.com.br/alessandro/cubemap/index.html
> > >
> > >Alessandro
>
>
_______________________________________________________________________
> Busca Yahoo!
> O melhor lugar para encontrar tudo o que voc�
> procura na Internet
> http://br.busca.yahoo.com/
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED]
> and include in the body
> of the message "signoff JAVA3D-INTEREST".  For
> general help, send email to
> [EMAIL PROTECTED] and include in the body of the
> message "help".


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to