Jump to content
Oovee® Games

Archived

This topic is now archived and is closed to further replies.

Tattoo

...

Recommended Posts

Guest freeman

I recommend you use Xporter (link: http://mofo.pns.to/wibs/#5) and 3DS Max 2012 if you want to import models and study them. I've tried Max 2014 and that importer and it seems to mess up the model. I've tried converting the x files to other formats and the mesh always comes out wrong (missing/transparent faces). Use the same plugin to export as well. I haven't been able to get any of the other exporters (panda, etc) to work properly. When I'm back at my vomputer I'll post a picture of a hmmwv with independent suspension and other object that shake to show you what the skin (envelope) looks like. 

Share this post


Link to post
Share on other sites
. ← I thought this video was helpful. I'd also like to see a ifs setup, cause I'm having trouble getting mine to move the way i want it too

Share this post


Link to post
Share on other sites
Guest freeman

Thanks. I was wondering about this. I've been reading a lot in here and found this already as well and yes, the model is all screwed up. I also found out about another program that converts an X file into other formats. It's called 3dwin5. This worked well for getting a better model. I just used this and imported it into the scene with the one imported with Xporter. That was good enough. I just wanted to see how many polys the models were. I didn't think they would be very high but was curious.

 

What I needed to know the most is about the bones. The Kraz seems to have all the bones imported but am not sure. I posted in the other thread that I found how to setup the bones for an axle but not the whole truck and that's what I need to know.

 

@stetson - I seen videos like that but would not know how to transition that over to this. I think it would be better tho because using a skin modifier deforms the springs kinda funky. So I'm wondering if an IK Solver or Constraints for the bones would be a better way. I just don't know how to use them. For now, using a skin modifier will be sufficient.

 

Here's the envelopes for each axle on the kraz: 

0eMjMzN.png

u4QtajO.png

SWPZWKJ.png

 

And the independent suspension envelope of the hmmwv: 

 

zBWmDN9.png

 

EDIT: Here's all the bone locations on the kraz: 

MbzytCT.png

 

JUsClbP.png

 

As you can see there isn't a lot of bones to make the suspension work. There's one in each axle and two in the frame. Then there's a bone for each of the things they want to shake (rattle) while the truck is moving about. 

Share this post


Link to post
Share on other sites
Guest freeman

Yes, I've seen where the bones are but thanks for posting them. Now did you setup the bone skins on the Kraz because when I imported it into 2014, there is no skin modifier on any parts. And the amount of red on the axles in your images looks like it works different than in 2014. The vertices of the cage are very spread apart either in your images.

 

What has me puzzled or not knowing is how to get just the parts of the axles that I want to move set the bone and made red. I'll have to post an image to show what I mean. See the difference in my image. Mine shows the vertices highlighted and yours show the faces highlighted or colored red. Mine also has blues and yellows. So I'm wonder why. Is it different in 2014? I don't have 2012 so I'll just have to hope this works well.

 

Another thing I'm wondering about is the difference in the bones used on the Kraz that was imported and the bones used for this suspension in these images - How to open/edit .x files?  nicossalonso uses bones on the springs too when there aren't any on the Kraz springs.

 

The way the hmmwv is all red and just the springs are yellow has me wondering as well. It seems your version of max is using faces where mine is using vertices. Is that correct? I'll just have to mess with it more to see what I can figure out. I'll also see what I can find in these forums about this.

 

Thanks again for taking the time to post them images.

 

Well, I tried 3ds max 2014 because I was having trouble with the mesh on the hmmwv initially. So I tried it there to see if anything was different. The bones and the skin envelope looked completely different in max 2014, so I can't say I'd trust any x file that was imported on max 2014. I even tried converting the mesh in an online converter but it messed up the mesh every time. The hmmwv is completely red because the bonechassis bone is selected. If I select one of the axle bones it'll look more like the kraz, but it'll only show that axle. The chassis bone also conveniently shows the bones for the d-links, mirrors, and the whip antenna. I do know in 2012 max that there is an option on the right-hand side when messing with the skin modifier to color all weights/vertices/etc and you'll get an image that looks more like what you posted (with multiple colors). There is also the option to color the vertices or the face of the mesh. It all depends on your settings how it'll show up. It probably doesn't matter how many or how few bones you use to get the desired effect.

 

EDIT: There is also a thing called a weight table where you can edit the individual vertices. So, you could select the field of vertices on your suspension that you'd like to modify and open them up in the weight table, show selected vertices, and modify their values.

Share this post


Link to post
Share on other sites

FWIW 3dsMax 9 (thats 9, not 2009...)  with Xporter works fine. And thanks to y'all (and nico) I managed to get some animated axles :D

Share this post


Link to post
Share on other sites
Guest freeman

Yeah, I tried all that freeman and it didn't change anything. I did notice that some of the vertices changed or highlighted but not the color. I'm gonna have to do a Google search on these bones setup and see what I can find. I'm in no big rush right now. I got tired of messing with it yesterday and got in a game. I'm still trying to get all the achievements. I've only had the game for just over a week now so I'm trying to learn the maps better too. I went thru them all already and know them somewhat, Coast I can play blindfolded practically but not the rest.

 

I don't have that version PressureLine. 2014 works good enuf. It seems buggy and sluggish tho. I'm not liking it. After the 30 days are up. I'll probably go back to 2010. I have no problems at all with that version but will miss the new features of 2014 which really isn't that much to make a big difference.

 

I'll figure something out. I know someone I can ask but just don't like bothering him too much. He works in Max for a living so I'd imagine he'd like to leave the office at work, ya know, so I don't bother him much unless it's something I just can't figure out. I might have to ask him about this tho. I'm wondering if this is how Pavel does it tho or does he use the bones differently. I read a LOT of posts yesterday and none of them explains this procedure fully. So I'll look more to see what I can find.

 

I'm also not worried about being able to import the X models into max, I just needed the bones info for what I'm doing. Once I figure this part out, I can finish the model and move on to the coding part which I'm sure will be a bundle of joy learning. :)

 

Well, if you're a student you can get a three-year license for 3ds max of editions 2012-2015 for free. Here's the link. Otherwise, I'm sure max 2014 will work just fine, it will just look different apparently. 

Share this post


Link to post
Share on other sites

Thanks for the link freeman but I am not a student so I can't get that. I looked into that before and they want some kind of proof and I can't produce it so I have to stick with the 30 day version. It's ok, I got it setup with a system image in Win 7 and I have 2 HDs so it works. I just can't change my C drive too much because it gets redone every 30 days because of max. It sux to do but for free max, it works,

 .

you do realize they don't actually check that right...if I remember right all it asks for is a school website. Google your local college and use a common name... you didn't hear this from me. I'm actually a student tho so I didn't have a issue

Share this post


Link to post
Share on other sites
Guest freeman

Thanks for the link freeman but I am not a student so I can't get that. I looked into that before and they want some kind of proof and I can't produce it so I have to stick with the 30 day version. It's ok, I got it setup with a system image in Win 7 and I have 2 HDs so it works. I just can't change my C drive too much because it gets redone every 30 days because of max. It sux to do but for free max, it works,

 

I was looking at some YouTube videos yesterday and found a decent video on bone with the skin modifier. It explained how to use them better and I got my front suspension working a LOT better now. It also explained how to use the Weight Table with selected vertices as freeman mentioned above. That is how I got it working better. Now it looks nice and smooth when moved. Here's another pic of it now. You can see the difference in the colors from before. They are more uniform now. I went and selected each set of vertices of the spring to make them uniform. There were 10 of them so each set is 0.1 different. I also had to lower the polys on the springs. I made each leaf separate at the time and had to make it just one piece now. I'll have to do more for the other parts as well. I made this truck high poly and it might be too much for the game. I don't know what I can get away with but I'd rather have the body higher poly than the parts since most will hardly be seen.

 

Now I have to ask about the other bones. How do I setup the frame and body bones? I'd imagine it's probably pretty much the same, huh. There is no info on how to set them up anywhere that I can find. Anything I find just shows the bones but doesn't explain  anything. I'll have to look more in the mean time. I still have to make the rear suspension but I have no idea what it looks like. All the images of this truck I found don't show the suspension good enuf to make out how it looks so I'll just have to guess. Won't be the first time..

 

- Nicely done! I recommend you post a link to this youtube video that helped you out. I'm sure others here will find it useful. 

 

 

- The other bones (the shakers) like you can see in the hmmwv screenshot I posted are setup in the xml file after you get the skin envelope looking like that. Here's the code that the hmmwv uses (which appears to be modified code from the uaz.xml): 




<_templates Include="trucks">
	<Body>
		<Mudguard
			Mass="1"
			AngularDamping="1.0"
			Collisions="None"
		>
			<Constraint
				Type="Hinge"
				MinLimit="-35"
				MaxLimit="35"
				Axis="(0.0; 0.0; 1.0)"
			/>
			<Shape>
				<Box HalfExtents="(0.08; 0.12; 0.12)" Translation="(0; -0.06; 0)" />
			</Shape>
		</Mudguard>
	</Body>
</_templates>


... 


	<PhysicsModel Mesh="hmmwv/hmmwv.xml">
		<Body Alias="chassis" Mass="2600" CenterOfMassOffset="(0.0; -0.4; 0)" ImpactType="Truck" >
			<Body ModelFrame="Bonehook_F2" _template="Mudguard" />
			<Body ModelFrame="Bonehook_F1" _template="Mudguard" />
			<Body ModelFrame="Bonehook_R1" _template="Mudguard" />
			<Body ModelFrame="Bonehook_R2" _template="Mudguard" />
			<Body ModelFrame="BoneA" _template="Mudguard" />
		</Body>
	</PhysicsModel>


...

- The above code is in two different sections of the truck's class xml file. There's a section at the beginning of the file which has "_template" tags. This is then referenced in the 'PhysicsModel" section of the xml file where you can see _template="Mudguard" on each "body" that references it. As far as I know you can name "mudguard" anything you want really (I guess as long as it doesn't conflict with something else). 

 

