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.03
List Price:  €85.76
You save:  €25.73
£52.33
List Price:  £74.76
You save:  £22.43
CA$98.16
List Price:  CA$140.24
You save:  CA$42.07
A$107.66
List Price:  A$153.80
You save:  A$46.14
S$90.65
List Price:  S$129.50
You save:  S$38.85
HK$543.95
List Price:  HK$777.10
You save:  HK$233.15
CHF 55.74
List Price:  CHF 79.64
You save:  CHF 23.89
NOK kr704.22
List Price:  NOK kr1,006.07
You save:  NOK kr301.85
DKK kr448.55
List Price:  DKK kr640.81
You save:  DKK kr192.26
NZ$122.29
List Price:  NZ$174.71
You save:  NZ$52.42
د.إ257.03
List Price:  د.إ367.21
You save:  د.إ110.17
৳8,550.49
List Price:  ৳12,215.51
You save:  ৳3,665.02
₹6,160.91
List Price:  ₹8,801.68
You save:  ₹2,640.76
RM295.77
List Price:  RM422.55
You save:  RM126.77
₦102,986.63
List Price:  ₦147,130.07
You save:  ₦44,143.43
₨19,873.60
List Price:  ₨28,392.08
You save:  ₨8,518.47
฿2,297.12
List Price:  ฿3,281.75
You save:  ฿984.62
₺2,931.18
List Price:  ₺4,187.58
You save:  ₺1,256.39
B$378.54
List Price:  B$540.79
You save:  B$162.25
R1,215.60
List Price:  R1,736.64
You save:  R521.04
Лв117.47
List Price:  Лв167.82
You save:  Лв50.35
₩99,507.58
List Price:  ₩142,159.78
You save:  ₩42,652.20
₪231.65
List Price:  ₪330.95
You save:  ₪99.29
₱4,067.88
List Price:  ₱5,811.51
You save:  ₱1,743.62
¥10,540.84
List Price:  ¥15,058.99
You save:  ¥4,518.15
MX$1,286.09
List Price:  MX$1,837.35
You save:  MX$551.26
QR255.89
List Price:  QR365.57
You save:  QR109.68
P940.74
List Price:  P1,343.98
You save:  P403.23
KSh9,066.95
List Price:  KSh12,953.35
You save:  KSh3,886.39
E£3,325.37
List Price:  E£4,750.73
You save:  E£1,425.36
ብር10,434.29
List Price:  ብር14,906.77
You save:  ብር4,472.48
Kz64,180.83
List Price:  Kz91,690.83
You save:  Kz27,510
CLP$67,270.75
List Price:  CLP$96,105.19
You save:  CLP$28,834.44
CN¥498.82
List Price:  CN¥712.63
You save:  CN¥213.81
RD$4,439.79
List Price:  RD$6,342.83
You save:  RD$1,903.04
DA9,071.96
List Price:  DA12,960.50
You save:  DA3,888.54
FJ$159.14
List Price:  FJ$227.36
You save:  FJ$68.21
Q537.72
List Price:  Q768.21
You save:  Q230.48
GY$14,685.01
List Price:  GY$20,979.49
You save:  GY$6,294.47
ISK kr8,527.67
List Price:  ISK kr12,182.91
You save:  ISK kr3,655.24
DH641.97
List Price:  DH917.14
You save:  DH275.17
L1,172.36
List Price:  L1,674.88
You save:  L502.51
ден3,700.23
List Price:  ден5,286.27
You save:  ден1,586.03
MOP$561.62
List Price:  MOP$802.35
You save:  MOP$240.73
N$1,224.19
List Price:  N$1,748.92
You save:  N$524.73
C$2,583.52
List Price:  C$3,690.90
You save:  C$1,107.38
रु9,887
List Price:  रु14,124.89
You save:  रु4,237.89
S/237.70
List Price:  S/339.59
You save:  S/101.88
K299.40
List Price:  K427.74
You save:  K128.33
SAR262.46
List Price:  SAR374.97
You save:  SAR112.50
ZK1,591.85
List Price:  ZK2,274.17
You save:  ZK682.32
L305.52
List Price:  L436.47
You save:  L130.95
Kč1,458.71
List Price:  Kč2,083.96
You save:  Kč625.25
Ft23,478.12
List Price:  Ft33,541.62
You save:  Ft10,063.49
SEK kr661.65
List Price:  SEK kr945.26
You save:  SEK kr283.60
ARS$98,669.88
List Price:  ARS$140,963.01
You save:  ARS$42,293.13
Bs485.11
List Price:  Bs693.05
You save:  Bs207.93
COP$269,930.97
List Price:  COP$385,632.20
You save:  COP$115,701.23
₡35,239.73
List Price:  ₡50,344.64
You save:  ₡15,104.90
L1,843.77
List Price:  L2,634.08
You save:  L790.30
₲498,216.21
List Price:  ₲711,767.95
You save:  ₲213,551.74
$U2,810.52
List Price:  $U4,015.21
You save:  $U1,204.68
zł254.83
List Price:  zł364.05
You save:  zł109.22
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.