- Home /
Terrain Question: Increasing Detail Distance over 250
Inside Terrain Settings, I am trying to increase the Detail Distance over 250, so my grass details will be displayed from a greater distance. How can I do that?
I've tried finding the "Terrain" script to change the code, but couldn't find it.
Any ideas?
Thank you very much.
Bump! I'd like a more recent answer to this as well. I'd like to be able to set my terrain detail distance over the max. 250 to really complete my forest-view!
Answer by duck · Mar 09, 2010 at 05:24 PM
The variable you need is terrain.detailObjectDistance
(where 'terrain' is a reference to the terrain script on the terrain object). A common way to get this reference is to use Terrain.activeTerrain, or to create a public variable of type Terrain, and drag in a reference to the terrain into that variable slot in the editor.
That variable, and a number of others that you might be interested in (such as treeDistance and treeBillboardDistance) are listed on the Terrain Page in the scripting reference.
It doesnt seem to be working for me at the moment... I am trying to have the detail grass rendered at > 250..! I attached a new script to the Terrain and in the script added
Terrain.activeTerrain.basemapDistance = 5000; Terrain.activeTerrain.detailObjectDistance = 5000;
seems to work however if i set it to a lower setting, like distance 11...nothing shows haha, so i dunno...i thought it might be the camera but im not certain yet... Anything i can do here? hmm
If you want the detail distance to be the same all the time, just update it every frame. It doesn't require that much computer power.
var distance = 5000;
function Update () {
Terrain.activeTerrain.detailObjectDistance = distance;
}
BA$$anonymous$$! solved the problem...
[works as of $$anonymous$$arch 2014]
Answer by David-Lindsay · Oct 15, 2013 at 03:56 AM
This doesn't work anymore. Unity automatically resets the terrain in the next frame immediately after you make a change.
that explains it...thanks! so much Z fighting with the terrain as well
Im raging with unity terrain system, I need to set the detail distance to way further than 250, why the editor don
t allow us this? it dont have any workaround? I can`t believe it
Answer by Althizar · Jul 13, 2021 at 03:42 PM
Hello community, I have tried this with the Fixed Update and it seems to keep the detail distance set to what I like it to. Version 2020.3.6.
Your answer
Follow this Question
Related Questions
Specify detail density and detail distance PER grass texture? 0 Answers
Terrain building with errors 0 Answers
Culling low grass details on terrain (detail distance issue for not tall details) 0 Answers
iam using raycast.hit function.am trying to move vehicle over the terrain ups and down?? 0 Answers
Wind: Detail meshes are moved by wind back and forth, rather than swaying: how do I make them sway? 7 Answers