- A section to pay mind to is the "constraint" which will dictate how that "body" will behave or move. Notice this one says "hinge" type and the Z axis has a value of 1. That means it'll rotate like a hinge about the Z axis (which is the same axis your axles are on, or are supposed to be on). I don't know all the variables and values these may be set up as. A developement wiki regarding this is sorely needed in my opinion. 

 

- The stock Kraz, for example, also has this code: 



		<Shakers>
			<Shaker
				Frame="ExhaustBone"
				MaxAngle="(2; 2; 0)"
				MaxFrequency="4"
			/>
		</Shakers>

... of which is listed in the "truckdata" section. I believe this is the code that allows the exhaust to vibrate/rattle. 

 

- There's also this from the stock kraz: 



	<PhysicsModel Mesh="kraz_chassis.xml">
		<Body
			Mass="6500"
			CenterOfMassOffset="(0.4; 0; 0)"
			ImpactType="Truck"
		>
			<Body
				ModelFrame="CabinBone"
				Mass="5500"
				CenterOfMassOffset="(-0.5; -0.3; 0)"
				ImpactType="Truck"
			>
				<Constraint
					Type="Ragdoll"
					PlaneAxis="(0; 0; 1.0)"
					TwistAxis="(1.0; 0; 0)"
					ConeMin="0"
					ConeMax="15"
					TwistMin="-15"
					TwistMax="15"
					PlaneMin="0"
					PlaneMax="0"
					PivotOffset="(-2.0; -0.2; 0.0)"
				>
					<PlaneMotor
						Type="Spring"
						Spring="800000"
						Damping="8000"
					/>
					<TwistMotor
						Type="Spring"
						Spring="640000"
						Damping="16000"
					/>
				</Constraint>
				<Body
					ModelFrame="LeftMudguardBone"
					Mass="10"
					AngularDamping="3.0"
					Collisions="None"
				>
					<Constraint
						Type="Hinge"
						MinLimit="-45"
						MaxLimit="5"
						Axis="(0.0; 0.0; 1.0)"
					/>
				</Body>
				<Body
					ModelFrame="RightMudguardBone"
					Mass="10"
					AngularDamping="3.0"
					Collisions="None"
				>
					<Constraint
						Type="Hinge"
						MinLimit="-45"
						MaxLimit="5"
						Axis="(0.0; 0.0; 1.0)"
					/>
				</Body>
			</Body>
		</Body>

