Hey all,
I've just begun work on my next university project, a sidescrolling 2.5D game.
The reason for posting here is because i've run into a few problems, a few of which aren't actually connected to Unity but more broadly to setting up a workflow.
I've never had to work with sidescrolling games before so essentially i'm looking to get some ideas and help setting up a workflow.
I need to deliver a working prototype (so i can get away with rudimentary assets i.e no textures - but functionality, animations and models need to be in place), and due to the time constraints i will be purchasing a few packages from the unity asset store to help me out...it's a solo project so i'm all alone on this one too :S.
Alright, enough with the talking - to the answers!
Q1. Achieving Camera Clipping (Lost Winds & Dead Light)
This is an area i'm hardpressed to figure out, it seems some sidescroller games utilize some kind of depth mask shader or camera clip shader, you can see in the Lost Winds screens - black parts of the geometry hint at either the kind of shaders i mentioned.
Or...its done as vertex painting.
Dead Light its seems does use some form of camera clipping, and they have another neat feature of fading off insides of buildings when the character moves inside, i'm wondering if this is done in the clipping...or if there's another way to go about it - gameplay video shows it in motion.
[ame="
http://www.youtube.com/watch?v=nJwbKX4JulU"]http://www.youtube.com/watch?v=nJwbKX4JulU[/ame]
Lost Winds (wiiware)
Dead Light
Q2. Modular Assets (Analyzing Double fine's "The Cave")
The last question i have is regarding assets found in "the cave", i've found a few screenshots which merit some investigation.
In this screen you can identify that right underneath the character there's 2 assets intersecting, but i'm having a hard time figuring how they did the underlying layer, seems like a separate asset all together.
Same as here
But in this image i'm having a really hard time figuring out if its all custom models (the boulder and assets i can see are just placed in there, but the floor seems like it'd be one big unique model then, and that would mean each level had only unique models for the level design :S...baffled
Could be i'm putting far too much thought into this and maybe its easier than i realize.
Just hoping someone can pop by here and put some of my thoughts to rest...kinda dont know where i should start.
Oh and i'm wondering, if the cave is using some kind of in-engine modelling, like using splines or what-have-you maybe getting
http://www.west-racing.com/mf/?page_id=2360 (megafiers) would solve some of my hurdles.
Thanks in advance!
Replies
Yes.
Honestly, it looks like vertex color to me. Whether that was done manually after building the level and placing assets, or automatically as part of a preprocessor I can't be sure. It could potentially be done in the vertex shader, assuming there's some depth to the bevel at the caps (eg. past a certain Z/Y threshold, vertex color = 0), sure, but nothing more complex than that. Physically, the level geometry ends where you see it ending.
As for Dead Light, that could be achieved any number of ways. Simplest method I can think of offhand would be to just have a big plane matching the geometry you need blackened, in the frontmost layer, then just fade in and out as needed.
For The Cave, I couldn't say for sure how they're building their levels, but it could be that they build a unique greybox in either an external modelling package, or in the editor itself (think BSP in unreal/source), and then decorate with textures and props. Alternately they have lots of tileable bits that they snap together in the editor, with props and other unique geometry covering up any seams.
Think my brain can take a rest now :P
The three blocks are very similar, but not exactly the same. It looks as though they placed a lot of modular blocks in place, with a slight offset along the depth/z-axis, and then sliced the blocks at a certain distance. Whether this slicing is done through shader magic or beforehand I do not know.
(the light red and green lines with the question mark might be the same modular block rotated 180 degrees, but I'm not sure)
Easy way with no programmer support/skill = build it that way.
I don't think the slicing is anything magic, I think they've just textured both ends of the block...
Yep thats what i'm getting from most of my other sources too - i just assumed that it was a way more complex process involving depth based clipping or some sort of magic...
Now i'm thankfully that much more informed
(p.s I really appreciate all the help here, you guys are awesome!)
As you can see there's fog and general visual effects going on underneath the surface, plus the water moves, but not according to the player dropping in (i'm fairly certain this just means that its an animated mesh with a shader.
I must admit i've been looking high and low on answers.unity for something that explains how i'd go about creating (faking) water volumes like this, so i'm hoping someone here maybe has the key to the problem.
[ame="http://www.youtube.com/watch?v=dL6fC-0n1Y8"]http://www.youtube.com/watch?v=dL6fC-0n1Y8[/ame]
So i'll revise my question;
1. How do i limit any effects or screen effects to the area (marked in red) under the wave surface? Is it just a matter or placing any effects right underneath the lowest going wave and then "hiding" any intersections with a particle effect?
The simplest solutions are generally the best
Hey farfarer, thanks for the reply - i can follow what you're saying right up untill the point with "a material thats got a lot of fog applied"...could you maybe elaborate on how you'd handle this in unity then, i'm not quite sure if there's any shader that features fog (closest thing i could think of was something equivalent of UE3's fog volumes).
Alas there's a package for that on the store, but i'm wondering if there isn't other ways of approaching this before putting cash on the line.
Also depth based is kinda broad, i've been looking into shaders that offer depth based transparency according to the camera clipping distance (shaderlab on the unity community). But i've only been able to find older versions for 1.x.x and 2.x.x, where neither work anymore.
I'll try trotting on, but it would help a great deal if you could explain your own method of dealing with this problem.
I tend to think its a more complex problem than whats really the case...apologies :P
As for depth shader, it's a shader that will read the depth (distance from camera to geometry) for a given pixel on screen and you can then use that to apply a fog effect. It'll require Unity Pro features, however, as to read the scene depth from a shader requires RenderTextures. For what it's worth, this one would be my guess as to how it's done.
http://answers.unity3d.com/questions/324098/water-volume-for-sidescroller.html