Page 2 of 2

Posted: Mon Jul 15, 2013 9:11 pm
by Sleipnir
secret wrote: Another thing: I tried replacing the Tick Tank with a different voxel, but I got this weird bug.
You will need to adjust the Scale property on RenderVoxels. It defaults to 10, which is about right for the default TS and RA2 voxels. I guess that custom model has a weird scale defined internally.
Petrenko wrote:

Code: Select all

Exception of type `System.InvalidOperationException`: Unit `renart` does not have any voxels defined.
There may be an error in your voxels.yaml. I'd need to see that before I could say any more.

Posted: Mon Jul 15, 2013 11:12 pm
by Petrenko
Heyho,

yeah the scale trait works. Just needs a bit of try-and-error.

Also i forgot to add the vpl oder whatever. the other file used for the voxel.

Everything is fine now!

Posted: Wed Jul 17, 2013 8:41 am
by secret
So, yeah, I decided to go with scale 0.5, and it works pretty fine for me, even if it's not very normal. However, there are some issues:
1. The voxel also has a barrel and a turret, but these aren't loaded.
2. There's some weird clipping on other voxels (???)
Here's the code. I'm also attaching the voxel, maybe it's something weird in it's format.

Code: Select all

LTNK:
	-RenderUnit:
	-WithTurret:
	RenderSprites:
	RenderVoxels:
		Image:ttnk
		PlayerPalette:tibsun
		Scale:0.7
	WithVoxelBody:

Code: Select all

LTNK:
	Inherits: ^Tank
	Valued:
		Cost: 6
	Tooltip:
		Name: Light Tank
		Icon: ltnkicnh
		Description: Fast, light tank.\n  Strong vs Vehicles, Tanks\n  Weak vs Infantry, Aircraft
	Buildable:
		BuildPaletteOrder: 40
		Prerequisites: proc
		Owner: nod
	Mobile:
		ROT: 7	
		Speed: 8
	Health:
		HP: 300
	Armor:
		Type: Heavy
	RevealsShroud:
		Range: 6
	Turreted:
		ROT: 5
	Armament:
		Weapon: 70mm
		Recoil: 85
		RecoilRecovery: 17
		LocalOffset: -128,0,85
	AttackTurreted:
	RenderUnit:
	WithTurret:
	AutoTarget:
	LeavesHusk:
		HuskActor: LTNK.Husk
	Explodes:
		Weapon: UnitExplodeSmall
		EmptyWeapon: UnitExplodeSmall

Code: Select all

ttnk:
	idle:

Posted: Wed Jul 17, 2013 10:18 am
by Petrenko
Heyho,

you need to define barrel and turret in your voxels.yaml!

Look:

Code: Select all

ctnk:
	idle:plasmatank
	turret:plasmatanktur
	barrel:mmchbarl

Posted: Wed Jul 17, 2013 10:36 am
by secret
Doesn't work. I've put the voxel in local.mix, then I took care to have the modified local.mix in tibsun.mix. The HVA file is fine.

Don't really know what I screwed up.

Posted: Wed Jul 17, 2013 10:41 am
by Sleipnir
You'll also need to add the WithVoxelTurret and WithVoxelBarrel traits.
The clipping is strange - it doesn't occur with any of the default WW voxels I have tested (which was most of the TS units and a few RA2).
I wouldn't be surprised if the custom editors are taking liberties with the voxel file format, and I also wouldn't be surprised if i missed something important in our loading/rendering code. I'll need to investigate this in more detail when I have some free time.

Posted: Wed Jul 17, 2013 12:09 pm
by secret
Sleipnir wrote: You'll also need to add the WithVoxelTurret and WithVoxelBarrel traits.
The clipping is strange - it doesn't occur with any of the default WW voxels I have tested (which was most of the TS units and a few RA2).
I wouldn't be surprised if the custom editors are taking liberties with the voxel file format, and I also wouldn't be surprised if i missed something important in our loading/rendering code. I'll need to investigate this in more detail when I have some free time.
It works now, however it doesn't load the HVA properly, even if the HVA is correct :|
The clipping occurs on the voxel (the selection box cuts the voxel graphic), but it also occurs as missing colors on other voxels, and sometimes the voxel disappears and it's replaced by 2 intersecting semi-translucent black planes. It's weird. Indeed, I've seen this clipping happening mostly to the CNC mod shellmap, so it might be due to the black and white effect, but I'm no C++/C# expert.

Posted: Wed Jul 17, 2013 4:03 pm
by Petrenko
Funny,

i got about 12 voxels ingame and none are clipping!

Btw: How is the redalert2 pallette called?

A quick reference-table would be nice for:
RA2 Voxel
RA2 Shp
TS Shp

cncVoxels

Posted: Thu Jul 18, 2013 10:19 am
by sillyflip
With OpenRA supporting voxels now I was wondering what the CNC mod would look like if I replaced the shps with their voxel equivalent. So after taking a look at Sleipnir’s Voxeldemo, I quickly put this together. The game plays same except for a few changes to the MRLS and Artillery. I didn't change the MCV or Harvester since their TS voxels look nothing like TD counterparts. The Apache and Chinook remain the same since I can’t get their rotor animation to work.

For installing the mod, the instructions are the same as Sleipnirs Voxeldemo.
https://www.dropbox.com/s/odey7vmgmu0mvhg/cncVoxel.zip

Some screen shots.
http://imgur.com/Q7W3lOK
http://imgur.com/JYMkmZv
http://imgur.com/p1O8FQ5

Posted: Fri Jul 19, 2013 12:40 am
by Sleipnir
That looks really cool sillyflip. Here's a few suggestions:
  • If you add unittem.pal to the bits directory you could remove the dependencies on the ts mix files which would make it much easier to install.
  • You can also change MHOW to use WithVoxelBarrel and define Recoil and RecoilRecovery on the armament to make the barrel recoil when it fires.
  • Everything in ts is about 33% bigger than C&C, so setting Scale: 7.5 should keep the units inside the cell boundary.
  • You can play with LightAmbientColor and LightDiffuseColor to improve the lighting. I would start with maybe LightAmbientColor: 0.5, 0.5, 0.5 to make everything a bit darker.

Posted: Sun Jul 28, 2013 2:07 am
by sillyflip
Ok I followed Slephnir's suggestions and did the following
  • Added unittem.pal.
  • Reduce the size of most of the units.
  • Nod's Artillery works like the original again, also the barrel will recoil now.
  • Applied LightAmbientColor and LightDiffuseColor to all voxels, though I still have to ticker a bit with the values more.
I also added the Orca, Apache, and Chinook. (using rotors.shp for the rotors). They look ok...
http://i.imgur.com/4naN240.png
Download
https://dl.dropboxusercontent.com/u/390 ... el0727.zip
Just unzip it to the OpenRA mods folder.

Posted: Sun Aug 11, 2013 10:00 am
by xan2622
I tried to load the mod but it makes OpenRA (playtest 20130804) crash (I couldn't even start the mod).

Posted: Sun Aug 11, 2013 12:33 pm
by Matt
Better try latest bleed. It comes with a Tiberian Sun test mod.

Posted: Sun Aug 11, 2013 4:07 pm
by sillyflip
Updated to work with the latest playtest.

https://dl.dropboxusercontent.com/u/390 ... el0806.zip