... noticed the "ragdoll" constraint with its "spring" motors on the "cabinbone." This is what generates the head-bobbing action of the cabin as it rocks about over uneven terrain. 

Share this post


Link to post
Share on other sites
Guest freeman

Thanks Stetson. No, I didn't realize that. If I did, I would have done this long ago. I will certainly look into this.

 

@freeman, thanks for showing the code for this but I'm not that far yet. I'll know this more when I get to it. But the bones is what I need to know right now, how they are setup for the whole model. I'm not sure what to do for them. I see in the Kraz that I imported but do I need to setup the skin modifier on all of them like I did with the suspension? That's what I don't know.

 

On Hien's site, there is a tutorial for the mud flaps which helps but he doesn't say where to put the bones for them. Are they placed at the pivot of the mudflaps or just close? Same with the others. This is what I don't know and can't find.

 

Here's the link to the video I found that shows how to setup bones using a skin modifier. It explains how to do it pretty well and should help other too.

 

 

EDIT: I just looked at the Kraz I imported the other day and I added a skin modifier to the cab to see if the bones info was there and it's not. So that won't help me. Does it work for you using 2012, freeman? If it does, I'll have to go back to 2010 and see how it work in that.

 

- You should not have to apply the skin modifier. It should already be there. When you select the envelope on the skin modifier and the dialog window pops up, select "hold/yes" so that the skin modifier does not get collapsed into the mesh. I don't know why that's important to be honest, but it is. If the skin modifier is not there when you import the model then I'd consider a different import plugin or possibly migrating to another max version. 

 

