PDA

View Full Version : Symetry


Gniarf
03-02-2009, 07:50 PM
Hi all,

I'm trying to make a mod that allows to dual wield most weapons. But there is no 3d model for left handed vampguns, for example.
So I'd like to know if there is a function to flip a model left/right. Or maybe stretch it in one direction with a negative factor.

rstratton
03-06-2009, 03:11 AM
u could mirror it if u could get the model into 3ds max or somethin

Gniarf
03-06-2009, 06:16 AM
Funny that you say that exacly when I'm trying the Blender pkmdl importers, who ofc, do not work. Well actually they work for some models, at least I saw the tank and the dual heavy mg, but they fail for the vampgun and the bar1918.

Gniarf
03-06-2009, 02:57 PM
Yipee, I finally found a way:
1-In [name of the weapon].CWeapon you should have something like:

o.Scale = 0.5
o.Pos = Vector:New(0.4,-0.5,-3)
o.Ang = Vector:New(0.15,0.2,0)


well turn

o.Scale = a
o.Pos = Vector:New(b, c, d)
o.Ang = Vector:New(e, f, g)

into

o.Scale = -a
o.Pos = Vector:New(-b, c, d)
o.Ang = Vector:New(e+3.14, -f, g)


(yumm, dual vampguns, vamp shotgun+RL, dual shovels...Here I come!)

Gniarf
03-08-2009, 01:20 AM
Symmetry problem - round 2: whenever I set a negative scale in a .CWeapon file the weapon turns black as if there were no light at all on it.
I looked through the .lua&.CWeapon files, but I didn't find the definition of that light (I used the vampgun as a test subject).

So, does anyone know how to restore the weapons to their normal looks?
Or at least can someone explain me why the weapons are turning black?

rstratton
03-08-2009, 03:22 AM
Symmetry problem - round 2: whenever I set a negative scale in a .CWeapon file the weapon turns black as if there were no light at all on it.
I looked through the .lua&.CWeapon files, but I didn't find the definition of that light (I used the vampgun as a test subject).

So, does anyone know how to restore the weapons to their normal looks?
Or at least can someone explain me why the weapons are turning black?

sounds like it inverts the vertex normals along with the model

Gniarf
03-09-2009, 05:38 PM
1-Thanks.
2-I'm working on it, but I've got a busy RL now.
3-...2 sided texture rendering should do it, right?

Csimbi
03-09-2009, 09:52 PM
I looked through the .lua&.CWeapon files, but I didn't find the definition of that light (I used the vampgun as a test subject).

Not even a reference to some light object(s)?

Gniarf
03-10-2009, 03:17 AM
Save for the muzzle flash and various firing fx, yes - no lights at all.

Gniarf
03-13-2009, 11:54 AM
Ok, I have a few questions:
1-What's the diffrence between 3d mesh and 3d model?
2-What happens if I negate vertex uv coordinates (or rather only u cooridnates)?

Csimbi
03-13-2009, 02:40 PM
Ok, I have a few questions:
1-What's the diffrence between 3d mesh and 3d model?
2-What happens if I negate vertex uv coordinates (or rather only u cooridnates)?
1. My guess: mesh is a raw model - a skeleton if you like - without any particular detail (like texture, dynamics, etc) associated with it.
2. No guess on that one. :-(

Gniarf
03-13-2009, 07:56 PM
hehehehe

..I had to write a special program to parse pkmdl files and invert vertex normals, though...
...And there are still some glitches...for example I wonder where that giant ammo bar popped from...

But, hehe, Gniarf's HaPpY atm.

Csimbi
03-13-2009, 08:30 PM
hehehehe

..I had to write a special program to parse pkmdl files and invert vertex normals, though...
...And there are still some glitches...for example I wonder where that giant ammo bar popped from...

But, hehe, Gniarf's HaPpY atm.

Wow, that's a very impressive screenshot!
The giant bar come from the amount of the ammo in the clips - at least the bars have grown in my Armour of God mod when I increased clip size.

Gniarf
03-13-2009, 08:40 PM
Yeah, but I did not mod clipsize!
I think it was because the weapon was stuck at the reload animation.
After creating a patched pkmdl, you need to copy all the .ani files too and rename them [name of the pkmdl].[name of the anim].ani... And I hadn't done that when I took the screenie, so there was no reload anim (still, I don't get the no reload anim=infinite clip thing, but nevermind)

Dark Knight
03-18-2009, 08:47 AM
hehehehe

..I had to write a special program to parse pkmdl files and invert vertex normals, though...
...And there are still some glitches...for example I wonder where that giant ammo bar popped from...

But, hehe, Gniarf's HaPpY atm.


OMG very nice idea!

and what about two rocket launcher in both hands? :-):-):!:

btw, for dual weapons you should increase ammo capacity:rolleyes:

Csimbi
03-18-2009, 10:24 AM
and what about two rocket launcher in both hands? :-):-):!:
How can you hold two rocket launchers in one hand? ;-)

Dark Knight
03-18-2009, 10:33 AM
How can you hold two rocket launchers in one hand? ;-)

no, i mean One rocket launcher - in each hand. (two hands = two R.L.) :!:
is it possible to realize?

Gniarf
03-18-2009, 05:52 PM
no, i mean One rocket launcher - in each hand. (two hands = two R.L.) :!:
is it possible to realize?
I'm affraid it's TOTALLY Impossible; it would cause a buffer overflow in the PlayerEnabledWeapons array, overwriting part of the AI code, forcing it into 0x00001337DEADBEEF mode...nothing good...


How can you hold two rocket launchers in one hand? ;-)
We can't, but there are other options (http://uk.pc.ign.com/dor/objects/480458/firestarter/images/firestarter_030504_001.html?page=mediaFull)...Damn I wish we had this one. Modelling, anyone?