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 kev42100 · Aug 06, 2012 at 10:12 PM · terraingraphicsoptimization

Can we create our "own" terrain "engine" on Unity ?

Hi all,

The terrain component in Unity is inappropriate for my own project (and I find that the number of Draw Calls is very huge...). I was wondering if we can develop our own LOD (Geoclimapping or Quad tree) + if the only class which allow us to build geometry (Mesh interface) are sufficient ? I ask these questions because we have a very little control on the rendering pipeline and we can just manipulate buffers (vertices, indices).

Thanks in advance.

Comment
Add comment · Show 5
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 kev42100 · Aug 07, 2012 at 06:00 PM 0
Share

@Fattie : Have you built your own LOD ? The interface was sufficient for your terrain ?

@Eric : Are you sure that the Unity built-in terrain is written in c# ? They didn't develop the core system in C++, and wrapped some functions in C# like the other interfaces ?

avatar image Eric5h5 · Aug 07, 2012 at 07:19 PM 0
Share

I believe there's some C++, but mostly it's C#, from what I read. Certainly there's nothing about it that I can see which would require it to be C++. Also there are various third-party terrain systems available.

avatar image Fattie · Aug 08, 2012 at 05:38 AM 0
Share

Hi @kev

  1. if you mean the actual mesh changing depending on the camera distance, yes that is trivial to do with ordinary javascript. No prob whatsoever.

(I'm not fancy enough to use C# .. but I believe all the monoscript scripting languages ultimately run in Unity3D at exactly the same speed.)

  1. you're aware that Unity has a "level of detail" (mesh) system fully built-in and awaiting your fingertips??

Here it is ...

http://docs.unity3d.com/Documentation/$$anonymous$$anual/LevelOfDetail.html

  1. if you mean the texture changing with the distance to the camera, i just use the ordinary old mip maps built-in to Unity3D. (ie, "the textures I come across, already have both in there!")

  2. I've never found any problem whatsoever, at all, making a quad tree, spatial hashing or the like, or any sort of everyday "comp sci 201" algorithm in javascript. (I've never done geoclipmapping.) It seems really fast to me. There's talk that the whole unity chain starting with javascript, is only about 50% slower than writing native ObjectiveC in XCode for your iPad, so perhaps that's some sort of specific answer for you. You know how someone's always co$$anonymous$$g up with a cheesey new algorithm to make idiotic looking fractal-ish terrain for 3D games? There's talk on the forums from time to time of people implementing those with no trouble in c# inside Unity, so I think it's a non-issue. Just as Eric says I can't see anything at all where you'd have "language concerns" in the topic you're discussing here. (Indeed you should look around for already existing realtime-lumpy-shapes stuff in Unity! Someone should throw one in the asset store really.)

  3. "I ask these questions because we have a very little control on the rendering pipeline..." I'm completely with you on wanting to "get lower in to" the mesh pipeline (perhaps you could add an essay answer for my current question here ! http://answers.unity3d.com/questions/297697/explain-the-vertices-pipeline.html ) but it's not gonna happen in a gameEngine, eh? It is what it is, it's meant to be a "game engine" not, oh, a "low level mesh/ OpenGL engine system thingy". (I wish there was such a thing!)

  4. Why not spend 10 $$anonymous$$utes scribbling out some code that, in a word, changes the mesh in the way you're thinking of - it will instantly answer many performance questions for you!

avatar image Fattie · Aug 08, 2012 at 05:39 AM 0
Share

{How to annoy a group of programmers, make a paragraph-numbering system that breaks! Arrrg! :) )

avatar image Eric5h5 · Aug 08, 2012 at 05:45 AM 0
Share

No worries...I just read that as 1a, 1b, and 1c.

2 Replies

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

Answer by Eric5h5 · Aug 06, 2012 at 11:04 PM

The Unity built-in terrain is mostly written with C# scripts. So, yes.

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
0

Answer by superpentil · Aug 08, 2012 at 09:17 AM

Yes you can but you'll need to write extentions for it in C# and C++.

The Manual goes over the topic Here: http://docs.unity3d.com/Documentation/Components/gui-ExtendingEditor.html

Comment
Add comment · Show 4 · 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 Fattie · Aug 08, 2012 at 09:23 AM 0
Share

Hmm, @super, what are you thinking of when you figure it would have to be done in an Extension? Pls explain as I am stupid. Cheers ..

avatar image superpentil · Aug 08, 2012 at 10:05 AM 0
Share

Well, one example scince we're talking about terrains is the custom built Terrain Toolkit made by the Sixtimesnothing dev $$anonymous$$m. $$anonymous$$ade in C# it is a fully operable custom terrain engine based on math sequences. You can make any extension to unity. The link in my answer goes over it pretty well. Look at the first picture and the caption, but imagine it as the Terrain Tollkit that you made.

avatar image Fattie · Aug 08, 2012 at 10:58 AM 0
Share

Super, that's a very admirable product and everyone should buy it NOW.

But note: unless I'm mistaken (Eric?) there is no PERFOR$$anonymous$$ANCE aspect whatsoever to using an extension.

If you can write the code it will work basically identically in everyday code or an extension. There's no performance difference. It's essentially a matter of "convenience" to "put it in an extension". I'm pretty sure that's the case dude! Rock on!

avatar image Eric5h5 · Aug 08, 2012 at 05:17 PM 0
Share

You wouldn't need C++. I'm not sure what you mean exactly by "extension". If you mean DLL, Fattie is correct, the code in a DLL is the same as code in "normal" scripts, it's just packaged differently, and it's not necessary, just a convenience.

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

10 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

Related Questions

Placing tree objects with Terrain or Polybrush which one is useful ?? 0 Answers

Split a big level mesh in Unity 2 Answers

Help! how to convert input.GetAxis to Accelerometer 0 Answers

Animation of terrain causes drastic performance drop (fps) 0 Answers

Normal maps on terrain textures not showing in editor 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