Shading on DTS
by John Doppler Schiff · in Torque Game Engine Advanced · 08/08/2008 (8:42 am) · 6 replies
Hi guys,
I have a bit of a noob question here. I've got a rough cube made up of 64 smaller DTS cubes. Seen in-game, the shading is wonky:

(The shaved corners and divot in the top are intentional. The checkerboard pattern isn't.)
I'd like the cube's faces to appear as a continuous surface. How can I eliminate or remove this tiling effect?
Thanks in advance!
-- JohnDopp
I have a bit of a noob question here. I've got a rough cube made up of 64 smaller DTS cubes. Seen in-game, the shading is wonky:

(The shaved corners and divot in the top are intentional. The checkerboard pattern isn't.)
I'd like the cube's faces to appear as a continuous surface. How can I eliminate or remove this tiling effect?
Thanks in advance!
-- JohnDopp
#2
Ideally, I'd make a custom renderable object and use a web of nodes to build its mesh shape... but that's a bit beyond my programming skills right now. Instead, I'm using multiple DTS's with the hidden meshes resource.
I haven't a clue how to deal with the lightmaps. I tried making them emissive surfaces, which got around the lightmap striping, but it's difficult to make out the depths of the indented sections without some kind of shading.
Any suggestions?
08/08/2008 (1:03 pm)
Yeah, it's part of a puzzle where the player has to shape the cube into a specific configuration. It needs to be modular because there will be different variations on the puzzle layout.Ideally, I'd make a custom renderable object and use a web of nodes to build its mesh shape... but that's a bit beyond my programming skills right now. Instead, I'm using multiple DTS's with the hidden meshes resource.
I haven't a clue how to deal with the lightmaps. I tried making them emissive surfaces, which got around the lightmap striping, but it's difficult to make out the depths of the indented sections without some kind of shading.
Any suggestions?
#3
08/12/2008 (4:10 pm)
Well, the problem is resolved. I had certain modifiers applied to the cube segments in 3DS Max. When I removed those skin and deformation modifiers, everything exported beautifully.
#4
08/12/2008 (4:57 pm)
DTS shapes do not have lightmaps by default. The normals weren't right.
#5
Solutions for it, are to not use skin if its not needed like you found, or (at the cost of higher poly counts) to add more edges near the edges of the cubes, so there's more vertices to interpolate the normal across. The edges would still be a bit rounded looking, but it would help limit the effect to the edges of the cube.
08/12/2008 (5:24 pm)
Dts shapes exported with the skin modifier only support a single smoothing group for the mesh(es) with skin applied, even if there are multiple setup in 3ds max. The lighting effect you're seeing is from the normals trying to be smooth across the sharp 90 degree angles that make up the cube's edges.Solutions for it, are to not use skin if its not needed like you found, or (at the cost of higher poly counts) to add more edges near the edges of the cubes, so there's more vertices to interpolate the normal across. The edges would still be a bit rounded looking, but it would help limit the effect to the edges of the cube.
#6
Thanks for the clear explanation, Matt! Hopefully, some other brain-impaired coder will benefit from my stupidity. =)
08/13/2008 (8:53 am)
Doh! You're absolutely right, Ben, my brain's not firing on all cylinders.Thanks for the clear explanation, Matt! Hopefully, some other brain-impaired coder will benefit from my stupidity. =)
Associate Steve Acaster
[YorkshireRifles]
I think it's because each cube not only has it's own lightmap - but they don't cast shadows onto each other. DTS just doesn't do that in the way DIF does.
I take it these cubes have to be 64 seperate models and DTS then?