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
0
Question by KaTsuoo1 · Jan 13, 2014 at 11:46 PM · textureprojectprojectorprojection

Just A Projected Texture, Not Shadow Or Light

All I want to do is to project a texture using a projector, and have the texture placed in the spot where the projector is aimed, not have the single texture wrapped around the whole mesh. I also want the texture to look exactly like it should, so the color should stay the same and not be transparent, unless there are transparency in the texture.

I mean, I want it to work similar to how a projector actually would, but that seems too logical.

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

3 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Pangamini · Jan 14, 2014 at 06:37 PM

What projector does is that it renders everything in its frustum with some material. It also pushes a projection matrix to the material shader.

To achieve an effect that the texture is projected, you need to use a shader that will render it properly. You need a Projection/* shader. I think supplied ones only do additive(light) and multiply (shadow?) rendering, but you can basically write any shader you want.

Here's link to a question about projection shaders if you need help with that.

"color should stay the same and not be transparent, unless there are transparency in the texture"

From what you said, you will probably need alpha blending, although you also said

"I want it to work similar to how a projector actually would"

in which case the standard light shader should work (as actual projectors are actually lights, that's why you use them in the dark room ;) )

I hope this helps

Comment
Add comment · Show 2 · 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 KaTsuoo1 · Jan 15, 2014 at 07:53 PM 0
Share

The problem for me is that I have no idea how to write a shader. Or course, I could learn how to do it, but I rather just focus on JavaScript. So I hoped there would be a proper projector shader, which I thought wouldn't be so hard to find.

The light projector made the color very dull, it uses gray scale for transparency and it goes through multiple objects. Layers could be used, but not in my situation as I'm using a player model, so if the projection hit the side of the body, it will also hit the side of the arm behind the body.

avatar image Pangamini · Jan 16, 2014 at 04:15 PM 1
Share

It does not use gray scale for transparency, it simply sums the color of projected texture and whatever's underneath. Simple blending option in the shader could fix this.

For the other problem, i'm afraid it is going to be more complicated. You need to create shadows for the projecotr somehow, and that's not a built-in feature AFAI$$anonymous$$. Lights support having a cookie, which works kinda like an additive projector, but i think cookies are projected as grayscale only. Basically, you will need to implement your own shadow rendering for this. Or at least there's nothing i'd know about. Try asking on the forums, perhaps there's a way how to reuse some unity's shadowing

avatar image
-2

Answer by Owen Burk · Jan 14, 2014 at 12:17 AM

If you have Unity Pro you could have the texture somewhere else with a camera facing it and use a rendered texture.

http://docs.unity3d.com/Documentation/Components/class-RenderTexture.html

Comment
Add comment · Show 1 · 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 KaTsuoo1 · Jan 14, 2014 at 05:37 PM 0
Share

I will need to put it on top of an another texture where the surface is not necessarily flat. So it doesn't seem like that would work, but it could be great for other things, so thank you for pointing me to it.

avatar image
-2

Answer by Darkroot-Jackson · Oct 25, 2018 at 05:26 PM

This is incredibly easy in Maya.. Im amazed how hard this is in Unity. Has anyone solved this yet?

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

21 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

Related Questions

camera for rendering and realtime projection 0 Answers

Blob Shadow and Trees Using Terrain Cause Issues 0 Answers

Projecting Texture to Mesh 0 Answers

Baking/Mapping projection texture into object texture 0 Answers

How to make an Off-axis / Off-center camera ? 2 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