Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1

© Wallace Jackson 2017 53
W. Jackson, Pro Java 9 Games Development, https://doi.org/10.1007/978-1-4842-0973-8_3


CHAPTER 3


Advanced 3D Content Rendering:


3D Asset Concepts and Principles


Now that you have learned about the 2D (raster and audio) content development concepts and principles
that your 2D new media open source content development software packages (GIMP, Lightworks, Audacity,
and DaVinci Resolve) are based on, we will finish up learning about new media assets by taking a look at
Inkscape (2D vector, or shapes), Blender (3D vector, or polygons), and Fusion (2D and 3D visual effects)
during this chapter. The reason we are covering Inkscape 2D in this chapter, instead of in the 2D content
chapter, is because we can use the basic concepts regarding how 2D vector graphics work as our conceptual
bridge between 2D vector graphics and 3D vector graphics. This is because 3D vectors work just like 2D
vectors do in the 2D X and Y dimensions, only in the 3D X,Y,Z dimensions. For this reason, we’ll start this
chapter by learning about Inkscape 2D vector illustration, or digital illustration, so that we can build onto
this 2D vector knowledge and then learn about more complex 3D vector graphics software packages.
I first cover the underlying concepts of vertices (points) and splines (lines or curves connecting points)
since these provide the foundation for 2D shapes or 3D geometry. This is important because this is the
foundation you will build upon whether you decide to become a 2D vector illustrator or a 3D vector modeler
(or both). Working with vertices and splines can become an entire profession, so be sure to master these first
few sections.
Next, we will get into how you turn an empty 2D shape or a 3D wireframe into something solid looking.
This is done using color fills, gradients, or pattern fills for 2D shapes (these can also be used with 3D models)
and by using texture maps for 3D geometry. Texture maps use UVW maps to position the 2D texture maps
onto the 3D geometry.
After we have covered all of those concepts that apply to both the 2D and 3D space, we can get into
things that are encountered only in 3D. These include 3D rendering, which is the process of turning
3D models, which have 3D geometry along with 2D texture maps attached with 3D UVW texture mapping
coordinates, into 3D imagery. I call 3D imagery static 3D since the 3D technology is being used to make
images that do not move and thus are static, or fixed. There’s also 3D animation, which features movement,
much like digital video does, and Interactive 3D (i3D) where programming logic is embedded inside
3D objects or scene hierarchy, which is the most advanced level of 3D.
Animation gets into a fourth dimension of time, just like digital video does, and 3D animation adds
another layer of complexity into the 3D new media asset development work process. 3D animation utilizes
keyframes just like digital video does, so all of those same concepts apply, such as frame rates; it also has
some other concepts, such as motion curves, which are supported by JavaFX and which change the rate of
acceleration and deceleration to provide realistic movement to your 3D animation, as well as your
2D animation in JavaFX, as they are separate functions.
Interactive 3D involves inserting code into an object hierarchy called a Scene Graph, which holds
the assets, as well as the code and other elements, in a hierarchical format. Scene Graphs were invented

Free download pdf