Re: Question about applying Textures with or without a Material, in Java3D.
Posted by
philjord on
Apr 14, 2017; 10:07am
URL: https://forum.jogamp.org/Question-about-applying-Textures-with-or-without-a-Material-in-Java3D-tp4037864p4037868.html
That's an interesting question, your reference to the concept of Material might be slightly different from the division of responsibility in Java3D of the various Node Component objects.
There are 2 paths to consider, the fixed pipeline or the programmable.
If you are interested in a modern programmable pipeline, then you can define a Shader that generates texture coordinates, or if you want it to be automatic then you'll need to look at Java3D 1.7
For the fixed function pipeline:
Java3D has a node called a Shape3D.
Each Shape has one Appearance, and one or more geometries.
Each geometry can must have vertex coordinate data.
Each geometry can optionally have Normals, Colors, and one or more sets of Texture Coordinates.
There are various ways that Normals and Colors are dealt with for defaults when they are not present.
If the Texture Coordinates are not set then you can give the Appearance Node a Component called a TexCoordGeneration object that let's you define how the coordinate are automatically generated.
For Java3D 1.6.0 using the fixed function pipeline there are some truely excellent tutorials on the net for example
hereThere's even some youtube tutorials appearing now if that's more you thing:
hereSo a short answer is "Yes"