Author Topic: Request: "Transparent" ship flag  (Read 3019 times)

0 Members and 1 Guest are viewing this topic.

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Request: "Transparent" ship flag
Woud it be possible to have a ship flag like "Transparent" that will pass the model render flag MR_ALL_XPARENT to the renderer for that ship?

It's a flag in the ship lab already:


And as far as I can tell, it's used for subspace and the starfield POFs.

TI needs something like this to get clouds to behave themselves and not completely hide anything behind them, and I can easily imagine a number of other places something like this would be very handy. :)
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Request: "Transparent" ship flag
How about using transparent maps (-trans) ?
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: Request: "Transparent" ship flag
I've tried using all sorts of transparency I could think of - all of them suffer the same general problem that they act as an opaque surface and conceal objects behind them.

-tans came closest. It rendered the ships in front of it instead of wiping them out of the scene, but it also tinted the clouds bright, glowing blue from the sky/water (it uses additive alpha blending AFAIK).

To be honest I don't really know how this MR_ALL_XPARENT renderer flag would look when used on actual model pofs rather than skyboxes, but it looks about right in the ship lab, so I can only hope it doesn't completely hide stuff behind it, nor render things that are behind it as if they were in front of it. :\
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Request: "Transparent" ship flag
Hmmm...

Did you try 32-bit -trans maps (or plain 32 bit map)? Or did you assign shine map to it? If you didn't then it IIRC uses the 'default' shine map instead of being 'non-glossy' color (that might have some influence, i guess)
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: Request: "Transparent" ship flag
if trans does not get you what you want MR_ALL_XPARENT won't either.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • FLAMES OF WAR
Re: Request: "Transparent" ship flag
U...ghost ships!  :nervous: :shaking:
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: Request: "Transparent" ship flag
if trans does not get you what you want MR_ALL_XPARENT won't either.
Awww. :(

Well is there any way at all we can affect the render order of ships in a mission? Texture types, names, order in ships table, anything? In fact, should -trans in theory be able to do this?

It's the only issue left really - they either appear behind the object, or they completely hide the object from sight, even though you can see the much larger 'ground' pof through the spot it should be.
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: Request: "Transparent" ship flag
Aha; with some testing, we've found the source of the problem with -trans textured ships.
As our initial hunches suggested, it *is* to do with the radii of the objects involved. It works correctly for the ground because the clouds are a smaller model than the ground.

What's happening appears to be that if you have a -trans textured object, and move a smaller object behind it from the edge, it begins working correctly; the smaller object is rendered behind the larger -trans one until the entire object is a small distance inside the radius, at which point I guess Fred and the game says 'totally hidden...click'.

After that the small object begins rendering IN FRONT of the -trans textured object.
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: Request: "Transparent" ship flag
it has to do with the way FS orders objects, the render order is front to back, so objects closer to the screen get drawn first, this is so polies in the back never waist the graphics card's time with having to have there contents drawn to the back buffer. the only way to truly solve this is to have a ship flag denoting if an object is transparent, and if it is it (and every other transparent thing) get's drawn after everything that's not transparent, but in back to front order, this would work down to the texture level, were textures which are transparent are drawn after non-transparent ones and the polygons get drawen back to front rather than front to back. and there are of course z buffer issues involved.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

  

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Request: "Transparent" ship flag
you know that style of rendering would be awesome for rtt displays for scanners and stuff. you could do say, a fog radar overlay where ghosted ships draw on your hud until you get close enough to actually see the ship. or bridge readouts. theese are all ideas for the post-shader scp though.

you could create a camera in scripting, set render options (what you want to render and with what effects or styles), pass it on to a render target, which then can be drawn to a texture for use on the hud or on polygons.
« Last Edit: July 11, 2007, 05:37:26 pm by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN