Seams in portaled DIF
by John Doppler Schiff · in Torque Game Engine Advanced · 08/23/2008 (9:47 pm) · 6 replies
Hi guys,
I'm getting bright pink null-texture speckles along the seams of one of my portaled DIFs, like this:

Any ideas what's causing this? My other portaled DIFs don't have artifacts like this.
This DIF is somewhat larger than my others, featuring a lot of empty space (it's a large hangar). It does portal off the zone correctly, and all my brushes are clean and properly formed.
In this dimly lit area, the artifacts stick out horribly.
Any advice would be greatly appreciated!
I'm getting bright pink null-texture speckles along the seams of one of my portaled DIFs, like this:

Any ideas what's causing this? My other portaled DIFs don't have artifacts like this.
This DIF is somewhat larger than my others, featuring a lot of empty space (it's a large hangar). It does portal off the zone correctly, and all my brushes are clean and properly formed.
In this dimly lit area, the artifacts stick out horribly.
Any advice would be greatly appreciated!
#2
I agree, it's almost certainly the null texture showing through. If I remove the portal, the space skybox I use for a background shows instead.
I'd like to identify the source of the artifacts and remove them rather than minimizing them. My other DIFs are pretty good, it's just this monster that makes the artifacts painfully apparent.
In a pinch, I can overlay brushes outside the joints of the external walls' brushes, but ugh! What a crappy, wasteful solution...
Have I mentioned lately how much I *despise* the DIF format and its bugs?
08/24/2008 (2:30 pm)
Oh! I should mention that I'm using the standard DIF export on Constructor -- one of the new map2difplus_TGEA bugs is that it crashes for me every time, every map.I agree, it's almost certainly the null texture showing through. If I remove the portal, the space skybox I use for a background shows instead.
I'd like to identify the source of the artifacts and remove them rather than minimizing them. My other DIFs are pretty good, it's just this monster that makes the artifacts painfully apparent.
In a pinch, I can overlay brushes outside the joints of the external walls' brushes, but ugh! What a crappy, wasteful solution...
Have I mentioned lately how much I *despise* the DIF format and its bugs?
#3
I don't think DIFs are that bad (I'm used to BSP, it's what I learned to design with) but they are a bit .... tempermental.
08/24/2008 (4:10 pm)
If you think it's just happening because of the size of brushes that you're using try segmenting them into smaller ones and see if it makes a difference.I don't think DIFs are that bad (I'm used to BSP, it's what I learned to design with) but they are a bit .... tempermental.
#4
If this is the case, then modifying this at the top of GuiCanvas.cpp
ColorI gCanvasClearColor( 255, 0, 255 ); ///< For GFX->clear
Try changing this to a gray color ( a darker gray usually works best ) - try 96,96,96.
Sometimes, NOT clearing the target is a better idea. (usually this is only a good idea if you have no gui overlays or anything) If you decide to do this, then find this line:
GFX->clear( GFXClearZBuffer | GFXClearStencil | GFXClearTarget, gCanvasClearColor, 1.0f, 0 );
and change it to:
GFX->clear( GFXClearZBuffer | GFXClearStencil, gCanvasClearColor, 1.0f, 0 );
08/24/2008 (4:54 pm)
I'm guessing here, but it looks like the gfx device is being cleared before rendering to magenta, and what you are seeing is purely a gap caused by the difference in rasterization of the two different polygons. If this is the case, then modifying this at the top of GuiCanvas.cpp
ColorI gCanvasClearColor( 255, 0, 255 ); ///< For GFX->clear
Try changing this to a gray color ( a darker gray usually works best ) - try 96,96,96.
Sometimes, NOT clearing the target is a better idea. (usually this is only a good idea if you have no gui overlays or anything) If you decide to do this, then find this line:
GFX->clear( GFXClearZBuffer | GFXClearStencil | GFXClearTarget, gCanvasClearColor, 1.0f, 0 );
and change it to:
GFX->clear( GFXClearZBuffer | GFXClearStencil, gCanvasClearColor, 1.0f, 0 );
#5
@Steve: DIFs are hell. I hate em. They are the single most time-intensive aspect of my art pipeline, the place where the most effort has been expended for the least payoff. The simplest structures I create have dropped faces, and I invariably have to go back and forth between editor and game half a dozen times to tweak brushes. DIFs... ptui! If I could get decent lightmapping on em, I'd use polysoup exclusively. =)
08/25/2008 (7:32 pm)
@Jaimi: As always thanks for the awesome response! I'll try that tonight.@Steve: DIFs are hell. I hate em. They are the single most time-intensive aspect of my art pipeline, the place where the most effort has been expended for the least payoff. The simplest structures I create have dropped faces, and I invariably have to go back and forth between editor and game half a dozen times to tweak brushes. DIFs... ptui! If I could get decent lightmapping on em, I'd use polysoup exclusively. =)
#6
I'd found a tutorial about baking AO into things in Blender, so I guess it would be possible to set up a scene, bake the shadows, then add them as a transparent mesh over the model, sort of akin to how I've seen road decals used on terrain terrain.
I think having an extra mesh with transparent shadows would be better than just baking the shadows straight into the textures because you'd have to have lots of individual textures with a higher texture memory count than some low kilobyte pngs for the extra shadows and low poly shadow mesh.
Shadow materials set to emissive would stop them from being lightened. Obvisouly this would just look really bad if you have a lot of dynamic lights moving around.
That's probably not the greatest use of the English language as an explanation of an idea - but I know what mean!
08/27/2008 (9:12 am)
Actually John, I'd been thinking about a way of faking a lightmap on a DTS. Probably only worth doing for things that are really low poly (but most of my scenery objects are).I'd found a tutorial about baking AO into things in Blender, so I guess it would be possible to set up a scene, bake the shadows, then add them as a transparent mesh over the model, sort of akin to how I've seen road decals used on terrain terrain.
I think having an extra mesh with transparent shadows would be better than just baking the shadows straight into the textures because you'd have to have lots of individual textures with a higher texture memory count than some low kilobyte pngs for the extra shadows and low poly shadow mesh.
Shadow materials set to emissive would stop them from being lightened. Obvisouly this would just look really bad if you have a lot of dynamic lights moving around.
That's probably not the greatest use of the English language as an explanation of an idea - but I know what mean!
Associate Steve Acaster
[YorkshireRifles]
As a work around till an update gets released I've swapped my NULL texture for a GREY50 and given it a basic material setting so it accepts lighting and thus doesn't show up as a bright seam.
new Material(Grey50) { mapTo = "Grey50"; basetex[0] = "Grey50"; };