Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by VinnieH01 · Oct 20, 2016 at 06:10 PM · renderingspriterenderersorting layerssorting order

Sprite sorting order, background behind middleground but in front of foreground

Ive got 3 layers A "foreground" a "middleground" and a "background" I want the backround to be drawn on top of the foreground but still behind the middleground. I also want the foreground infront of the middleground. How would I go about doing this? I hope you understand my question :P

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by tanoshimi · Oct 20, 2016 at 06:17 PM

You've described a logical impossibility:

B > F

B < M

F > M

Comment
Add comment · Show 12 · 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 VinnieH01 · Oct 20, 2016 at 06:29 PM 0
Share

Yes, of course I have.. but Im not trying to just enter a magic number into the sprite sorting order box. Im trying to find another aproach, some sort of rendering trick

avatar image b1gry4n VinnieH01 · Oct 20, 2016 at 06:34 PM 0
Share

why would you want to draw the BAC$$anonymous$$ground in FRONT of the FOREground? That would make the background the foreground. This makes no sense.

You solve this by making more than 3 layers and put the stuff you want in a logical order where back = back and front = front

avatar image VinnieH01 · Oct 20, 2016 at 06:40 PM 0
Share

@b1gry4n Lest just call the layers 1, 2, 3 then :) I just said fore, middle and back to make it easier to understand. I understand now that it completly doesn't make sense. Can you please elaborato on : "You solve this by making more than 3 layers and put the stuff you want in a logical order where back = back and front = front"

avatar image b1gry4n VinnieH01 · Oct 20, 2016 at 06:44 PM 0
Share

You edit the images and cut them up into more images.

Say I have a "background" like this and I want the blurry tree/bushes in the foreground to appear in front of the middleground : http://bkgrounds.xyz/forest-sprite-backgrounds/xyIOWDBNcOhYIuJqfXG91d$$anonymous$$iX6UUYn7wWAptz2JrS1DJuT2x5nq$$anonymous$$vjm_cG4TxDN6ZJ1to5H1vQbR1DZmrid_3S$$anonymous$$6fXDjztE2xo7SHDusJtfg_b9jAQH-D5JD9DYF3XUd.jpg

I need to cut out the tree and bushes into its own image and make sure it now sits as the top most layer. Now I have 4 images.

avatar image VinnieH01 b1gry4n · Oct 20, 2016 at 06:45 PM 0
Share

Oh yes I know that, its not what Im asking for though

Show more comments
avatar image VinnieH01 · Oct 20, 2016 at 06:50 PM 0
Share

@b1gry4n Im asking how to put the background in front of the foreground but behind the middleground. The middleground should still be in front of the background

avatar image b1gry4n VinnieH01 · Oct 20, 2016 at 06:56 PM 0
Share

I understand now that it completly doesn't make sense.

avatar image VinnieH01 b1gry4n · Oct 20, 2016 at 06:58 PM 0
Share

Lets just call the layers 1, 2, 3 then :)

avatar image VinnieH01 · Oct 20, 2016 at 06:59 PM 0
Share

@b1gry4n If you cant answer my question then why are you here arguing with me?

avatar image b1gry4n VinnieH01 · Oct 20, 2016 at 07:01 PM 0
Share

calling them background/foreground or 1,2,3 doesnt magically make it make sense. you have 3 pieces of paper stacked on top of eachother and youre trying to make the bottom most piece of paper appear in front of the top most piece while still being behind the middle piece. Thats the part that doesnt make sense.

So unless you make a custom shader to mask parts of these sprites or you use transparency in a clever way, this is impossible.

avatar image VinnieH01 b1gry4n · Oct 20, 2016 at 07:42 PM 0
Share

@b1gry4n Thanks for acually "kind of" answering my question "So unless you make a custom shader to mask parts of these sprites or you use transparency in a clever way, this is impossible"

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

61 People are following this question.

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

Related Questions

Set the Sorting Layer for UI Controls 0 Answers

Halo hidden under the sprites 3 Answers

How Can I Make Sprite Sorting Layers 'Relative'? 1 Answer

Mixing sprite renderer and mesh renderer sorting layers 1 Answer

I'm a beginner , currently i have a problem with sorting order pragramatically . 0 Answers


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