Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 swisscoder · Nov 24, 2011 at 01:14 PM · terrainrenderingrendererrenderqueue

Set RenderQueue for Terrain

Hi there

I try to influence how the terrain is drawn. Actually I try to make a transparent hole in the Terrain. Unfortunately I can not change the RenderQueue, the console gives me an "No 'Renderer' attached to the 'Terrain' game object" error.

Therefore I can not influence the rendering order for the terrain.

Is there any workaround to do that?

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

2 Replies

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

Answer by Owen-Reynolds · Jan 03, 2012 at 05:22 PM

The built-in Unity Terrain doesn't use transparency. Sure, you can select a png and paint with it, but the hard-coded drawing routines don't look at alpha. Even if you could get it in the transparent queue, the terrain would still be drawn solid. You can modify the shaders to use alpha, but the built-in paint tool won't know that, and won't work right.

I look at it this way. Most game engines have everything built-in and that's just the way it is. In Unity, only Terrain is still that way. That seems fair to me, since efficient terrain rendering is such a complex area.

For the hole, do you want it to also not have collision? Like making a cut-out for a cave mesh? Because collisions are a whole other area. Best is to built the "terrain" out of your own meshes.

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 swisscoder · Jan 03, 2012 at 07:25 PM 0
Share

Thank you very much Sir, for this nice explanation.

Collisions I could turn of by placing a collider accordingly, and upon entering it turn off the collision for the layer.

As you supposed, I personally believe too that the probably best solution is to make additional meshes and add them on top of the terrain if holes are necessary.

I wanted to know if there is a way around that, but your question gives me a good argumented answer to say: No, there isn't. (Just in case my boss comes up with that topic again.)

avatar image
0

Answer by Venryx · May 13, 2013 at 08:37 PM

You can set the shader's RenderQueue (to get the same effect) by writing a replacement shader.

For creating terrain holes, though, I've put together a Unity plugin that does just that: Terrain Hole System

Description: "This Unity extension lets you make holes in your terrain that characters and other objects can go through."

More information can be found on the forum thread.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Why is this clipping/overlap occurring between game objects? 1 Answer

SSAO not working with tree billboards iOS 0 Answers

Forward Rendering for Terrain, overriding the shader? 0 Answers

Cannot see grass terrain unless I zoom in. 1 Answer

Is mesh rendered if backface culling? 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