Positioning Models (first and third person)

So I finally got my model in-game thanks to simonjb and now I need to position it to look right.

Right now here are my results:
Prop:

http://img27.imageshack.us/img27/5686/stoner63.png

Third person:

http://img717.imageshack.us/img717/3862/thirdpersonstoner63.png

First person: - My texture for some reason is applying over and over… I am not sure why

http://img11.imageshack.us/img11/8879/firstpersonstoner63.png

As you can see my third person is positioned at my crotch and my first person is blocking my view.

I think I have to compile it with some bones etc but I need some help on where to get these resources and what to do.

Although I have found this script(Kogitsune posted)which will probably give me results, I want to to do this the proper way.



SWEP.Offset = {
	Pos = {
		Up = 0,
		Right = 0,
		Forward = 0,
	},
	Ang = {
		Up = 0,
		Right = 0,
		Forward = 0,
	}
}


function SWEP:DrawWorldModel( )
	local hand, offset, rotate
	
	if not ValidEntity( self.Owner ) then
		self:DrawModel( )
		return
	end
	
	if not self.Hand then
		self.Hand = self.Owner:LookupAttachment( "anim_attachment_rh" )
	end
	
	hand = self.Owner:GetAttachment( self.Hand )
	
	if not hand then
		self:DrawModel( )
		return
	end


	offset = hand.Ang:Right( ) * self.Offset.Pos.Right + hand.Ang:Forward( ) * self.Offset.Pos.Forward + hand.Ang:Up( ) * self.Offset.Pos.Up
	
	hand.Ang:RotateAroundAxis( hand.Ang:Right( ), self.Offset.Ang.Right )
	hand.Ang:RotateAroundAxis( hand.Ang:Forward( ), self.Offset.Ang.Forward )
	hand.Ang:RotateAroundAxis( hand.Ang:Up( ), self.Offset.Ang.Up )
	
	self:SetRenderOrigin( hand.Pos + offset )
	self:SetRenderAngles( hand.Ang )
	
	self:DrawModel( )
end


I also had to really cut down on my models complexity for some reason. I had to go from this(shown below) to what you see in game. I really do not think it is that complex but I had way to many vertices and I couldn’t even compile.

http://img541.imageshack.us/img541/9756/preview11.png

Open up the source SDK content and look at existing weapons.

ummmm, why? I can’t see how they positioned things… I know that they have arms connected and that is how i see a arm if i wanted to add one butttt even if I added how would it get positioned?

I mean I do not know how to properly add the bones etc so I still need help with that and that might be what I have to do so please point me to a tutorial or explain…

Well it shows you the bones to witch you need to rig it. Also as the complexity goes - your ingame model looks boxmodelled whereas the render you’re showing looks like a turbosmoothed version of the box model.
Suffice to say it’s not smart to use turbosmooth, or anytthing that adds massive polygon numbers on a game model.

Alright I will try to decompile and open and see what is going on.

Also I have no idea what you are talking about when it comes to smoothness. That is just rendered in cinema 4d and the other is just in-game of garrys mod.

I did have to lower the amount of segments on cylinders, etc and combine faces to finally get it to compile…

Any good rigging tutorials or how to do bones, etc?

After a little wraithcat he told me that I should decompile an existing model and rig it to the already made bone structure. After a few decompilations of several weapons including the iRifle and shotgun I have a couple of questions. Which smd do I merge my existing model with and how do i rig it? I also decompiled the shotgun which has many different animations and the qc file is quite intricate. After opening the shotgun files it is very different from the iRifle since the shotgun just is a hand while the iRifle has the AR2 model and a body spline in it.

Could anyone please just make a simple gun and make a tiny tutorial on how to rig it to an existing structure/model.

I can fix the world model the right way but I can’t do anything with view models. Reply with your steam name and I’ll add you. I’m Sen3<3.

Replied to the email you sent.

sentrygunman showed me this topic which would work but my Sofimage 2012 isn’t compatible with the plugin.
http://www.facepunch.com/showthread.php?t=851426

I have decompiled models with the bone structures in them. So how do i add my model to the decompiled ones and rig it up?

Just wanted to give a quick update. I installed XSI Softimage 6.01 so that I could use the plugin but after following this tutorial(http://www.facepunch.com/showthread.php?t=851426) I cant export because the ValveSource menu doenst have it. Every time I open up that menu it also shows me an error.

http://img684.imageshack.us/img684/3923/erroryy.png

If I could do all the rigging and bone stuff in another modeler then that would work to.