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
2
Question by 2dkot · May 30, 2012 at 09:24 PM · camera

How to exclude object from camera clipping

Hi everyone.

I want to add smoke object on skyline, but don't want to increase Camera far distance of clipping plane. How can I exclude smoke object from clipping?

Comment
Add comment · Show 1
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 2dkot · Jun 01, 2012 at 10:46 PM 0
Share

any advice?

2 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by 2dkot · Jun 02, 2012 at 10:40 PM

I fount solution of my issue. It is quite simple, but I should read documentation more carefully (. I add layer 8 as Smoke, than assign it to smoke objects. I did following script:

 #pragma strict
 
 function Start () {
     
     var distances = new float[32];
     distances[0] = 2000;
     camera.layerCullDistances = distances;
     
 }
 
 function Update () {
     
 } 

And attach it to camera. This script means that for all object, which has layer 0(default), far clipping distance is 2000 for others(like smoke onbjects) far clipping distance is set in Camera settings - 5000.

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
2

Answer by drizztmainsword · Jun 02, 2012 at 01:45 PM

Here's a possible solution.

Put the smoke object in its own layer.

Have another camera that exactly matches your primary camera's positioning and movements. This camera will have a far clipping plane that goes out to the distance you want to see the smoke, and a near clipping plane far away enough to make that economical.

Now, you tell this new camera to have a layer mask that only sees the smoke, and layer it behind the rendering of your normal camera.

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 Bunny83 · Jun 02, 2012 at 01:50 PM 1
Share

@drizztmainsword: You don't have enough karma yet that's why your posts are placed in the moderation queue. Be patient, someone have to verify your posts. Once you have more karma (i guess above 15) you can directly post questions or answers.

The moderation queue is far from being optimal, but it's better to fight 50+ spam posts / hour. We had a lot spam bots on UA and the moderation queue is quite effective against them.

avatar image 2dkot · Jun 02, 2012 at 03:44 PM 0
Share

ok, I got the idea but cant figure how to match both camera rendering. I made 1st camera as parent and second one as child, but I still see only 1st camera picture.

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

6 People are following this question.

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

Related Questions

How to make camera position relative to a specific target. 1 Answer

Minimap clicking RTS style feature 3 Answers

Problem with changing target of Camera. 1 Answer

Disable Camera Movement,Stop camera movement 0 Answers

Render world differently for 2 camaras 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