Loading the Environment

Create a 3D RPG Game with THREE.js Moving Around Your Environment
2 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$69.99
List Price:  $99.99
You save:  $30
€60.14
List Price:  €85.91
You save:  €25.77
£52.23
List Price:  £74.62
You save:  £22.38
CA$96.41
List Price:  CA$137.73
You save:  CA$41.32
A$107.49
List Price:  A$153.57
You save:  A$46.07
S$90.17
List Price:  S$128.82
You save:  S$38.65
HK$546.29
List Price:  HK$780.45
You save:  HK$234.16
CHF 56.34
List Price:  CHF 80.49
You save:  CHF 24.15
NOK kr700.29
List Price:  NOK kr1,000.46
You save:  NOK kr300.16
DKK kr448.84
List Price:  DKK kr641.23
You save:  DKK kr192.38
NZ$119.50
List Price:  NZ$170.72
You save:  NZ$51.22
د.إ257.03
List Price:  د.إ367.21
You save:  د.إ110.17
৳8,522.14
List Price:  ৳12,175.01
You save:  ৳3,652.86
₹6,168.91
List Price:  ₹8,813.10
You save:  ₹2,644.19
RM296.26
List Price:  RM423.25
You save:  RM126.99
₦107,242.87
List Price:  ₦153,210.67
You save:  ₦45,967.80
₨19,867.39
List Price:  ₨28,383.20
You save:  ₨8,515.81
฿2,267.25
List Price:  ฿3,239.07
You save:  ฿971.82
₺2,880.29
List Price:  ₺4,114.87
You save:  ₺1,234.58
B$381.10
List Price:  B$544.45
You save:  B$163.35
R1,240.41
List Price:  R1,772.09
You save:  R531.68
Лв117.26
List Price:  Лв167.53
You save:  Лв50.26
₩97,608.87
List Price:  ₩139,447.22
You save:  ₩41,838.34
₪237.34
List Price:  ₪339.07
You save:  ₪101.73
₱4,022.50
List Price:  ₱5,746.67
You save:  ₱1,724.17
¥10,397.98
List Price:  ¥14,854.89
You save:  ¥4,456.91
MX$1,313.09
List Price:  MX$1,875.93
You save:  MX$562.83
QR255.58
List Price:  QR365.13
You save:  QR109.55
P1,005.53
List Price:  P1,436.54
You save:  P431
KSh9,042.70
List Price:  KSh12,918.70
You save:  KSh3,876
E£3,394.48
List Price:  E£4,849.46
You save:  E£1,454.98
ብር9,944.21
List Price:  ብር14,206.62
You save:  ብር4,262.41
Kz63,827.73
List Price:  Kz91,186.39
You save:  Kz27,358.65
CLP$67,762.91
List Price:  CLP$96,808.31
You save:  CLP$29,045.40
CN¥499.08
List Price:  CN¥713
You save:  CN¥213.92
RD$4,404.27
List Price:  RD$6,292.09
You save:  RD$1,887.81
DA9,088.91
List Price:  DA12,984.71
You save:  DA3,895.80
FJ$158.31
List Price:  FJ$226.17
You save:  FJ$67.86
Q537.17
List Price:  Q767.42
You save:  Q230.25
GY$14,656.15
List Price:  GY$20,938.25
You save:  GY$6,282.10
ISK kr8,635.36
List Price:  ISK kr12,336.76
You save:  ISK kr3,701.40
DH630.06
List Price:  DH900.12
You save:  DH270.06
L1,163.30
List Price:  L1,661.93
You save:  L498.63
ден3,679.94
List Price:  ден5,257.29
You save:  ден1,577.34
MOP$562.85
List Price:  MOP$804.11
You save:  MOP$241.25
N$1,231.84
List Price:  N$1,759.85
You save:  N$528
C$2,579.16
List Price:  C$3,684.68
You save:  C$1,105.51
रु9,886.26
List Price:  रु14,123.84
You save:  रु4,237.57
S/247.52
List Price:  S/353.62
You save:  S/106.09
K296.72
List Price:  K423.91
You save:  K127.18
SAR262.62
List Price:  SAR375.19
You save:  SAR112.56
ZK1,655.81
List Price:  ZK2,365.54
You save:  ZK709.73
L305.47
List Price:  L436.41
You save:  L130.93
Kč1,472.13
List Price:  Kč2,103.13
You save:  Kč631
Ft23,825.45
List Price:  Ft34,037.82
You save:  Ft10,212.36
SEK kr661.74
List Price:  SEK kr945.38
You save:  SEK kr283.64
ARS$96,357.49
List Price:  ARS$137,659.46
You save:  ARS$41,301.96
Bs484.25
List Price:  Bs691.82
You save:  Bs207.56
COP$283,145.81
List Price:  COP$404,511.35
You save:  COP$121,365.54
₡35,431.55
List Price:  ₡50,618.68
You save:  ₡15,187.12
L1,834.90
List Price:  L2,621.40
You save:  L786.50
₲506,210.65
List Price:  ₲723,189.07
You save:  ₲216,978.42
$U2,800.60
List Price:  $U4,001.03
You save:  $U1,200.43
zł256.61
List Price:  zł366.60
You save:  zł109.99
Already have an account? Log In

Transcript

In this video, we're going to load the actual environment we're going to use in the game. We now have a if you look at version three folder, and the game dot j s, there is now a load environment method. And that's loaded in the FBX. exe file environment dot SPX. The first thing we do in that is allow it to receive shadows. scale it down slightly 2.81 would be exactly the size that it was created out.

Give it a name and we iterate through all the children of the of the FBX. exe file is a mash and includes the name main. And we set cache shadow receive shadows to true inclusive Name proxy, which we'll come to in the next video, then we set each material to be invisible material dot visible equals false. When we do that, we get that and I'm sure you can spot a problem. Namely, our character is walking through our set. Now we could create a ray caster based on the geometry of the environment.

The problem is, there's an awful lot of polygons in there. And so the ray caster has to ultimately find every single one of those polygons to check whether or not it's in the direction of the ray There is a way out of that. And in the next video we're going to look at how we resolve that problem.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.