Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Real-Time 3D Graphics with WebGL 2
Real-Time 3D Graphics with WebGL 2

Real-Time 3D Graphics with WebGL 2: Build interactive 3D applications with JavaScript and WebGL 2 (OpenGL ES 3.0) , Second Edition

Arrow left icon
Profile Icon Farhad Ghayour Profile Icon Diego Cantor
Arrow right icon
AU$67.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.8 (12 Ratings)
Paperback Oct 2018 500 pages 2nd Edition
eBook
AU$14.99 AU$53.99
Paperback
AU$67.99
Subscription
Free Trial
Renews at AU$24.99p/m
Arrow left icon
Profile Icon Farhad Ghayour Profile Icon Diego Cantor
Arrow right icon
AU$67.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.8 (12 Ratings)
Paperback Oct 2018 500 pages 2nd Edition
eBook
AU$14.99 AU$53.99
Paperback
AU$67.99
Subscription
Free Trial
Renews at AU$24.99p/m
eBook
AU$14.99 AU$53.99
Paperback
AU$67.99
Subscription
Free Trial
Renews at AU$24.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Real-Time 3D Graphics with WebGL 2

Rendering

In the previous chapter, we covered the history of WebGL, along with its evolution. We discussed the fundamental elements in a 3D application and how to set up a WebGL context. In this chapter, we will investigate how geometric entities are defined in WebGL.

WebGL renders objects following a "divide and conquer" approach. Complex polygons are decomposed into triangles, lines, and point primitives. Then, each geometric primitive is processed in parallel by the GPU in order to create the final scene.

In this chapter, you will:

  • Understand how WebGL defines and processes geometric information
  • Discuss the relevant API methods that relate to geometry manipulation
  • Examine why and how to use JavaScript Object Notation (JSON) to define, store, and load complex geometries
  • Continue our analysis of WebGL as a state machine to describe the attributes that are relevant...

WebGL Rendering Pipeline

Although WebGL is often thought of as a comprehensive 3D API, it is, in reality, just a rasterization engine. It draws points, lines, and triangles based on the code you supply. Getting WebGL to do anything else requires you to provide code to use points, lines, and triangles to accomplish your task.

WebGL runs on the GPU on your computer. As such, you need to provide code that runs on that GPU. The code should be provided in the form of pairs of functions. Those two functions are known as the vertex shader and fragment shader, and they are each written in a very strictly-typed C/C++-like language called GLSL (GL Shader Language). Together, they are called a program.

GLSL

GLSL is an acronym for the official OpenGL Shading Language. GLSL is a C/C++-like, high-level programming language for several parts of the graphic card. With GLSL, you can code short...

Rendering in WebGL

WebGL handles geometry in a standard way, independent of the complexity and number of points that surfaces can have. There are two data types that are fundamental to represent the geometry of any 3D object: vertices and indices.

Vertices

Vertices are the points that define the corners of 3D objects. Each vertex is represented by three floating-point numbers that correspond to the x, y, and z coordinates of the vertex. Unlike its cousin, OpenGL, WebGL does not provide API methods to pass independent vertices to the rendering pipeline; therefore, all of our vertices need to be written in a JavaScript array, which can then be used to construct a WebGL vertex buffer.

...

Time for Action: Rendering a Square

Follow the given steps:

  1. Open the ch02_01_square.html file in a code editor (ideally one that supports syntax highlighting).
  1. Examine the structure of this file with the help of the following diagram:
  1. The web page contains the following:
  • The <script id="vertex-shader" type="x-shader/x-vertex"> script contains the vertex shader code.
  • The <script id="fragment-shader" type="x-shader/x-fragment"> script contains the fragment shader code. We won't pay attention to these two scripts as they will be the main point of study in the next chapter. For now, simply notice that we have a fragment shader and a vertex shader.
  • The next script on our web page, <script type="text/javascript">, contains all the JavaScript WebGL code that we will need. This script is divided into the...

Vertex Array Objects

Vertex array objects (VAOs) allow you to store all of the vertex/index binding information for a set of buffers in a single, easy to manage object. That is, the state of attributes, which buffers to use for each attribute, and how to pull data out from those buffers, is collected into a VAO. Although we can implement VAOs in WebGL 1 by using extensions, they are available by default in WebGL 2.