- Besides your suspension animation setup as you already know about, you only need bones where-ever else you want things to move (or even not move). For example, the kraz: 

 

Bt8NAc6.png

 

This is the cabin bone highlighted on the kraz. Notice the door, fire extinguisher, mirror, side step, etc are grey? They have bones on them and are isolated from the skin's envelope modifier so that they do not distort with the skin and remain rigid. 

 

vliOjQM.png

 

The bones are placed along the axis or the pivot point at which you want them to move/rattle/shake/bend/etc. This mirror doesn't have any code on it in the xml to make it more, however. It appears they either didn't want it to distort with the cab or they may add that detail at another time. 

 

t2SyDou.png

 

This mudflap does have code to make it move however: 









				<Body
					ModelFrame="LeftMudguardBone"
					Mass="10"
					AngularDamping="3.0"
					Collisions="None"
				>
					<Constraint
						Type="Hinge"
						MinLimit="-45"
						MaxLimit="5"
						Axis="(0.0; 0.0; 1.0)"
					/>
				</Body>

... which causes it to hinge about the z axis. 

 

Some of the parts, like the side steps, have cdt's attached to the bones. 

Share this post


Link to post
Share on other sites
Guest freeman

I have 2012 installed finally after 4 downloads because of corrupted files, the colors on the truck are looking more like you show but it's still different than your images. The cages of the bones are a lot bigger as in the image from 2010 but the colors look correct. I'm still wondering if you changed yours at all? But this does help to know how this works.

 

Is that the orientation the truck has to be in when I export to an X file? If yes, that sux and is odd. Also, if you move any axle bone on the imported kraz, does the axle move like it should or does the whole truck rotate? Mine rotates.

 

Thank you for posting those images and explaining about the axis'. I thought that's how it should be but wasn't sure. And thanks stetson for the student thing. I didn't know about that. I'm gonna try 2015 next and see how that works. If it's better than these other versions, I'll just use my system image to clean all the others out. It's almost time anyway.

 

Now I have to model the rear suspension. Not sure how it'll look tho. I'm guessing a simple leaf spring setup. time to search google. This is the part I don't like. I like modelling but hate having to search for drawings or reference images.

 

Yes, I did change the appearance of the bones on my system and after I did that they all show up the same between meshes. I forget where it is but on a fresh install the bones are something like 1.0 x 1.0 with a  0.90 taper (if I remember correctly and I changed them to 0.1 x 0.1 with the 0.90 taper so I could actually see the model without hiding the bones. It was in one of the sub-menus on the right side. 

 

EDIT: Yes, your truck has to be Y-up. It's annoying, I know. 

I don't believe the bones are actually imported in their original configuration when the model is imported. The skin envelope has all that data though (and you can back it up as an ENV file, too). 

Share this post


Link to post
Share on other sites
Guest freeman

I didn't mean the bones themselves, they are not even in your images. I meant the cages. You can clearly see the difference between the cages in your image compared to mine. Did you change the cages of the bones? They are a LOT smaller in your images where mine are long.

 

I tried doing them like yours are and they wouldn't work. I couldn't change them in the weight table. If I changed 1, they all changed and I couldn't do anything about it. So I wonder why the cages on the Kraz you show in them images are smaller and almost circular because I couldn't get them to work like that.

 

No, I didn't touch the cages either. I'm pretty sure their configuration is not imported either. On max 2014 the cages were bigger than the truck I would import. Just a quick question: are you using the appropriate importer plugin version between each version of 3ds max you're using?

Share this post


Link to post
Share on other sites

You seem to be having a lot of trouble with the basics, and missing the mark by focusing on things like the colors.

 

Afaik the 'cages' on the kraz are small, because none of it is animated in max anyway apart from the suspension. The cab shaking etc is all done in the xml setup file.

Share this post


Link to post
Share on other sites
Guest freeman

You seem to be having a lot of trouble with the basics, and missing the mark by focusing on things like the colors.

 

Afaik the 'cages' on the kraz are small, because none of it is animated in max anyway apart from the suspension. The cab shaking etc is all done in the xml setup file.

 

He did say the skin envelope wasn't getting imported either. So if he'd like to glean any information from the stock trucks, they are not going to be of any help if they are not getting imported correctly. I had similar issues using max 2014, though, which is why I went back to max 2012.

Share this post


Link to post
Share on other sites

Either way, all you *need* the envelopes for is the axle and suspension animation. All the other stuff is done via xml setup (cab shake, exhaust vibrations, doors opening etc)

Share this post


Link to post
Share on other sites

Dang if 2012 is that much better I might have to stop fighting with 2014 and download it. Does 2012 still have the built in sketchup importer?

Share this post


Link to post
Share on other sites

×
×
  • Create New...