Terrain Diffuse texture code help
by Kira · in Torque 3D Professional · 05/27/2009 (4:15 pm) · 12 replies
Hi
Can somebody point us to the location of the Code that controls the tiling of the Diffuse texture,not the detail the diffuse we want see it tile twice not once
Thanks in advance
Can somebody point us to the location of the Code that controls the tiling of the Diffuse texture,not the detail the diffuse we want see it tile twice not once
Thanks in advance
#2
05/28/2009 (7:57 am)
He's talking about the terrain, no? You could easily modify the shaders themselves and multiply the UVs by some hardcoded value. Exposing it to script would be a tad more involved.
#3
The diffuse texture tiling is controlled by the TerrainBlock in the baseTexelsPerMeter setting. This controls for all terrain diffuse textures how many times it will repeat across the terrain.
05/28/2009 (2:24 pm)
Oops... totally missed that the question was about terrain.The diffuse texture tiling is controlled by the TerrainBlock in the baseTexelsPerMeter setting. This controls for all terrain diffuse textures how many times it will repeat across the terrain.
#4
When you are learning your way around this engine you can spend days looking for code , thats one of the most long-winded parts .
Thanks for your help
05/28/2009 (2:45 pm)
Thanks guysWhen you are learning your way around this engine you can spend days looking for code , thats one of the most long-winded parts .
Thanks for your help
#5
With things related to settings in shaders btw its commonly simpler to start with the shader and look for non standard registers and use the bruteforce approach by searching the whole project. The non standard shader parameters are only used in very few cases, making it easy to find them or pointers to where they are beeing set.
05/28/2009 (8:44 pm)
If you believe that you haven't created your own player replacement / ShapeBase descendant yet ;)With things related to settings in shaders btw its commonly simpler to start with the shader and look for non standard registers and use the bruteforce approach by searching the whole project. The non standard shader parameters are only used in very few cases, making it easy to find them or pointers to where they are beeing set.
#6
05/28/2009 (9:44 pm)
I hope that once things stablize with T3D we can get a dump of all the supported shader constants for CustomMaterials and docs on each.
#8
05/29/2009 (3:42 pm)
The code for it is in terrData.cpp, but you can edit it from the mission editor directly... there is no code change needed to change the repeat of the diffuse texture.
#9
Is there meant to be control? because the diffuse in the terrain painter has no options at all except side projection , only the detail has.
05/29/2009 (4:04 pm)
Hi TomIs there meant to be control? because the diffuse in the terrain painter has no options at all except side projection , only the detail has.
#10
05/29/2009 (6:12 pm)
Ah ok Sorry, I thought you meant in the terrain material editor , I found it in the terrain datablock Gui, I got my wires crossed.....................Hmmm not enough sleep
#11
05/29/2009 (6:29 pm)
Is there a way to reduce the blur of the base texture ?
#12
05/29/2009 (6:38 pm)
Its not in the painter... go to the Object Editor mode, select the terrain from Scene Tree, and look for 'baseTexelsPerMeter' in the Inspector window.
Associate Tom Spilman
Sickhead Games
Adding a scale is possible, but IMO its better to get the texture coords right when you export from the modeling app.