3d Decals and Transparancy

Have a question, suggestion, or comment about Aleph One's features and functionality (Lua, MML, the engine itself, etc)? Post such topics here.

3d Decals and Transparancy

Post Sep 21st '16, 00:28

I was having some fun with 3d replacement stuff, including a decal used in place of a death sequence for a monster. 3d object, just a simple plane with a transparent skin. It looks okay for the most part, but the only problem is that overlapping these causes the rendering to trick out. Is there any way around this? How does the renderer mash this stuff together?

Image

The image in question:

Image

The MML:

Code: Select all
   
<model coll="3" seq="5" file="frog.obj" type="obj" scale="600" x_rot="0" y_rot="0" z_rot="180">
      <skin clut="-1" opac_type="1" normal_image="frog.png"/>
</model>


So far, I've played around with parameters in MML, but nothing seems to be helping. I figure it's just that the engine is having a bad time trying to sort out two models occupying the same area (or space, if it wasn't flat). I had good luck with decals back during the MPDX days strictly because those were scenery objects and I didn't expect to place them overlapping.

Also there's some issues where the object crosses a polygon line, as is tradition. The interesting thing is that in the case of crossing the polygon line, the portion outside seems to have its transparency inverted, which is weird and amusing.
User avatar

Kuurin

Post Sep 21st '16, 03:57

Sometimes what is happening when a decal 3d object crosses a poly is that the transparency is being applied not to the object, but to the map geometry outside of the object's own poly.

See here:

Image

That orange stuff you see with the bloom is a landscape. It clipped right through the map. The poly the object is actually on is at 0% lighting, to help me suss out some things with another project's glow map, hence the darkness.
User avatar

Kuurin

Post Sep 23rd '16, 03:00

I have encountered the same issue when doing shadows for 3d scenery. I think the first issue lies in Aleph One using less effective (but a lot cheaper) depth sorting for 3d models, it can't render overlapping transparency.

For the second issue, I've only seen it show up with areas of dense map geometry when the object goes over multiple sectors.
User avatar

General Tacticus

Post Sep 24th '16, 04:42

This makes me want to do bullet decals so hard. Eeee
User avatar

Zott
Earth

Post Sep 25th '16, 14:03

General Tacticus wrote:I have encountered the same issue when doing shadows for 3d scenery. I think the first issue lies in Aleph One using less effective (but a lot cheaper) depth sorting for 3d models, it can't render overlapping transparency.

For the second issue, I've only seen it show up with areas of dense map geometry when the object goes over multiple sectors.


So much for shadows (good level name there, I think.) The funny thing about the second thing is that you could have even just two polys and a 3d object over their line and it will still cause hell, as seen in this case.

Zott wrote:This makes me want to do bullet decals so hard. Eeee


I don't think I've ever seen vertically oriented decals have the same problems. With some support Lua to align them to a side, it could work. I mean, you'd be wasting a scenery object to do it that way, but I know I've done vertically oriented decals and those looked okay. You'd need a horizontal and vertical decal, and also you'd need to do some checking on map geometry to place them properly, but you could do it, until you overpopulate the map with scenery by unloading a clip or two.

One issue I have is that with scenery, the original way to get multiple random objects would be to have a sequence with a bunch of different frames and then set the animation mode to display one at random. When you create replacements with 3d objects, you're mapping the entire sequence to the object though. Now, I very dimly suspect with an animated 3d object, you could get the random display sequence mode to do something like that, but since the only references I have seen for animated 3d scenery date back to the old days... Anyhow, it probably wouldn't be a very elegant solution, to say the least.
User avatar

Kuurin


Return to Aleph One Discussion



Who is online

Users browsing this forum: HunterOfShadows