Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by The_A_Drain · Mar 19, 2012 at 08:25 AM · depthdepth-buffer

Using a Pre-Rendered Depth Mask?

I have searched for this many times and have not found a satisfactory answer.

The effect I am trying to achieve is that found in the old pre-rendered survival horror/puzzle games, pre-rendered 2D background and depth masking.

I've tried several methods, using 2 cameras (orthographic for background and perspective for models) and using distance sorting to hide cutouts of depth objects (tables, chairs etc) but this only works so far as one character is concerned.

I've tried the depth mask shader found on the Unity wiki and this is great, but to work for this context would involve a lot of guesswork/tweaking to get something that matches the backgrounds properly.

What I would like to be able to do is use a pre-rendered depth map alongside the pre-rendered background to cut down the workload significantly, I saw a couple shaders most notably Aubergine's one but could not get them to work properly. Does anybody know of a shader or tool that would let me do this?

Thanks in advance guys.

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image senad · Mar 19, 2012 at 10:48 AM 0
Share

I am sorry, I do not understand what effect you are trying to achieve. $$anonymous$$aybe I should have played more horror puzzle games. :D

Can you describe a little more or link to an example?

avatar image The_A_Drain · Mar 19, 2012 at 08:13 PM 0
Share

$$anonymous$$y bad, I meant to but the site derped and I forgot to paste that section.

Specifically though, I do mean precisely the effect I want to achieve is Resident Evil 1 and 2, completely fixed cameras with no movement, but with proper depth based on the image. Other similar games are Fear Effect and Alone in the Dark.

Video examples: http://www.youtube.com/watch?v=Pc7vnJ0O5LU (original game)

http://www.youtube.com/watch?v=95g3mQ7ef8w (remake)

avatar image MidniteMagus · Mar 22, 2012 at 05:25 AM 0
Share

I'm interested in doing the same thing so I second this question.

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by acid201677 · Dec 30, 2012 at 08:39 PM

I'm trying to build a team for my indi game development studios, Liquid-State game studios. We're actually trying to work something like this out for our first game. Give us a shout out and maybe you could join the team?

We got some good pre-rendering technology if you heard of it, vue xstream. We've worked out a system basically you tell unity to not allow shadows on the plain, then mimic the lighting you have pre-rendered so that it appears to be the same as the rendered source. As for the layer effect try using alpha planes to give the effect that the player can move behind the object.

"maybe theres a better system for unity out there, as stated above we're just coming about."

I think we will mostly have pre-rendered backgrounds also with movie texture as well.

If you're interested give us a shout.

More people more ideas.

Where now rendering a GB's of images and videos, but this is our FB page.."just made today"

https://www.facebook.com/LstateGS

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by JonnyHilly · Aug 16, 2013 at 06:56 PM

well I can think of doing it part way.... assuming you have a low-model of your scene, a redered 2D backdrop, a camera and a 3d animated character in the scene. 1) clear background with camera 2) draw your 2D backdrop image (you could also use your main camera to render this once to a render texture, then just draw the render texture as 2d polygon, this would give you option to edit render direction easily in unity) 3) Render your low poly version of the scene, take, any unlit (super cheap) shader, leave z-write on, but strip out all lighting and color and everything else... It will still be rendering to z-buffer, so maybe not quite as fast as re-rendered. But it wont be reading from any textures, and wont have to do any lighting calculations, so it will still be pretty darn fast comparatively speaking. 4) Render your 3d characters. That should work

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by vexe · Jan 09, 2015 at 03:02 PM

Check this out http://mehm.net/blog/?p=1211

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to get the depth values of the camera view? 1 Answer

Scene View Camera Depth Texture? 0 Answers

FPS Halves to 30 when i enable using depth or opaque textures on URP Mobile 0 Answers

Depth Rendering Issue 0 Answers

Mesh z-fighting to itself 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges