:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Sun Dec 16, 2018 5:58 pm
All times are UTC + 0
 Forum index » Modding Central » Tiberian Sun Editing Forum
Need help with barrel voxel bounds
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [7 Posts] View previous topic :: View next topic
Author Message
Tuc0
Rocket Cyborg


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Mon Feb 27, 2017 1:12 pm    Post subject:  Need help with barrel voxel bounds Reply with quote

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).

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Feb 27, 2017 2:24 pm    Post subject: Reply with quote

I wasn't aware you can actually give the "hardcoded" EMP cannon turret a barrel. Surprised
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?


emptur.gif
 Description:
 Filesize:  31.75 KB
 Viewed:  1270 Time(s)

emptur.gif



_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Tuc0
Rocket Cyborg


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Mon Feb 27, 2017 4:10 pm    Post subject: Reply with quote

Lin Kuei Ominae wrote:

When you gave it a barrel, did it then tilt the barrel only and kept the turret horizontal?


Yes, logic of tilting and turning is good, only viewing order is the same for all barrels.

Lin Kuei Ominae wrote:

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

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  Smile   ) and second only turret using barrel as section in one vxl, draws nice according to voxel bounds.


turretanim.gif
 Description:
 Filesize:  43.06 KB
 Viewed:  1248 Time(s)

turretanim.gif



barrelanim.gif
 Description:
 Filesize:  55.03 KB
 Viewed:  1248 Time(s)

barrelanim.gif



Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Feb 28, 2017 8:08 am    Post subject: Reply with quote

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

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Tuc0
Rocket Cyborg


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Tue Feb 28, 2017 9:55 am    Post subject: Reply with quote

LKO wrote:
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.


voxelbounds.png
 Description:
 Filesize:  151.65 KB
 Viewed:  1203 Time(s)

voxelbounds.png



HVATURRET.png
 Description:
 Filesize:  31.33 KB
 Viewed:  1203 Time(s)

HVATURRET.png



Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Feb 28, 2017 10:12 am    Post subject: Reply with quote

Tuc0 wrote:
Thin is exactly what I already did for both turret versions.

Ok, then i'm out of ideas. Sad
_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Tuc0
Rocket Cyborg


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Tue Feb 28, 2017 6:27 pm    Post subject: Reply with quote

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.


EMPturret.gif
 Description:
 Filesize:  111.07 KB
 Viewed:  1162 Time(s)

EMPturret.gif



Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [7 Posts] View previous topic :: View next topic
 Forum index » Modding Central » Tiberian Sun Editing Forum
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

Wildcard SSL Certificates
[ Time: 0.1598s ][ Queries: 20 (0.0248s) ][ Debug on ]