trouble with vaporTrails

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

How to make vapor trails looks better ?
why the vapor trails of this weapon looks messed up ?
It's a missile launcher with vapor trails that lanches 6 missiles at the same time

Can somebody tells me (if possible) how to make the trails looks better when the missile are not lock onto a target ? Currently 3 of them are shot straight and 3 are diagonal, and I don't know why.
Maybe it's just a limitation of the vaportrail effect.

Here is the weapon... :D

Code: Select all

		<!-- Napoleon Launcher -->

	<ItemType UNID="&itNapoleonLauncher;"
			name=				"Napoleon Launcher"
			level=				"6"
			value=				"19000"
			mass=				"4500"
			frequency=			"rare"
			modifiers=			"MajorItem; Launcher; Ammo; Specialty"

			description=		"The Napoleon is a 6 muzzled missile launcher, each ammo cartridge contains 6 mini missiles that automatically track on the nearest target."
			>

		<Image imageID="&rsItems1;" imageX="0" imageY="480" imageWidth="96" imageHeight="96"/>

		<Weapon
				fireRate=			"30"
				powerUse=			"10"
				 
				launcher=			"true"
				>

			<Missiles>
				<Missile ammoID="&itNapoleonMissile;"
						type=			"missile"
						lifetime=		"120"
						damage=			"blast:1d6+2; WMD4"
						missileSpeed=	"50"
						maneuverability="2"
						directional=	"true"
						hitEffect=		"&efFragmentationExplosion;"
						sound=			"&snMissileLauncher;"
						vaporTrailLength="40"
						vaporTrailWidth="110"
						vaporTrailWidthInc="5"
						vaporTrailColor="0xff, 0x00, 0x00"
						>

					<Image imageID="&rsMissiles2;" imageX="0" imageY="0" imageWidth="32" imageHeight="32" imageFrameCount="0" imageTicksPerFrame="0"/>

					<Fragment
							count=			"5d6"
							type=			"missile"
							lifetime=		"5"
							damage=			"blast:1d6+2; WMD4"
							missileSpeed=	"5-48"
							>
							
						<Effect>
							<ImageAndTail 
									imageID=			"&rsMissiles4;" 
									imageX=				"0" 
									imageY=				"0" 
									imageWidth=			"16" 
									imageHeight=		"16"
									imageFrameCount=	"4"
									imageTicksPerFrame=	"1"
									
									length=				"32"
									width=				"8"
									primaryColor=		"0xff, 0xff, 0xff"
									secondaryColor=		"0xc0, 0xc2, 0x85"
									/>
						</Effect>
					</Fragment>

				</Missile>


			</Missiles>

			<Configuration aimTolerance="5">
		<Shot posAngle="-90" posRadius="10" angle="-3"/>
		<Shot posAngle="90" posRadius="10" angle="3"/>
		<Shot posAngle="-90" posRadius="5" angle="-2"/>
		<Shot posAngle="90" posRadius="5" angle="2"/>
		<Shot posAngle="0" posRadius="0" angle="-1"/>
		<Shot posAngle="0" posRadius="0" angle="1"/>
		
		
		
	</Configuration>
			
		</Weapon>

	</ItemType>
		
		
	<!-- Napoleon missile -->

	<ItemType UNID="&itNapoleonMissile;"
			name=				"Napoleon missile"
			level=				"6"
			value=				"40"
			mass=				"40"
			frequency=			"uncommon"
			numberAppearing=	"8d20"
			modifiers=			"Consumable; Missile"

			description=		"The Napoleon is a non military multi missile compatible with the Napoleon Launcher. Each cartridge contains in 6 mini missiles."

			sortName=			"Napoleon.20"
			>

		<Image imageID="&rsItems1;" imageX="0" imageY="96" imageWidth="96" imageHeight="96"/>
	</ItemType>
:D
User avatar
Cygnus.X1
Militia Lieutenant
Militia Lieutenant
Posts: 245
Joined: Sun Feb 24, 2008 6:21 pm
Location: Elysium Fields... I mean System
Contact:

I think it's a limitation of the GFX rendering engine. I've noticed in my experiments that the vapor trails are limited to 16 directions (or something like that), so if you are 1 'tick' from a cardinal direction, the vapor trial comes out in a cardinal direction even if the missile was fired at, say, 95 degrees (just past cardinal East).

hard to explain :roll:
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

so, I have to use only certain angles to get a nice pattern.

I will experiment with that a little
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

OK, so I tested some configuration and I cannot manage to get the vaporTrails do what I want.

Example, I'm using the weapon posted before with this configuration:

Code: Select all

<Shot posAngle="0" posRadius="0" angle="-27"/>
		<Shot posAngle="0" posRadius="0" angle="27"/>
		<Shot posAngle="0" posRadius="0" angle="-18"/>
		<Shot posAngle="0" posRadius="0" angle="18"/>
		<Shot posAngle="0" posRadius="0" angle="-9"/>
		<Shot posAngle="0" posRadius="0" angle="9"/>
Ships is static however the trails are moving to the left.

Some of them are misaligned, just as the trails source is the top left corner of the playership image.

Image
Image
Image
Image
Image


And here I made an overlay of all the images where is clear that the trails are going left.
Image
http://img6.imageshack.us/img6/5048/overlayds0.png
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

More problems/glitches

even with 1 single trail:

if the ship is facing at angle 0 (up) the trail is rendered with a considerable delay.
if the ship is facing at angle 180 the trail is NOT rendered.
if the ship is facing 90 or 270 it seems that the trail is rendered 2 times for each missile.
User avatar
Cygnus.X1
Militia Lieutenant
Militia Lieutenant
Posts: 245
Joined: Sun Feb 24, 2008 6:21 pm
Location: Elysium Fields... I mean System
Contact:

bug report: graphics rendering engine -> missile vapor trails -> specific ship radians causes counter-intuitive behavior :roll:

That's some tricky screen-shot-ery, I'm impressed!

But it doesn't help except to prove that you aren't crazy, the expected behavior really is off.

I've notice the missing vapor trails at degree 0 before too when tweaking the Phaser weapons, somewhat fixed by increase effect's 'width' attribute, but still incredibly noticable.
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Nice debugging.

I think there are two things going on:

1. Vapor trails are aligned to one of the 20 rotations.
2. The code for painting polygons has some edge conditions that cause them to paint improperly when they are small.

I've fixed both for the next version.

[And BTW, sorry, but I don't have a firm date for the next version yet. But I'm definitely working on it.]
User avatar
Cygnus.X1
Militia Lieutenant
Militia Lieutenant
Posts: 245
Joined: Sun Feb 24, 2008 6:21 pm
Location: Elysium Fields... I mean System
Contact:

falls over stunned

Hi George! Nice ta meetchya! :D [/i]
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

Thank you very much, George. :D
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

Oh, I think it should be mentioned that the same problem appears when a "bolt" type weapon (of at most intensity 3) is drawn. When facing (0 and 180 or 90 and 270, I forget which, probably the first), the bolt is not drawn, and it increases in width and visibility until you get to an alignment perpendicular with the first.

I'd think this is caused by the same problem George stated above.
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
Post Reply