Game Development Community

Terrain in TX3D

by Jeff C. Huff · in · 10/28/2008 (12:56 pm) · 6 replies

If a person creates Legacy Terrain Data via TGE is that method valid for just the height data only? In other words in the Terrain Editor of TGE you can paint different textures onto the various surfaces of you terrain. Is there anyway to get those texture assignments to Torque X?

Thanks,
Jeff

#1
11/14/2008 (6:51 am)
Okay, we seemed to be having a import error in the process but now have textures coming in now!

My question now is if anyone else has experienced a problem bringing in more than 4 textures at once? 4 come across, the 5th one doesn't!

Thanks,
Jeff
#2
11/14/2008 (5:42 pm)
Wish I could help with this one, but I cannot provide any definitive answer... I can see by looking at the code that there is no built-in limit to how many textures are read in, and I don't see anything obvious that would indicate that TX is limiting how many it will render, but the TX rendering pipeline is a little too hard to follow for me to say for certain.
#3
11/17/2008 (10:13 am)
By the way, the RAW terrain example code in the book does not work. I didn't save the exact error text, but it should be relatively easy to reproduce. If needed, I can revert back to that code to provide the specifics.
#4
11/19/2008 (8:54 am)
Quote:My question now is if anyone else has experienced a problem bringing in more than 4 textures at once? 4 come across, the 5th one doesn't!

I was wrong. There is a hard-coded limit on the number of blended textures: MaxBlendedTextures = 4
#5
11/19/2008 (9:16 am)
So if a person has the Pro Version that limit could be increased? What file was this found in?

Thanks,
Jeff
#6
01/02/2009 (7:15 pm)
It's actually more complex than just changing the value of that constant. Those textures are'read in, sent to the shader, used in the shader. You'd have to change all of the code that references the textures within the terrain engine.