Posted: Mon Feb 27, 2017 1:12 pm Post subject:
Need help with barrel voxel bounds
I decided to make some better turret for TS emp cannon, like in game movies or cameos. After many hours I finally found how voxel bounds work to display correctly in game. For turret testing, voxel viewed perfectly, but when I added barrel voxel with correct bounds (tested it as imported section for turret), it completely ignores bounds for turret and draws with default behavior. For W,SW,S,SE directions it draws strictly before turret and oppositely for E,NE,N,NW facings. Is this voxel drawing hardcoded for barrels? Or is there any way to make it draw based on voxel bounds ? (like some rules/art INI keys or in voxel section options). QUICK_EDIT
I wasn't aware you can actually give the "hardcoded" EMP cannon turret a barrel.
After all it's the only turret which has the hardcoded behaviour of tilting up (not the barrel) and waiting before firing.
I think the problem with the render layer is a general issue. The Titan has it with its voxel barrel too.
There are no art.ini keys/sections for voxel turrets/barrels.
The only keys are the following rules.ini keys (copied from juggernaut)
BarrelAnimIsVoxel=true
VoxelBarrelFile=DJUGGBAR
VoxelBarrelOffsetToPitchPivotPoint=15,0,-8
VoxelBarrelOffsetToRotatePivotPoint=2,0,0
VoxelBarrelOffsetToBuildingPivotPoint=4,2,3
VoxelBarrelOffsetToBarrelEnd=350,75,0
VoxelBarrelScale=.75
StartFacing=4 ; DIR_S = 4 << 5
StartPitch=2 ; DIR_E = 2 << 5
When you gave it a barrel, did it then tilt the barrel only and kept the turret horizontal?
Those setting are seems to be necessary only when one of barrel/turret is not voxel.
Here below are my two results, one is turret with barrel with wrong draw (also firing FLH is bad ) and second only turret using barrel as section in one vxl, draws nice according to voxel bounds.
Why is the turret only version not tilting up when firing?
What you plan there isn't possible in this way anyway, because
-the game orders voxels only via center point and bounds of each voxel/section
-it does not order visibility layers for each tiny voxel cube individually when facing 2 separate voxel/sections.
Thus the arch going over the turret can't work this way as a single voxel/section.
The only thing you can do is splitting the turret up in several sections, to make it clear for the engine which part is in front of each other.
So you have as separate sections
-the base of the turret
-the left column going up to the arch
-the right column going up to the arch
-the top part of the arch
and then place them right via the hva, so it's clear for the engine that the arch is for example always on top most.
To get the barrel placed correctly inside those sections is another issue and all this probably needs a lot of trial and error to get the bounds, header and position of each voxel right.
possible problem that could occur then:
Lets assume you got the barrel correct inside the multi section turret and it also is rendered right when the barrel is horizontal/idle.
But when tilting upwards, the barrel bounds could go above the arch section bounds, thus the arch being rendered behind the barrel. So you have to adjust the voxel/sections again. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Why is the turret only version not tilting up when firing?
Propably using TurretAnim=.....TUR name (PULSCAN was before)
LKO wrote:
The only thing you can do is splitting the turret up in several sections, to make it clear for the engine which part is in front of each other.
So you have as separate sections
-the base of the turret
-the left column going up to the arch
-the right column going up to the arch
-the top part of the arch
and then place them right via the hva, so it's clear for the engine that the arch is for example always on top most.
To get the barrel placed correctly inside those sections is another issue and all this probably needs a lot of trial and error to get the bounds, header and position of each voxel right.
Thin is exactly what I already did for both turret versions. Created voxel bounds in vxl editor. It was necessary to give left/right towers a lot larger bounds, because engine draws first that sections, which bound prism is closest. Pic. bellow. And then adjusting in hva builder.
Also tried using another index for barrel, but it gave me nice IE.
I also got idea to create hva animation for turret or barrel, with tilting up frames, but sadly I was not able to find any way to make it play voxel animation.
I think I will stay with turret only solution, still looks better for me than default one.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum