cyl today we are talking
abouts II Unity's camera system
are before I get into that I would like to again bring this up
if you have any questions or comments or concerns or just want to say hi
are you can reach us all arm via Twitter
on at unity3d at Unity Mike
guide which is me had will goldstone on
and at the and ranch are you can reach us all
and halal conversation arm whatever
are you can also reach us on Facebook on and through the Unity 3d dot com website
in and all sorts a different thing wrong Google+ in
social media everywhere okay cell
that being said we are talking today
abounds armed camps okay
and the seam Micah a fairly basic thing right
every scenes were has one I know really thinks about it
arm but there's a lot we can do with cameras
in unity in furthermore their is some really crazy a fax
than a lot of people don't know can be achieved with the Unity camera system
and so we're going to look at its summer these things today and I know a lot of
people are seen you know
man we want advanced who invest and and trust me it's common so if you're
you're one of the many many people have been commented we want marvin's videos
arm their common and we've just poured onto but
arm more than likely now lovers you in today didn't know all this stuff about
cameras so
even though this might be quote unquote a beginner video I assure you I'm
I'm sure a lot of cool stuff and you're likely to pick up
something no down yep
ok cell on cameras are in unity
are treated very much like cameras real-life actually someone in chat made
a joke about
will they need their DSLR their phone camera whenever on
Ian's realistically the way we treat cameras in unity
our perspective cameras it is very much like arm
how those cameras function okay im is we can achieve a lot of
similar affects arm with
the you became a system that we can weekend she was a mother on
like real-life cameras and something that we're gonna look at those arm
so basically every scene in unity has to have a camera
without a camera we can see me think the camera represents
our eyes it's the viewers eyes into the world
arm and as a matter fact every time we create new seem like I've done here
created a new scene
arm every scene starts with the camera and silly thing in the scene is just a
camera
I and using a camera with sorrow bill our world rain
in the first few times you make a game you my town
leave the camera right where it's at are
and is billed the whole world around it never touch the camera right but we can
move the camera just like any other game object we can move it we can rooted on
those things
on be when I click on the camera are
what we can seize began see the projection lines on the camera
anything that exists within this projection right
are will be seen everything that exists outside have projection will not be /c
alright and you can see it starts at the Cameron you can see
work an answer this big projection camera are
and so yet so this camera will
we can't use in model in turn in one not manipulate just like any other game
object
arent arm in just remember always did no matter how technical
cameras get they're still basically just are viewing the world
how however we want that to be represented however whatever affects our
shooters and they were applied that
it's just how we're going to see the game and in a rematch to have
now the camera itself
is just a component okay a so I talked before about how
everything is basically game object in new stack component on top
so that being said knowing that the camera is just a component means I can
put the camera on anything
rain are I can create a queue re: if our sick over here
art critic you I could put the camera component on top with this cute are if
for whatever reason everyone to armed so the camera components can not keep can
be on any
as matter fact let me know misguided
talking amount honors huge
can remember the Rio surrendering
arm so with the queue selected I went to mom components
rendering camera and now my Q
while being cue also is a camera
army and you can't see anything obviously arm
this camera concede cuban this camera can see inning arm
clear so we can put a camera on pre much
anything okay army careers
now ours the camera starts in the game
are stars in the scene and it came at you might create by going to game object
criança
other camera as more than just the camera component
and also has these three items right here the first is the gooey layer
then we will flare layer and then Rd listener
the gooey layer is what was wrong the graphical user interface if we have one
by unchecking this it won't see any ongoing
are commands Mancini on doing stuff that we create
on the floor earlier so we can see lens flares Iran
arm if we have those are lights but an awful lot see those
and then the audio listener now the on the listener is a a special
component there can only be one in the sea
alright arm for for each play resumes with that
two separate up but there there can only be one because
just like you have only one sitting years arm there can only be one way for
all
on all audio to be calculated
rain arm so on like multiple cameras which we can layer minge
point two different things are you doesn't work that way night so
we don't have one on the listener I if we have multiple cameras
only one of those cameras can be the R you listenin so no just keep in mind if
you get a warning this is warning there too
a user's machine you can have one oMG what it means the year two cameras just
need unchecked and
on on one only one others can have that component checker
braddock on it at all we're going to get a warning the whole game still work with
your ideas can be funky
arm basically just makes you have one
r8 arm so yes so again
cameras just points and camera object itself
as a few more components them than just the camera component
now before we start talking about all the different
pieces are of the camera itself i wanna talk a little about space
okay arm and so I'm sure
a lot of us are familiar with 2d versus 3d rant the two-dimensional space
XYZ former am sorry just X&Y format
just within hides no depth arm 10
2d games game started to de-rail just without that third dimension
and obviously 3d space and dizzy at the dimensions
that so a couple new spaces were gonna talk about
as they pertain to cameras okay so we still have
the world are star the world space
and the world space is your XYZ coordinates
it's how objects move around it is your cord insist natural world space
and whether using a 3d or 2d game rail whether you make it a 3-2 game
you still have this world space which is how the objects exist
inside your game that being said
we also have something that is called East green spaces now have a little
sheeple infographic here that I created now hopefully they'll pop up there on
the screen
but basically we have this idea of screen space
in screen space is how the world pertains to your monitor
right to whatever your TV if the console gamer or whatever
your viewing device arite is is represented in this
ours %uh screen space so you can see in the rectangle at the top there we have
screens base
and it was screen see space it's a 2d space with an ex white component
and the upper left hand corner is the origin
re: we call this of four of fourth-quarter or fourth quadrant
cartesian system are but basically the upper left hand corner
is 00 and the lower right-hand corners whatever the resolution of your screen
is
so I have 1280 by 1024 now which is an example if your runnin at like 1600 900
or 1920 by 1080 or whatever those would be the numbers are there
alright arm so based on what are your screen size
bad is your screens bees so
you know if I wanted to be. brighten the dead center of the screen
I would be my screen space at
oh man I should have started saying that because now I have to do math 640
by are with 5 2006 for a fight or should be
halfway threw it at 1280 by 1024 screen
on yeah so that you put your in the center effect him out wrongdoing economy
are I'm sorry I'm leaving right amerasian
but that's our screen space so we can through team for that night
then we have some called viewports bees in viewports peace
is useful for how we combine our cameras together
and Newport is a normalized screen
and what that means is that you won't go from Mike 0 280
you go from 0 to 1 you don't you know with high
it's also as you want so the upper left hand corner 00
your lower right hand corner is just 11 our gate no matter how big your screen
is or how small your screen is
or how to attain killer or squarish or whatever
its always your wants and normalize screen alright
2.5 always be halfway through
a viewport space right so I wanted the dead center
viewport I would czr .5 .5
that's the dead center no matter what okay and will talk about where these are
useful
arm but i just want to be aware those on
so that when we get in there was at work in you'll be able to launch kinda hit
the ground running
you will have to go through the stuff that ok
so that's our viewport NR are our screen space a little
John tomorrow are world space so now let's talk
about the properties in the camera okay
and I on I have mercy which is my camera here
and we're gonna be opening up another scene here soon the device can own
a more idea of stuff arm
as one factor which is open it now time this basically
and medicine I have the terrain
from last time om
here reir this train from last time without although the environmental
effects we don't have a leaking we don't have the treatment that
but I wanted something to be a little bit more visual so that we can get kind
of an idea I'll
of different perspectives and things like that so wanna do is I'm going to
cream atop a camera because in this scene
and we only had the first person controller we didn't have a main camp
so on another game object create other camera and I'll obviously deleted the
first person to which is why it's not there
on which gives me this camera here in a min ago and rotated
so we face our train and was moving around here be
so we have mercy
mice we'll time art so we have a camera we can see
our screen here and nothing by the way if you click on the camera no doubt
hilary
you can see what the camera sees you don't necessarily have to go over the
game mode
to see with the camera seeing night scene is clicked seen in there it is
I'm okay so let's go through some
are these these properties up the camera components the very first thing we have
yours is clear flags
re: and a clear fleiss can often confusing people
so let's talk about what this does arent right now clear flag is set to Sky box
is always at the skybox by default
and what that means is anything the camera doesn't see
so if I was are on all Rainier projected lighter just pretend beam from this
camera
and in our as flying out here and I was gone overall the mountains
ray on the space that's here this blue re: then
isn't hitting anything right that those razor or however it
it finds the scene are it's not colliding with any
game object is to climb with the trainers fear cube raining like that so
I just kept going off into nowhere
rate so if he doesn't he anything
would we put their right if there's nothing to see what goes there well
with this flag with the skybox flag are if we have a Skyblock
a skybox are that was drawn alright that's how we know where to draw the sky
but we don't hit
basically is like down the camera hey if you don't see anything put the skybox
Iran on and so that's where Starbucks is now we don't have a skylight in the
scene by
if we did we'd see it on the next option a solid color
and as the say hey I don't wanna see the sky locks I wanna see some songs color
and by the way if you don't have a skybox the silent killer gets
chosen as your backup and you can see here we have this blue but I can change
that
and I can make that any color I want arm
it just so happens to be blues the default not like that blew the default
because
bed is Candice cash rate to the 34 arm
we also have depth only which means if the jurors
the raid doesn't hit me thing me if we don't before I hit a mountain Mercure
anything like that the just don't draw
anything army now that's not a good setting if you only have one camera
basically if you only have one cam you seen stay away from that is leaving on
Sat Oct rent I'll talk about
when we will use that we won't use that right now
okay and the final on is don't clear
and don't clear is again something you pretty much what should just never use
I'm what don't clear basically says
is that every of frame when the scene is drawn
right the next frame don't delete what was there before
alright so busy what happens is the camera will render
something the disease and the next frame who will delete
everything it's all and render something new my aunt with don't clear it doesn't
delete what it saw so if I remove an object left to right
you would see that object every single frame
stay so you get the streak going rate in a meeting with us or streak in
in blending and then it gets all weird arm the only reason that
option existing bees because you can use that to achieve some the fax
on you can use it was special I shooters and things like that arm
you shouldn't use it unless you absolutely no using it for
alright not one of those things that you can just accidentally find use for you
have to have a use intended
ross is not going to work oMG so the next thing is background
and again I showed you back as the background color that my didn't see
anything that would seize
we have this thing called calling mask
Inc on Mascus how you can turn things on in of
alright so viruses unchecked or just click on
nothing I the camera won't see anything and if I click everything the camel see
everything
arm we can get very specific with this and we're going to a little bit later
we're gonna get kind of granular with it and really kind of
do some neat stuff with the calling mask are
we have our projection and we have two types we have perspective
an orthographic and perspective is a 3d viewing mode
a good orthographic you can see down here are what happens
are the rule flattens out we'll talk more about or the graphic later on when
I get into that right now
but we have this orthographic and whoever feared
feel the view in a few love you basically determines how wider than
angle orléans hats
are the lens in our camera if you know anything about photography you might
understand some stuff about
are focal length and feel love you in lenses and cameras
are if you don't I'm gonna show you I don't spend a lot of time on right now
but I'll show you
can only affect that has I
next year the clipping planes and the clipping planes clipping is basically
how close or how far away something has to be before you can't see it anymore
are before it's not rendered on before Eclipse
severe seaman someone clicked into a wall in a video game music as a course
the long as not being drawn ur
where they were they went into the wall are winners those are clipping planes
and so are showing here on you can take a look down here spinifex
I could Michael here it is arm if I increase my
near clipping plane you see things there now
close to me are drawn right so I can make its only
far away things are drawn arm
Bollywood the default point 03
yep SoCal sinner now the of our plane is the exact opposite
it determines how far away some an object is before /strong
so all on this could take a while to me squeak in hand
100 30 so you can see we can determine how far when object is before
is isn't stopping drugs I'll Nanda that is
only 48 point seven units away
will no longer be drawn alright this is great for your arm
%uh low performance our computers right so if you make it a game that starting
device doesn't have a lot of power
right you don't wanna be drawn things that are 1000 units away
I is gonna really hard time doing that seem I wanna bring you're clipping plane
to be closer right you don't want to be that far away with it
re: cell arm
my mom
ok sub are okay so let me bring this plane back without
so as 100 the area are
so that could be in place with the controls the near far clipping
arm basically however
you know you wanna you wanna go about that
alright now are real quick because a break I'm not seen
any true anyone talking in chat you might be just be all captivated by my
voice but it does promise
chant I'd like to know so if if anyone now would mind it on chat the chance
still working
otherwise I'm going to assume that there may be something broke with that
okay 10 is working a rule which is adequately captivated
fantastic are that's right ear okay fantasy
3 everyone is cap captivated great
um appreciate it cell arm
our last between not great okays so we talked with the new year for clipping
planes
are fantastic arm so we ever near Park the complaint alleges basic controls
again what's shown and what's not so with its used for performance
okay alright so then we have this
normalized viewport racked in basic moves so we control the viewport
we're not gonna talk about this ray yet will talk about this later we start
doing things like split screening in picture in picture
but for now are we're gonna leave this completely lem
on then we have our depth on as matter fact this camera came in with the depth
0
to remain camera will come in with the depth -1 summer pretend that this is the
main camera the scene
even though I deleted my original main camera arm we can pretend this one was
there is a main camera there's no difference it's not on the same staff
but there is a main camera comes in with the couple arm
presets the that this one is not because it's not the regime in camera
and one of those is that it has a depth -1
death will cover more on in-depth
are here soon but basically death allows us to control what order the camera
surrender to the screen
so using depth we can arm
we can layer cameras and how to each other and that's how we achieve some
things like split screening picture in picture
are custom GUI is things like that
we have thus rendering path arm and the rendering path basically is
is how we do a rendering I'm not gonna get into the settings because
gave the relieve arm more in-depth than you
will need right now and be because I don't really know more well i generally
just leave it to player settings
if I ever need to change it a change wanted the players innings and forget
about it sell
it's not anything I can really walk you through in great depth because
sliding a really good use our target texture
is actually really really awesome this year is so cool
I hope we have time to cover today on molasses or talk about is how we're
going to use its architecture
arm it to pro only features that's why I put it towards the end
but if we have time I'm sure some cool stuff basically
right now the camera renders to the screen but we can't ellen's the running
to screen to render to texture
and we could put a Textron something so within the camera sees
will be projected on that object Nuggets really cool we could do things like
Jumbotron screens and we can do things like %uh predator style transparency
like from the movie predator where he goes on transparent
re we could do that game objects that sweet we can actually
do some really cool stuff with that an actor that's the reason pro water
arm looks much better than basic water is because pro water can use render
rendering textures render textures so that the camera can
can project the sky on water that's asshole cheese that fact and that's why
to prolong the thinkers
are this this target textures approval only thing but
was the Associa and then we have HDR hyper dynamic range
arm basically again another photography term though it might also exist in film
and on
I'm with me with the from photography which basically allows us to
arm %uh change exposures and have now
images come out really bold in strong and things like that
are it all works for the very specific camera set up very specific texture
types
on as a matter fact by clicking on him to get a warning that won't work
and cozy HDR multi sample and aliasing for return path is not supported
this camera won't will render without HDR offers as he went and leasing and
poisons we want to use HDR
arm so basically you have the respect to x set up to use that I'm a clear message
are in so that's what it is but we're not really gonna get in how to use it
because it just doesn't to
on it's not something that we can use often
I've never used it arm became used to great effect
arm if if you know a lot about 3d
projections and some that which I do not sell I generally just skip it
9 so we have all these
are now properties are all the camera in Mosul amor are pretty
arm pretty specific free basic right
so let's look at a couple that you'll find more useful arm then not
into the first is this what we're looking at is religion a projection
re: because this is something the it's one of two ways:
in you can use it a ton alright art so let me get here EQ
came on to create a cue take a cue
and the cheese put it see what my camera and
he pees want the best possible is to to get 5633
87 there you go and we'll put this one ants
56 83 now
36-33 5633
now was eighty seven's will put one eighty aren't so we should be seen that
Q
pre-screen on national me spring look closer
okay to have accused RM and huge creep
Mexican or lower cue down a little bit so we see something kinda
akin to that so what we have now is we have the 60
for our field of view our own arm
what they basically me that user default and you can see we come to the game
on this again we see you can see the perspex Shin right
arm projection perspective sorry about that we can see the lines can
angle inward like it would look in real life rain
arm if you've ever done any photography you know that you could have things
called wide-angle lenses
whining landslide see more of the world at one time
the problem with wide-angle lenses is the cause a lot of distortion
to close object in the make the background really really really small
alright so if I would come back here my scene take the same camera
take my field if you go arm go real wide with it
real wide okay are by dragging it to the rate increase in my field view
I'm bring my camera for a little bit
and now we can take a look n so all we've actually
got closer everything we've moved our camera closer to all the stuff and i've
seen
you look up for a way it looks right and look at how
warped are our QB's okay so
we can achieve these wide angle lens affected to create really wonky graphics
we want to do projects seem like really far away and also the
review the clothes really fast and things like that so we can use
are field if you do that now arm this distorts greatly
wonder if even at the basic sixty to distort
I want even less distorted the net on what I can do
is byee decreasing my field of view I'm effectively
on decreasing my angle right
and then bring my stuff way back
now having a decreased fuel you does the exact opposite
not only does it reduce distortion significantly
right you'll notice how on the perspective lines
are not nearly as steep and not nearly as deep as before
but they also make the background looks huge it does we call
flattened out the picture right it brings the background way up close to
the 100 doesn't look as deep
alright to compare the two re: not dev
Sewanee rainy and nothing in my scene is moving
I'm just moving my field review alright are
in so we can create these
really cool affects this way its it's all about what you need
rain arm supersede to know what you need
and we're over whatever also suitor purposes but
sixty is the default re: and you can kind of
salt to taste from there by basically ap
on six ish people and you can sue presume with it or you can give me for
what
and that's nothing to you now drama Mitchell on here
is dance by changing on my field of view I'm affectively
able to zoom in and out without moving anything nothing is
getting closer can further away but I can zoom in
right will go close I can see that texture
right magnets you because like having a zoom lens
RI or a zoom out Kenny on nothing is able to move
nothing is moving but I'm still able to do all this really neat stuff so
options that exist okay so
that's my perspective camera so if thats perspective
let's talk a little bit about graphic and I'm just gonna
bring these include so that's a perspective camera on issues with a
graphic now
now orthographic he is a camera that is
treated as being infinitely far away so you remember perspective
here I had a really narrow pale Park Fieldview
and my lines start to look very arm parallel
I mean they're still not parallel they still kind of cone out
rain arm but the they're they're starting to get closer and closer
arm two parallel well an orthographic camera
is treated and left it is so far away
those lines are in fact parallel ready
kinda like a a directional light or thus on since so much light
took birth in parallel lines really parallel to the so close to being
parallel
on the you can't even tell on
a question now from lolol NIS which is a
a great name by the way are it this is horizontal field of view
was both horizontal and vertical field a few treats them all the same
on not sure if you can do one without the other I'm sure they would cause
quite a distortion now I so
it is just all feel love you not necessarily oMG just wars are to feel
you
but ok so I've come back here now chosen orthographic camera with the size 100
100 being the default a complete game this is what I see
are there is no there's no distortion literally no distortion everything is
flat
right because the lines at the camera are treated as being completely parallel
right is like having perspective camera that is so very far away
on you might be like all this is way too far away let me make a bigger
but wait a minute it's not getting bigger is it
the only thing you're seen on here is my field review I is
is mine you're clipping planes could be some stuff up by Tom
site getting any bigger is it it's not because we ignore
the z-axis rate everything is worth and where everything is as per law
so we don't have are moving things into now
rain com is relevant much changing
so how we do this to me is we change the size and the power lines
arm so by bringing this number down because he was zooming in
alright and so already here's where we can see the cube
arkin that we can see again the background is really close to the
foreground
arm because
arms RSR our comment about the walking dead: a comment that we had a spammer
but someone just talking about again Jim happened south
either present with a spammer like comment arm
okay so yeah basically
the flattens out miss the background really big and
with really close the foreground generally with an orthographic camera
are we we make 2d games so there is no background and foreground
did death it matters because we're not dealing with that at all
everything is flat right or the graph cams a great for them
are if this was supposed to be using some from a projection it would be not
very good because it just
how flatten closer with looks and if you
on months here me split the software
hoops that's what
so this is our camera or camera seeing notice how if I move the cuban all
no change none whatsoever matter fact my movie even into the mountain
over the mountain is big enough back you move into yep perfect
who work with the screen arm on it just disappears
when it comes to the mom but that's it not the only factor has
I are in that's because of got camera does not care about depth
only one is right on top of the other me
Open Mic you back here 30
ok in the me brings back in ok it's that's our orthographic am and will
resume in
is by on which also go negative with it by the way
nature size foot to rethink I'm not seen you want to do that but she certainly
did
anyway so there's a hundred that's how we can assume an hour the size there
and again we use that for for 2d games Nokia
me come back to prospective diesel or the graphic confuses me
aren't back in perspective fantastic
so yes we have these types a projection and we can kind of
now down messed around our mess around with that stuff
re:
so not so long ago better camera and we can do some mike is a minute winner
the best with the cool things my opinion
is the ability to use multiple cameras multiple cameras allow us to do
all sources on different stuff right
so let's consider this 1 I'm gonna do is are nutritionally seem to Nasik
I'm gonna move this camera come to the side
just like this so we can see this cuz oversight
and I can create a new camera but it's gonna Qimonda Creed other and the camera
woman to do instead is a mystery click on the camera I already have come to
duplicate that
so we have a new camera and this one option to drag over here
alright we have camera one and camera to
fantastic now want to do is on a run the scene
and for long for sovereignty one thing it all yup
Argosy there are 2 r.d listeners in the scene please ensure that there is always
a good everyone on the list
so that's kinda what I I mentioned before in there's that message
so was in line the other is arm
and another interesting thing that we see is that we
only see one camera rainy I'm if you think about it
we had to cameras want to show the block on the right
the ocean sure the block and left how are we run it we only see the block on
the left
are any are in so the question let me with idealism
the question becomes why why did we see one versus the other
and has to do with order and death so we have two cameras
okay in the two cameras are identical I just duplicated one in moved it so
all their properties and everything about them is exactly the same
at including this depth this death right here's -1
the same depth a main camera has and with a depth does the controls one
order the cameras are drawn right
so we started -1 in the week good as your other one and two in a way up
so what is effectively happening is since this was the first camera in this
scene
at death -1 it's drawn first in this
is actually drawn to the screen with this camera can see
is drawn okayed it it actually is drawn
and then this camera is drawn
because it's also at depth in a good one and it's the second camera on that debt
on the scene
the problem then is that
I'll this cameras complete the overriding
everything about this camera alright is like if you paint a picture on a piece
of paper
wait for the paint to dry and then paint another picture the first one goes away
doesn't it because the second one
was paid on top amp I and so that's the perfect to do we have here
is we have the second cameras being painted on top in the first camera
and so we no longer see the second the or I'm sorry
the the same cameras paint and have the first games we no longer see the first
camera anything the first camera could see
re: and that certainly is a problem and likely
ross's its prom has allotted solutions arm
by is it is a problem art
so on which newt's and winter time
okay so let's talk about armed two cameras
drawing the same object at the same time
what I want to do is undergoing a arm move everything up
om Nam and I candidates that I was gonna
make the train to spear I don't want the train to be a that's why God
ok so well we have is we have the same two cameras
I decided that audited I just made the train go away
disabled itself we don't have to see right now an hour on this
and you'll see with you see the one box my is the late night in that box
first mind me
just my lights it in a box there we go ok it's another loaded
is he likes minute in Montreal greyed out
so we have these two cameras alright so what I want to do is I want
both the cameras to draw at the same time
alright arm and this is fairly simple to do
all I need to do is a Jost whichever camera is drawn or the other one
so we have this camera here right this is our the first came when are seen as a
death in a good one
and we have this camera here the second came into the scene also the DEP the new
one
but what happens if I adjust
this clear flag girl what's happening is anything
this can you rare lines camera setting up its not hitting this cube
the to replace a skybox will for change this to depth
only alright so only drew the death
okay and then I run this all the sudden
I see both alright this is the square that camera one is showing me
in this is the square the camera to issuing me camera one is drawing the
blue screen
and the Q and camera to is just drawing the cube
it's not drawn anything out here and as such is not
overriding with camera one sees right are and
if you don't believe me I'll prove it to you
this is the same cue because if I click it while running the scene
you can see that it is in fact the same Q okay
are so not parlor tricks that actually happening
om now the fact that we're able to see the same Q
with two different cameras I mean it's neat
it's a cool little trick but at the same time
that's not really super useful
right arm its Imran really I kinda
did something I should've if your gonna do stuff like that just are also changer
depth on the second camera
20 on the reason that's important is you never know if you do scott free get
which one was the second camera added right circle except at 10
also wanna lose the effect right because this camera strong after this one in
this camera the first camera
is not clearing on death only is clearing everything and so we can lose
our back
arm and I think even if I switch back now it's still going to do that
know it's gonna show okay Tennessee to does keep track of when they're added
the scene
book who know that there might be are a glitch
or all weirdness where on
it forgets which was at first her whenever writer maybe because we open it
so
we don't want to do that we we all wanna make sure the camera that's on
bottom I don't dispose be the first one drop rule
like a stack rainy like a stack of chips or whatever
the first one drawn is on the bottom
sold the ones on the bombshell the lowest number cases I want my
this camera here to be the first one johnnie is a good one
this camera then be the second one should be zero and now I can't possibly
have any issues about when you order
bird or truck or are brought in your order tracking or anything like that
I cool so what else can I do with this really
right I mean that's a neat little trick but that's really can all is the trigram
so let's talk about split screen rate
arm whispers crispness cream time I think multi-player
and in whatever arm busy split screen with there's a lot of different ways
aren't we can do this re: so I'm gonna go ahead and
up a couple things my second camera here on change back to skybox
K I'm going to put it back to a negative one death
because we're split screen they can be drawn the same time the comment
occupy complete different versions of my screen are and I wanna bring the terrain
back
come back to rain we missed you fantastic
okay so now affect we will only do is a1 both the cameras
to draw all everything they have right
but I only want them to take up apportion
on the viewport you're a member view portrayed
our own I'll
looks like we do actually have a scammer her spammer
and goodbye band
that's fine fun banning people never got a chance to do that
%uh please don't post links to weird stuff
not interested arm total of 100 thoughts I like that
are all we want both cameras to render everything we have
are bind we don't we don't want them to overlap each other all we wanted to
share the viewport
if you remember the viewport is the portion the screen is normalized goes
from 0 to 1
alright so let's walk through how this is gonna work
so with my base camera this is my first camera I wanted to be on the top
are my split screen re: and 1 I'm gonna do
he is worse is normalized viewport racked
I want this to goal completely 0 crossed
the screen but only halfway down the course ample split screen
tournament to do some started in in 00 the upper left hand corner
I'm gonna go to one for my with rate that's the whole with the screen
but only got 2.5 for the height
alright socal look like that and for this camera
camera to I'm not gonna started 0-0 almost thirty
0.5 and is going to be one wide
but only .5 all
right another affectively sharing the first camera
is gonna go 00 2.51
in the second camera is gonna go 0.5
211 when I run my scene I hear a nice
split screen effect okay two cameras
I am to camera sees the same thing
or but from different perspectives if let's pretend
each of those cameras with a different character controller player one employer
to
on Sanibel split screen rate just just like that
that's not really what is pretty sharing the screen right which drawn to
different viewports
okay and that's why normalize you poor tracks articles are important why
covered it earlier
aren't so that are split screen effect
arm I cannot spend more time on that because I'm trying to hurry up to need
some other cool stuff
are but this has been recorded you can always go back and see that
so let's talk about picture in picture now on picture pictures like maybe see
you had a mini-map
or are you wanted to pop up someone else's view on your screen
or or anything like that anytime you can have one peace
camera and then another camera show you something cool in a corner in the middle
on the side or whatever
just talk about how we would set that up arms the first things and come back to
my
my first camera here and go back to my basic
viewport of showing everything 0011 adept at -1
this is going to be my base this is what we're gonna see
this camera here now is not going to compete
with space for the first camera just drove right on top it we're we're going
to limit how much you can do that
so we're gonna change its depth 0 because we absolutely wanted to draw on
top of the other one
arm and we're gonna put it starting axes points 75
will be three quarters of the way across the screen and we're gonna start at 0
was gonna be at the top and the with acidly point2
and for high point to right so just real small
now when I run this when I get is I get oh I'm sorry
I want I was on now the wrong side there arm wanna get
is this I'll all my in my reverse the bomb accordance maybe it's
may be 00 lower left hand corner or upper letting
anyway arm I might be backwards on that I'm used to do in some other
to programming how are things are flipped at any rate you can play around
and get where you want
are but you can see the effect now we just have this little picture in picture
down here at the bottom and that could be a map are that could be
anything all right we can do all sorts of of neat stuff
actually someone in the the chances mention a custom going under Sharia do
that
actually the weekend we're gonna build build custom dewey's
are using gay margins with cameras so much ado now it won't be
fully functional featured anything Dabbashi the gist
arm so this is our picture in picture and we can pop this up I mean really
popping up and in turning off even while the game is running
is just a matter of I love enabling disabling the camp
right so as we're playing in and so impossible the message he you know and
they go away
right now that's a very simple way that we can our
do that righted its it's pretty straightforward
okay so that's our our picture in picture affect their
parent to let me go ahead and read just everything again
back to normal group with this package need one put this it
00 and 11
there we go so now again there you're competing for the city's and like the
reset everything back to
arm arm the basics before I move on and
kiss forget something and everything was can we are so we talk about split
screening we talked about picture picture
arm let's see here learner to do
okay so one other thing here let's talk about
let's talk about when something's only draw some things we want to talk about
the calling mask
let me show you how to use them so what I have here is a have this one cube
but what I wanna do is I'm gonna make it so this camron
draws this Q in this camera is actually in a draw us
fear arm so let me create other
spear and was weird my cube cuba's ep
5932 86 so this is going to be
and 6132
when I said six women 5932
86 last year
6132 86
to go a long way I rings backwards business wanna make sure
this will see the cuteness here an associate keep
alright so again I run this ruling to see the sphere
because our second camera is overriding the first cam right
so let's talk about how we can use two different our checks
two different cameras with the same viewports peace
alright so that we can effectively duplicator create more
objects them then we we think we have I'm arm
and actually to do this when I want to do is
bring these low because again as one
this camera to be a see that sphere
okie will do something like let now works
I just wanted to be some differentiation I wonder about bill to see
I mean sold must check this out so what I want to do
is I'm going to make it so that this camera here my second camera
are first of doesn't clear the dark clear the sky boxes I got some said that
the Dept only
I'm also considered 20 art for my depth so it'll
surrender on top of the line to see how the screen can weather
I'm arm and as a matter fact
I'm gonna make the to rain go away as well because the trains gonna meet this
goal weird
who's gonna be rendered and we can make that not happen
are actually no I can turn it back on I'm sorry I'm going at it myself
so basically this is set the Dept only in this is set to
adept at zero this has all the default settings re:
to check this out so what I'm gonna do is I'm gonna put my sphere on a custom
layer
we talked about layers while goes rational use it now arms I have my
sphere selected /img /url air
and we have these def these layers built in but I don't worry we use
any of those instead a hundred adding new layers McLeish Adler
and for use earlier I miss Missy are I'm called special
and I really cares a generic name to create one
ours called special and I'm in a click the sphere again
in this time a monolayer animate you special game
so far so good nothing really think raising their look back to my camera now
and let's say he camera good you're calling mask in on the same nothing
an ominous a special so my camera
only draws special right any news on the special air
there's only one thing on the special air the sphere we can see the only draws
the sphere
let's run are seen see what happens also I have two Spears Donna
RA I have two Spears in a queue I don't really have to Spears in queue
I have once-feared one cube but my second camera
only sees the sphere and is drawing it to the screen
right so it looks like I have to these are actually the same sphere
two cameras seem viewport it it's a little crazy
arm so weak we can we can't duplicate
objects on screen using specialize layers and in things like that
let's take this a step further let's say that this camera
just will draw everything bonds
arm thats down that special layer
sonic over here my calling mask for this camera and I'm just gonna
uncheck special now this camera just can see the spear
and so now what we have is we have a cuban a sphere
are any are in what's neat is hikind
move the cue the this sphere by moving the camera
right up and basically
they can only see the their own sweat lodges so this camera can only see the
sphere can't see anything else
in this camera can see everything but the spear okay
armed so we can achieve some some pretty neat
decks that way re: arm so that that's
thats a pretty slick affect an in on itself that is only moderately useful
the reason that's important is because at this point we can use that to build a
custom GUI
so consider this when I'm gonna do some to take the second camera
and I'm gonna rotated to face
your way guessing is rooted a rotation 0
write something rotation 0 and I'm going to make it worth the graphic
and I'm gonna make it sized 6
and now check this out so what I want to do is listen that's
55 3392 like this the same
5523 to puts it kinda in the same spot
and then a movie out a bit so
to see that we can and on me size in smaller
so let's pretend whose
let's pretend this beer was a a graphical user interface object grape
are was a mini-map or it was a player's health
or it was anything long as much right now the spheres
are anything we put any tech should be one arm you do text renders we can do
arm anything we want are
words one you get the idea I can put anything I can put animations
models are anything I want and optionally like that so it's worth a
graphic
and put all these Spears on we have been on specially I'm rename its we get the
idea
arm I can leave just like that number called a slim goody
okay and I'm gonna come here and make put all these fears
on the cool air and i'mma make this camera
see everything but the goalie
now that's not super important because all the stuff is over here
and realistically if I was making this game this camera on this year's
everything would be like me would
me off in the distance three arm so there would be no possibility you
%uh this issue ray would be below the surface or would be
you know someone else we wouldn't get in each other's way but the idea is that we
make
this camera only see the gooey so the things that happen in the game will
never be drawn to the jury
meet this came see everything but the girl Lisa no matter which way we look we
can accidentally see the gooey
rape in so now I run my scene are I have a
hoops wanna do this camera is set to death
only it's calling now it's not a drama Glee
so gooey there we go arts and I run my scene
and now I have my game and I also have
are my my hide and the kind of really
emphasize this when I'm gonna do is on
this camera here common to disable and I'm gonna come down here like your two
drawers these exist from last summer in The Sims gonna drag a first-person care
to control in my game
all right and that i'm gonna do Amara my see no sudden
I have my heart okay so
and its follow me around and it's showing me stuff now know so I can see
it had out there
whoops and that's not supposed to happen the reason
is because that's for for secured controller is set to draw everything
on the camera and NAMA turn off duty okay
and now ironic and I can no longer see those
object falling up there on the screen alright on
also question is a possible use a gooey and in with the camera from a separate
seen
rather than having the gooey in the currency now are little mercy no
so on my normal way by basically the scene is not seen in every scene is
kinda want Island they don't share
on so if you could create your doing all that in one scene
and how much do not destroy unload tag rate
an end load this scene in those object will be polled
into the scene by they will be in this scene there's no way
arm there's no way to to to cross over
another question just popped up does anyone know where this other chat is
so if you're on Twitch actually on are on the Uni pagey 3d dot com for such
live learning
were host maybe you there and as a chat room there so some people are on Twitch
some people are on our chat real service on our page
and you're not seen each other so apologize but there there's
there's there's to arm sonya
on the question can show her routed the camera TV cameras is
is simple he just let me give you the first but while unstable
goodbye are rotating the camera is really just
I am wrote in camera
just like any other game object now if you mean had a row to the Cayman code
not in code yet so minuscule flare arm
will will get back to that might be busy it's just like any other game object you
can just be routed
with the first person controller at the camera teton America with the mouse to
just move the mouse run look
like was a first-person game I am okay
so the Sears we talked about that and we talked about how increased heart so
that's kinda funny part is you do this and I know it looks
silly cat that is here's be use your imagination those fears can be
anything right are they can be taxed a QB animations
models that can be Bri mosaic me anything
right now it's that's kinda neat right we can do paid in ONE
are men so there's a lot of power so you can use the built-in greases the brief
you wanna make your own you can
and you can do use all the power of the Unity 3d engine particle effects and all
this stuff
only do just keep your layers separate okay arm
that's that's like the most important part arm
yeah are also someone in in in chat is saying I'm attending the post
links you can't post links on please don't try
we don't want people posing least I appreciate the you're trying to post
links for the unity Pagewood
arm are upon appearance second bite at work out I pincher
it is unity 3d dot com
for try to learn and then just go to the live training up with and you too
can the 3d dot com can't
4/21 see go there and could not the live training
and and run a day for trying to sleep but we just had the disabled to prevent
abuse BS so you can not go there you can see the recorded videos you Chris easy
live sessions you can see
arm all that stuff it's it's there okay so
are I will you can speed up here is one more thing we talk about and talked
about
I so they're going to talk about previously run at a time
not rendered textures could render textures are like
super awesome okay so let's do this let me
arm let me get rid of all this stuff
match Sao all these things that I've added I'm disgusted leading
to buy a bike bag by
so I have the train I still have my first person care to control which i'ma
bring back
boom and a hammer directionally those are the only things
are in my scene and amassing a roti this guy around
so we start of senior Island on everything should be functional
green is good likely to not check this out this is really cool
when I'm gonna do is for this camera from I mean camera
alright I'm create another camera okay
song do our game and to create other camera
and I'm going to just put it on the main camera
alright so it's nested under their and I'm a Senate 2000
and our rotation on where r
so that camera this camera are lined
once there are lines nama takes liberties and I'm a movie
up a little bit and I'm going to circle it down
to this top-down view the player let me just come
on way up Eagle bird's eye view some like that
arm and actually know this kinda boring to me also bring in for just a little
bit
the real so Arnold okay I got a question when using game object like that is good
how does one then make them clickable special Mass listener to record click
arm so you can do something amassed listener just on us down
should recognize it because it just recast from the camera right and
since the camera's been picked up by Cameron agreed into my camera should
work
arm I'm done in a widely that I did last time I might be completely wrong but
of the time ahead I'm pretty sure that I did I think you just click on it right
and use the voy on mass down our function but thats again getting in
scripting
om and something I kinda wanna talk about right now
by it's just it's achievable through scripting kinda like how I just scrap
okay so I have this camera I have this new camera
this camera's on a Mac is set to a depth 0 that's fine
armpit I don't wanna draw suit so far runs right now this is when I get
down i win minded only one drop
ok that was also the desert with lotsa dominate one
30 so this is what I get right now and that's kinda and right
arm so what I want to do is I don't want this camera to draw to my screen
I want to draw our to are something else
and so I'm to do is gonna come up here
and I'm create a plane create other plane
while I can Derek and that plane we're gonna
wrote it up wrote it sideways it's as big
plane in the sky and
let me take this this new camera just her second to disable it
and I'm hit play 22nd see that plane
yes preschool my wrote it down just a little bit on the scale it to be a wider
great so I have this plane up in the sky and i wanna do some action on a project
that second camera
onto that plane rights with complete the jumbotron
rape are and the jumbotron new I like sports overhead cam is found from
players with project on the jumbotron
the clicker racing game where you drive through are there are no
no the runway your her way home whatever you call it in
driving have all the Roadhouse tree part are NEC the jumbotron showed you some
the cars they're driving
arm that we're gonna create now so ima do in assets
impressionism right click gonna create and I must select
render texture again this is a pro only feature but I think it's awesome should
you
on a call it jumbotron
dude jumbotron and jumbotron has its eyes here someone make it done
on on 512 by 512
there'll be some stretching their legs let's actually make it 1024 by 5:12
are and we have a rat mo which is clamped RR and sea level which will be
the quality
arm not let me upgrade that maybe is getting a quality settings
the depth buffer in things that were provisionally that allow mister to 1024
512
and I'm gonna take the jumbotron texture not put it on the jumbotron plane
turns black alright
just like that r8 and then what I'm gonna do
is here amor find the camera that I disabled
Marie enable it down here which is target texture
I'm now going to choose jumbotron
alright now we're not gonna draw miss the screen we're gonna draw to our
jumbotron
money play up in the sky I have a Jumbotron
showing me my progress right
which is like that and I as I'm watching it its watch me
right I can put any camera I want on their matter fact if on a
were to say main camera here
like that was disabled I came as my main camera
this month it's the screen that make must be my main chemical the jumbotron
om I have no idea what can happen
are gonna have your this other camera I'm going to
enable and also said to be
one I'm not gonna make this work
I just think about that my main cameras art project on here
we can see what looks like just like that we this infinite picture picture
picture
but we we basically need up base
texture so yeah that's forget I was trying to do that because I'm just going
to look
on so the second camera let me arm
go back to zero and this cameras on the first person troller
lemme get real jumbotron texture Maria
make sure it is working again great so here's
one last super cool thing alright arm
yet one last super cool thing I know one I'm way over time your special with a
technical blip
but I want to do one more thing here
when I want to do is I am going to take this camera
right here the new one that we had to look down and I might drag it and put it
on top of the plane
alright and I'm a set it to 300 with the rotation
are 0 care
aren't just like that and what I want to do
is I'm going to bring it up
on and its do the rotation the plane is actually upside down
something like this let's let's simplify that let's make that
so the user's rule we want it to be are
along with the act axis
ninety degrees and then along the
the axes 1e fantastic so it's perfectly
flight to check this out so that we get we get projected on the screen
whenevers behind the screen and and so now higher on my game
I get this weird like kinda transparency thing
rainy it depends on how you're lined up
but effectively what this enables us to do is to create
this weird like like predator style
arm om
camouflage system RAM
serve a running game Marson projected on the front is what's on the back
hobbling the hell right in cell by if if I were to move the plane left and right
arm then all the sudden that the texan that was on the plane would also move
right and as such it would seem like the texture was see thru
I because it would as the play moved what was on the plane lost move
and we would be able to see it right this happens to be kinda long
it gets bad right now because my camera so much lower than the
im in the plane itself is not moving however
the plane was moving you would be highly effective camouflage
are you because he would you would pay any move kinda in panel crazy
now really wanted to do with the cube within a very controlled environment
but I'm running out of time so this is my makeshift camera system
up still better than ok mr. I'll buy yeah it's not fantastic
but anyway so that is some stuff we can do with render textures
and we can stack a reputation honoring detector 100 textured creed is like
layered camera system
on we could do all sorts of stuff with it really around the idea is that just
the camera is projecting onto that texture
okay so I have gone over quite significantly with what time it is
yes I'm have gone over by a bit arm
like to keep these things to about an hour are and so I'm gonna go ahead
wrap-up
now our soldiers can occur wanna talk bout far
this is all about cameras our Relay mention partly gonna relate but I can
see now that I had
not enough time are there's even so much more than I'd like to cover
on boo talk to a camera to talk about how the camera just a component
we talk about the spaces we talked about world space screen space Newport space
oMG we talked about the camera properties we talked about our
perspective this is what the traffic cameras
to come multiple cameras and how their choice how we'd choose
how to draw arm split screening picture in picture
on we talked about our buffer clearing did to build show multiple objects on
the screen
arm at the same time are 100% multiple times things like that
we talked about the render texture art so what we have next
is next week is lights on Monday but I'm also doing intermediate Dr
demonstration on Wednesday are which is fun with lasers
so if you ever wanted to shoot teddy bears with rainbow lasers
Wednesday is definitely one you're gonna wanna show off or arm
we will be using are recasting in line runners to build laser guns
arm so that one should be pretty fun because we get we did I get requests for
for lasers a lot arm let me pull this back up here
are by the way the one are four-wheel on lasers next week
is at a different time so good life page link to be forced you to act
you need 3d dot com force last learn go there include the live training button
are and select are check out the fun with lasers
its at noon my time which will be completely different for you guys
are mostly that's five o'clock GMT time bite out just you don't miss it
are again are you can reach us on Twitter with any questions or concerns
or anything like that
are at Unity 3d at my kayak which is me
at will goldstone and at the and ranch
arm yeah so anyway %uh
any questions are you have passed along any comments
norm I like to stick around the at the and for for questions but I do need to
get going today so I apologize
or does the ground for questions are sent to me via their Twitter
or talk amongst yourselves are and hopefully you can you win for now
allies you know just always message me are more than happy to help out
I'll tree into the chat here to make sure there's nothin else
on each dance DVB shoots bears every day with Rio's
on so I guess will be the new for you on
let's see here let me let me pull up that unity3d
and I'll just post the link so you can't harm
here there's thats
and hours
yeah I'm I'm actually a GMT -4
right now but I will be a GMT -5
after the weekend for daylight savings time arm Syria
up in a week that link will take to the lifeguard training pays
checks the park are the archive this will be available there soon
arm I do need to go on are thank you all for being present
our own if you have any questions passed along to be more happy to help out
and otherwise have a fantastic week thanks very much