• 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 /
This question was closed Feb 26, 2015 at 03:58 AM by meat5000 for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by Tricnic · Feb 24, 2015 at 03:35 AM · projectororthographic

Orthographic projector spills outside of its bounds

When using a projector in Orthographic mode, the cookie I am using is rendered well outside of the bounds of the projector. This happens when I use any cookie other than a circular image on flat black. You can see how it is set up and how it displays below. The projector object is selected and you can see the extra grid lines being projected to the left of the projector box.

alt text

alt text

Is this normal behavior? I've been looking, but my google-fu is failing me. Maybe I don't know what to search for, exactly. Is there a way to prevent the cookie from spilling over the bounds of the projector?

scene-view.png (465.3 kB)
inspector.png (55.4 kB)
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

  • Sort: 
avatar image
1
Best Answer

Answer by Tricnic · Feb 26, 2015 at 03:57 AM

I found the solution to my problem. After playing around with it for a while, and examining the light projector prefab that comes with the standard assets, I found the correct way to set it up.

When creating the texture file:

  • Make the texture 1 pixel wider/taller than you want to use. (The excess will be trimmed off, I think by the Border Mip Map setting below)

  • Put a border 1 pixel wide of black along all edges (Must be RGB 0, 0, 0)

  • Put the image you want to use inside this border. No part of the image should overlap the border. Touching it is fine, but you cannot overlap.

An example: It may be hard to see, but there are black and white borders along the outer edges. The white border is only used to show the black border.

alt text

Once you have your texture file created and imported into Unity, specific texture settings have to be set to make it work. Locate the texture being used in the Project panel and set it as follows.

  • Texture Type: Advanced

  • Generate Mip Maps: checked

  • Border Mip Maps: checked

  • Wrap Mode: Clamp

Click Apply and use the Projector/Light shader with your texture and it should remain within the bounds of the Orthographic Size of the projector.

I have not tested this with perspective projectors. They may work differently.

This may have been obvious to others, but my understanding of graphic assets is pretty limited. I put my answer here so that if anyone else has a problem like this, here's the answer.


bordered-projector-cookie.png (1.1 kB)
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

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Calculating projector aspect ratio and orthgraphic size based on width/height 1 Answer

Projector issues - Unity 3 - Please Help!!! 1 Answer

Projector blob shadow ignoring layers configured by script? 1 Answer

What is the algorithm used behind projectors? 2 Answers

Projecting a texture 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