Game Development Community

Blurry Terrain Materials

by William McDonald · in Torque 3D Professional · 04/23/2012 (5:17 am) · 18 replies

I am having issues with adding new Materials. Everything was working fine at first, I managed to add a variety of textures with detail and normal maps and it was going well. Then I bought the new tropical pack and wanted to add the terrain materials. Though the problem isn't limited to the tropical pack, if I make a copy of a texture of something I've already imported before, under a different name of course, use the same values this weird blur square keeps happening anyway. It worked fine for a while and then BAM no newly imported textures work at all, even stuff I KNOW normally would work.

Here is a blow by blow of what keeps happening.

www.suckerfreegames.com/_william/1.jpg

www.suckerfreegames.com/_william/2.jpg

www.suckerfreegames.com/_william/3.jpg

www.suckerfreegames.com/_william/4.jpg

Any suggestions?

Signed,
William

About the author

I am the grand bureaucrat of SuckerFree Games. I now have one game in distribution, "Kobold's Quest" and another is soon to be published, "Dungeons the Eye of Draconus". My day job is as a Videographer.


#1
04/23/2012 (10:46 am)
One thought that comes to mind is check your video card and drivers.

Does the project compile and allow you to move around in a normal view or is it still blurry?

I know its not much help and I am sure you might have already done this.
I will be watching this posting as on occasion I have some problems with rendering myself.

Regards,
Joe
#2
04/23/2012 (5:56 pm)
My video card and drivers are fine. This is just me in the editor, I put together the materials for over a dozen textures just fine, but whenever I add another one and try to place it, it just makes 1/4 of the map extremely blurred. This happened once before with even fewer materials and I couldn't solve it so I had to create a new project. It's so weird. I've seen 1 other person report this issue back in 2011 and no one helped them either. It's so strange, because it's easy to reproduce I'm wondering why no one has attempted to solve it.
#3
04/23/2012 (6:14 pm)
Hi,

Are all of the terrain textures the same resolution?

What resolution(s) are the different textures?

I had issues which seem similar when using textures which were too large, and with different resolutions. I would add the first texture and things would be fine. Add or paint with a second one and the first texture would become blurry. I settled on 512x512 for all of my terrain textures and was able to resolve the problem. Previously I had larger resolutions on some of the textures, and would end up with really unsatisfying results.

EDIT: I also try to keep the size fields in the material editor small. Larger numbers stretch the texture out more obviously.

Not sure if this helps but I figured I would chime in.
#4
04/23/2012 (6:20 pm)
They are the default textures from T3D, and both the Tropical and Forest packs that just got released. It looks like they are all 512 by 512. It's weird that it effects like 1/4 of the map with that blur though, not just the tiny areas I painted the material.
#5
04/23/2012 (6:36 pm)

Was the terrain generated in T3D or in a different program?
#6
04/23/2012 (7:17 pm)
It was generated in T3D
#7
04/23/2012 (9:57 pm)
Man this is annoying. If I go back to previously made material and change out the textures it works fine. So it only happens when I try to add a new material... So is this some kind of material limit or what?
#8
04/23/2012 (10:38 pm)
Try this:

Create the material in the editor, and before applying it, save the mission and exit. Delete all DSO files within the game directory and then load it again. Should be ok to paint that texture without the blur.
#9
04/24/2012 (12:48 am)
@Dan Webb

Ok I tried deleting the DSO files with the batch in the game's directory. Sadly that didn't work. I've discovered if I make 2 materials the 2nd one onward behaves differently. here is a before painting with the 2nd material and after. Instead of covering 1/4 of the map in blur it only does small squares... What the hell is causing this?!

www.suckerfreegames.com/_william/before.png

www.suckerfreegames.com/_william/after.png
#10
04/24/2012 (3:16 pm)
Make sure that the new materials are being created and saved correctly.
#11
04/24/2012 (3:28 pm)
Check your terrain material file for exact duplicates, corrupt references and also commented out references - I just had an issue with a commented out reference being saved instead of the readable one below, so my terrain always reverted on load.

[edit] what Mike said.
#12
04/27/2012 (12:03 pm)
Sounds like somehow the size or distance values are being fudged somewhere. I tried 3 times and can't reproduce it on my machine from a stock project (1.2).
#13
04/27/2012 (12:57 pm)
Check your materials.cs entry, make sure that it has it correctly saved and that there isnt a redundant ; between the new material and the entries above it.
#14
04/28/2012 (6:20 am)
I can sort of replicate the problem but creating an empty material and painting with it. It effects some parts of the terrain but not others. I hope this video can shed some light on the matter.

#15
04/29/2012 (8:50 pm)
Ok. Here is the materials.cs :

www.suckerfreegames.com/_william/materials.cs

So that bottom one named "newMaterial0" is one I just made which now causes the blur squares. If I make any new material, with any combination of layers, diffuse, detail, normal it ALWAYS comes out as a blury square. What the heck is going on?
#16
04/29/2012 (9:00 pm)
... WTF. Ok, well after repeating the same action what feels like 100 times, magically the builder decided "OK. If you have a detail layer, we'll quite with this blurring headache"... This doesn't make any sense at all. I just suddenly started working again, I've tried this before, there is no reason it should be working now. Yep. Just made another material and it's working... Why it's working now is beyond me. Over a week wasted... Ugh.
#17
04/30/2012 (12:36 am)
Daz, whats happening on your video is because of the lack of a detail/diffuse on the material you made, with a terrain material like that, it sometimes screws up the texturing for the whole terrain sub block.
#18
04/30/2012 (3:52 pm)
new TerrainMaterial()
{
diffuseMap = "art/terrains/Tropic/Beach110";
normalMap = "art/terrains/Tropic/Beach110_NRM";
internalName = "newMaterial0";
};

Thats your problem, its not saved the detail map, thats why it was showing as it did