Game Development Community

TSE interior render questions

by Gordon Walton · in Torque Game Engine Advanced · 06/25/2004 (2:41 am) · 5 replies

I am using the TSE example application that i compiled on my system. I have downloaded the quark6.3 for torque that i found in the resources on garagegames and i am using that. When i create interiors in quark and export them, none of them are drawn correctly. I have taken the orc tower and exported that and it worked fine, i have kept the tower and started to add my own objects to the map and when i use it in TSE it looks like the image below, where the white continually flashes.

www.origination-studios.com/error.jpg
I can't figure out if its a problem with TSE, or quark. I am using the map2dif that came with TSE. Upon examining the output from quark when it builds the map, there are 10 orphaned polygons in the map, and my guess is that the road in my image is an orphaned polygon and TSE isn't drawing them correctly. One of my other simple maps had all 63 polygons orphaned and it all looked like the image i included.

The other question i have is how do i control the shininess of an interior in torque. Having taken the standard orc tower and applied a concrete texture to it, it looks like metal, its shiny and reflects the sunlight. That looks very nice and impressive, but i do want a concrete wall without refelction.

#1
06/25/2004 (2:10 pm)
Does the texture have a shader applied?

If so disable it and see if it fixes it.
#2
06/25/2004 (6:57 pm)
What graphics card do you have?

As for the without reflection wall, just apply a different material to it, one that doesn't have a shiny specular.
#3
06/25/2004 (11:00 pm)
I was experiencing the same issue with interiors exported from Quark 6.4 Alpha. Turns out I had used the wrong name for the material in materialMap.cs and it was only using the texture by the same name. Maybe an issue with something not properly being turned off if the material isn't really a material but just a texture.
#4
06/26/2004 (12:35 am)
If you dont have a material defined for each texture in your interior weird things like that can happen. That's why there's a hackish demoMaterial function in material.cs that generates a basic material for each texture. (I did a custom one that auto loads all the files in certain directories which saves me from adding a material for each texture).
#5
06/26/2004 (12:37 pm)
Yep, it's a missing material problem. The white stuff you are seeing is a "blank" draw that the interior draws to the zbuffer before it draws the interior with all the shaders turned on. That makes it so there is no overdraw on the interior surfaces with shaders - helps out in fill-rate limited situations.

If there is a texture that hasn't been mapped to a material, it falls back to fixed-function and for some reason the verts are off just a tiny bit between the shader "blank" draw pass and the fixed function pass. The result is the white z-fighting.