This is an important feature that should always be used, since it significantly reduces rendering times. When not using VAOs, all attributes data is in global WebGL state, which means that calling functions such as gl.vertexAttribPointer, gl.enableVertexAttribArray, and gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, buffer) manipulates the global state. This leads to performance loss, because before any draw call, we would need to set up all vertex attributes and set the ELEMENT_ARRAY_BUFFER...

Time for Action: Rendering a Square Using a VAO

Let's refactor a previous example using VAOs:

  1. Open up ch02_01_square.html in your editor.
  2. First, we update our global variables:
// Global variables that are set and used
// across the application
let gl,
program,
squareVAO,
squareIndexBuffer,
indices;
  1. We've replaced squareVertexBuffer with squareVAO, as we no longer need to reference the vertex buffer directly.
  1. Next, we update the initBuffers functions as follows:
// Set up the buffers for the square
function initBuffers() {
/*
V0 V3
(-0.5, 0.5, 0) (0.5, 0.5, 0)
X---------------------X
| |
| |
| (0, 0) |
| |
| |
X---------------------X
V1 V2
(-0.5, -0.5, 0) (0.5, -0.5, 0)
*/
const vertices...

Time for Action: Rendering Modes

Let's revisit the signature of the drawElements function:

gl.drawElements(mode, count, type, offset)

The first parameter determines the type of primitives that we are rendering. In the following section, we will see the different rendering modes with examples.

Follow the given steps:

  1. Open the ch02_04_rendering-modes.html file in your browser. This example follows the same structure as in the previous section.
  2. Open ch02_04_rendering-modes.html in your editor and scroll down to the initBuffers function:
function initBuffers() {
const vertices = [
-0.5, -0.5, 0,
-0.25, 0.5, 0,
0.0, -0.5, 0,
0.25, 0.5, 0,
0.5, -0.5, 0
];

indices = [0, 1, 2, 0, 2, 3, 2, 3, 4];

// Create VAO
trapezoidVAO = gl.createVertexArray();

// Bind VAO
gl.bindVertexArray(trapezoidVAO);

const trapezoidVertexBuffer = gl.createBuffer();
gl.bindBuffer...

WebGL as a State Machine: Buffer Manipulation

When dealing with buffers for the getParameter, getBufferParameter, and isBuffer functions, new information about the state of the rendering pipeline becomes available to us.

Similar to Chapter 1, Getting Started, we will use getParameter(parameter), where parameter can have the following values:

  • ARRAY_BUFFER_BINDING: Retrieves a reference to the currently-bound VBO
  • ELEMENT_ARRAY_BUFFER_BINDING: Retrieves a reference to the currently-bound IBO

We can also query the size and the usage of the currently-bound VBO and IBO using getBufferParameter(type, parameter), where type can have the following values:

  • ARRAY_BUFFER: To refer to the currently-bound VBO
  • ELEMENT_ARRAY_BUFFER: To refer to the currently-bound IBO

And parameter can have the following values:

  • BUFFER_SIZE: Returns the size of the requested buffer
  • BUFFER_USAGE: Returns...

Time for Action: Querying the State of Buffers

Follow the given steps:

  1. Open the ch02_05_state-machine.html file in your browser. You should see the following:
  1. Open ch02_05_state-machine.html in your editor and scroll down to the initBuffers method:
function initBuffers() {
const vertices = [
1.5, 0, 0,
-1.5, 1, 0,
-1.5, 0.809017, 0.587785,
-1.5, 0.309017, 0.951057,
-1.5, -0.309017, 0.951057,
-1.5, -0.809017, 0.587785,
-1.5, -1, 0,
-1.5, -0.809017, -0.587785,
-1.5, -0.309017, -0.951057,
-1.5, 0.309017, -0.951057,
-1.5, 0.809017, -0.587785
];

indices = [
0, 1, 2,
0, 2, 3,
0, 3, 4,
0, 4, 5,
0, 5, 6,
0, 6, 7,
0, 7, 8,
0, 8, 9,
0, 9, 10,
0, 10, 1
];

// Create VAO
coneVAO = gl.createVertexArray();

// Bind VAO
gl.bindVertexArray(coneVAO);

const coneVertexBuffer = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER...

Advanced Geometry-Loading Techniques

So far, we’ve rendered very simple objects. Now, let's investigate how to load a geometry (vertices and indices) from a file instead of declaring the vertices and indices every time we call initBuffers. To do this, we will make asynchronous calls to the web server using AJAX. We will retrieve the file with our geometry from the web server and then use the built-in JSON parser to convert the context of our files into JavaScript objects. In our case, these objects will be the vertices and indices arrays.

Introduction to JavaScript Object Notation (JSON)

JSON stands for JavaScript Object Notation. It is a lightweight, text-based, open format used for data interchange. JSON is commonly...

Time for Action: Encoding and Decoding JSON

Most modern web browsers support native JSON encoding and decoding. Let's examine the methods available inside this object:

Method Description
JSON.stringify(object) We use JSON.stringify to convert JavaScript objects to JSON-formatted text.
JSON.parse(string) We use JSON.parse to convert text into JavaScript objects.

Let's learn how to encode and decode with the JSON notation by creating a simple model—a 3D line. Here, we will be focusing on how we do JSON encoding and decoding. Follow the given steps:

  1. In your browser, open the interactive JavaScript console. Use the following table for assistance:
Browser Shortcut keys (PC/Mac)
Firefox Ctrl + Shift + K/Command + Alt + K
Safari Ctrl + Shift + C/Command + Alt + C
Chrome Ctrl + Shift + J/Command + Alt + J
  1. Create a JSON object by typing the following...

Time for Action: Loading a Cone with AJAX

Follow the given steps:

  1. Make sure that your web server is running and access the ch02_07_ajax-cone.html file using your web server.
Web Server Address

You know that you are using the web server if the URL in the address bar starts with localhost/ or 127.0.0.1/ instead of file://.
  1. The folder containing the code for this chapter should look like this:
  1. Click on ch02_07_ajax-cone.html.
  2. The example will load in your browser and you will see something similar to this:
  1. Please review the load functions to better understand the use of AJAX and JSON in the application.
  2. How is the global model variable used? (Check the source code.)
  3. Check what happens when you change the color in the common/models/geometries/cone.json file and reload the page.
  4. Modify the coordinates of the cone in the common/models/geometries/cone.json file and reload the...

Architecture Updates

Let's cover some useful functions that we can refactor for use in later chapters:

  1. Open common/js/utils.js in your editor to see the following changes.
  2. We have added two additional methods, autoResizeCanvas and getShader, to utils.js that look very similar to the code we implemented earlier in this chapter:
'use strict';

// A set of utility functions for /common operations across our
// application
const utils = {

// Find and return a DOM element given an ID
getCanvas(id) {
// ...
},

// Given a canvas element, return the WebGL2 context
getGLContext(canvas) {
// ...
},

// Given a canvas element, expand it to the size of the window
// and ensure that it automatically resizes as the window changes
autoResizeCanvas(canvas) {
const expandFullScreen = () => {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight...

Summary

Let’s summarize what we’ve learned in this chapter:

  • The WebGL API itself is just a rasterizer and, conceptually, is fairly simple.
  • WebGL's rendering pipeline describes how the WebGL buffers are used and passed in the form of attributes to be processed by the vertex shader. The vertex shader parallelizes vertex processing in the GPU. Vertices define the surface of the geometry that is going to be rendered. Every element on this surface is known as a fragment. These fragments are processed by the fragment shader.
  • Fragment processing also occurs in parallel in the GPU. When all fragments have been processed, the framebuffer, a two-dimensional array, contains the image that is then displayed on your screen.
  • WebGL is actually a pretty simple API. Its job is to execute two user-supplied functions, a vertex shader and fragment shader, and draw triangles, lines...
Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Create visually stunning, high-performance 3D applications for the web with WebGL 2
  • A complete course on 3D computer graphics: rendering, 3D math, lighting, cameras, and more
  • Unlock a variety of new and advanced features offered in WebGL 2

Description

As highly interactive applications have become an increasingly important part of the user experience, WebGL is a unique and cutting-edge technology that brings hardware-accelerated 3D graphics to the web. Packed with 80+ examples, this book guides readers through the landscape of real-time computer graphics using WebGL 2. Each chapter covers foundational concepts in 3D graphics programming with various implementations. Topics are always associated with exercises for a hands-on approach to learning. This book presents a clear roadmap to learning real-time 3D computer graphics with WebGL 2. Each chapter starts with a summary of the learning goals for the chapter, followed by a detailed description of each topic. The book offers example-rich, up-to-date introductions to a wide range of essential 3D computer graphics topics, including rendering, colors, textures, transformations, framebuffers, lights, surfaces, blending, geometry construction, advanced techniques, and more. With each chapter, you will "level up" your 3D graphics programming skills. This book will become your trustworthy companion in developing highly interactive 3D web applications with WebGL and JavaScript.

Who is this book for?

This book is intended for developers who are interested in building highly interactive 3D applications for the web. A basic understanding of JavaScript is necessary; no prior computer graphics or WebGL knowledge is required.

What you will learn

  • Understand the rendering pipeline provided in WebGL
  • Build and render 3D objects with WebGL
  • Develop lights using shaders, 3D math, and the physics of light reflection
  • Create a camera and use it to navigate a 3D scene
  • Use texturing, lighting, and shading techniques to render realistic 3D scenes
  • Implement object selection and interaction in a 3D scene
  • Cover advanced techniques for creating immersive and compelling scenes
  • Learn new and advanced features offered in WebGL 2
Estimated delivery fee Deliver to Australia

Economy delivery 7 - 10 business days

AU$19.95

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 31, 2018
Length: 500 pages
Edition : 2nd
Language : English
ISBN-13 : 9781788629690
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Australia

Economy delivery 7 - 10 business days

AU$19.95

Product Details

Publication date : Oct 31, 2018
Length: 500 pages
Edition : 2nd
Language : English
ISBN-13 : 9781788629690
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
AU$24.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
AU$249.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just AU$5 each
Feature tick icon Exclusive print discounts
AU$349.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just AU$5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total AU$ 215.97
OpenGL 4 Shading Language Cookbook
AU$67.99
Real-Time 3D Graphics with WebGL 2
AU$67.99
Learn Three.js
AU$79.99
Total AU$ 215.97 Stars icon
Banner background image

Table of Contents

13 Chapters
Getting Started Chevron down icon Chevron up icon
Rendering Chevron down icon Chevron up icon
Lights Chevron down icon Chevron up icon
Cameras Chevron down icon Chevron up icon
Animations Chevron down icon Chevron up icon
Colors, Depth Testing, and Alpha Blending Chevron down icon Chevron up icon
Textures Chevron down icon Chevron up icon
Picking Chevron down icon Chevron up icon
Putting It All Together Chevron down icon Chevron up icon
Advanced Techniques Chevron down icon Chevron up icon
WebGL 2 Highlights Chevron down icon Chevron up icon
Journey Ahead Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.8
(12 Ratings)
5 star 83.3%
4 star 8.3%
3 star 8.3%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Joseph Nov 12, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
A very good introduction to the world of graphics thru WebGL 2. What I like most is that each chapter is packed with hands-on examples which in my opinion is the best way to learn. This book teaches the fundamentals of 3D graphics like perspective, lighting and textures in the context of WebGL so it's great for people who are just getting started with both of those things. The "car showroom" example is a particularly awesome one!
Amazon Verified review Amazon
Amazon Customer Nov 18, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book allowed me to embrace a concept that will truley reshape the way we use the web!
Amazon Verified review Amazon
Love Amazon Nov 13, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great read and help to the animation help I needed!
Amazon Verified review Amazon
Why Nov 13, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Very informative and easy to read.I've been wanting to learn 3D graphics programming for a long time and I started here. This book is an excellent guide through the complexities. It provides a deep dive into 3D programming. My favorite aspect was the double click into building a 3D model. The author really takes a design thinking approach to learning a new skill.One thing I would change is to have more modest car choices when building the 3D model such as a Pagani.I learned, I laughed, I cried, I bled. It was a journey to remember.Couldn't get npm install to work
Amazon Verified review Amazon
Raj Feb 11, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Just as with most all tech books, there are errors, but references are provided. The major project theme is about creating an auto showroom. You will need a web server, suggestions for downloading one is provided.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela