Jump to content
Sign in to follow this  
JDog

Working on first addon, few questions as I go

Recommended Posts

So, as title says, decided to try my hands at getting something into the game. Hope that title is "descriptive" enough since there will be multiple questions in here :P

Right now I'm almost done with the model, its really just adding the smaller details, then I'll get the animations in. I'm able to see my model in game and thanks to the 3ds max toolkit I can get the animations working. At this point I have two questions:

1) Concerning ladders... how do they work in the game? Do I model the ladder and then choose that component as some ladder type in O2? Or do I have to use a stock BIS ladder?

2) Concerning animations... I understand the translations and rotations but what about having a rope/cable moving over a pulley at 90*?

I suppose it would be the same issue with having tank treads rolling along the wheels. Or in the case of a rope perhaps I could just somehow "extend" it from its base as long as it needs to, but I think that might cause tearing issues.

I'm sure I'll have some more questions that I can't find answers so, but I'll cross those bridges when I get to them :) Thanks!

Share this post


Link to post
Share on other sites

I don't think you can animate a mesh like a rope like that, but you may be able to animate the UVs to give the impression of movement.

Share this post


Link to post
Share on other sites

will it work if he gave it a skeleton? you know like humans and stuff

Share this post


Link to post
Share on other sites

Hmm I've got another one. I remember reading before that if a model was too "large" like a carrier/the LHD... it had to be split up and assembled in-game like the LHD is? Just wondering why. Is that if its a certain physical size/length in the game or if it exceeds a certain poly count?

I think I got a while to go if its the latter, just passed 5k polys says 3ds max, and I think the russian soldier sample model is like 7k in O2.

Edit: don't know if this is related to that question but I can no longer view my model in Bulldozer unless I delete the majority of it. Can bulldozer only display a certain number of vertices or somethin?

Edited by JDog

Share this post


Link to post
Share on other sites

It is a certain vertex limit. Searching the forums will find the exact number.

Buldozer is running the ArmA 2 renderer. If you have have more than 20k faces or something like 60k vertices, likely that's the culprit.

Share this post


Link to post
Share on other sites

1) Ladders: Are typically "land" objects, with a "start" and "end" point in their Memory LOD. Then you just add below to the config;

		ladders[] =
	{
		{
			"start",
			"end"
		}
	};

2) There are potentially many tricks to get a "rope" ingame, but it REALLY depends what youre trying to represent ingame to determine if it can be pulled off. A description may help.

3) Large Models: No, LHD's etc being made from several models is not related to vertex count (but vertex count is an issue for for ANY model), its just related to "physical" size. Anything larger than 50mx50mx50m runs the high risk of certain engine functions no longer working. In particular; Resolution LOD disappearing from view at certain angles, collision detection broken and invisible holes in walkways.

Vertex count will effect a) if it will appear in Buldozer b) ingame performance

Share this post


Link to post
Share on other sites

Thank you both very much for the input.

I'm actually working on a carrier is why I was wondering about the large model issue. I've managed to inspect the full model in-game which looks fine thus far, but then I've only been using the basic resolution LOD to inspect it and nothing else yet. Suppose I'll have to test it out when its complete with all the LODs.

Ladders: So for this would I have to make a ladder object and attach it to the ship? Or could I simply place those memory LODs where the ladder element would be as part of the full model?

Ropes: This is actually the utmost least of my concerns/desires for the ship, but was thinking of having a 'winch'-like system, to haul a small boat (crrc) out of the water into the ship. So it would have to extend and retract from a point.

Buldozer update: I discovered that if I use "Check Faces" and then delete the selection that command makes, I can preview it again. I still dont get why it works fine in game but not renderer. So does this mean I have some "bad faces" or somethin?

Edited by JDog

Share this post


Link to post
Share on other sites

Ladders: If its a static ship/carrier, then you just include within the existing model, resolution lod for the look of the ladder, memory lod for the start/stop locations. Otherwise, yes, the ladder will have to be a separate addon which you attachto (script) the main model.

Ropes: No ones going to get hung up about looking at a black or grey "rope" that has a flat texture stretched across it as the "rope" animates up and down with your crrc. It will look fine. You can even animate the rope "reel" to look like its rotating.

Bad faces: Quite likely, but I can't remember what it is about faces that might case that. Are all faces 3 or 4 vertexes? With 4 vertex faces you obviously have to be careful.

Edited by [APS]Gnat

Share this post


Link to post
Share on other sites

Ladder: Alright it will be static most likely, but thanks for the answer.

Ropes: Actually the "rope" was gonna be nothing more than that, a 4 or 6-sided dark grey "string". That wasn't the issue. it's how to animate it getting longer/shorter.

Bad faces: 95% of the model are 4-vertex polys, the rest being tris. There might be a few capped cylinders with 5/6 verts, but I assumed O2 took care and triangulated those since those elements work fine in Buldozer. It's my island that has some bad faces, when that I know for a fact has only 3 and 4-sided. I'll use O2 to figure out the area the bad faces are in and look for them in 3ds I guess. Also, this hasn't been a problem in O2 yet, but I noticed O2 prefers closed object/topology. I have a few elements with deleted faces (faces that aren't seen anyway), like the underwater section of the hull is open, as is the top/bottom of some "pipes" that go into other geometry. Will this cause problems with anything in the long run? Should I seal all those off?

Edited by JDog

Share this post


Link to post
Share on other sites

Deleting the hidden faces I think is a good practice. I don't think that they ought to cause problems unless you are perhaps viewing the boat from the bottom at some point. Pipes that terminate crashing against other geo, though, should not have a cap. There ought not to be a circumstance where those are useful if

a) those faces are not a realistic part of the mesh

and/or

b) if there is no rational circumstance under which those faces (or the lack thereof) would be viewed.

So called 'watertight' meshes are quite useful for skeletal deformations and such. If the mesh will remain rigid, there should not be a problem with cracks appearing, etc.

Edited by Max Power

Share this post


Link to post
Share on other sites

Rope: Very easy with the "translation" animation. Its straight line animation.

Share this post


Link to post
Share on other sites

Please forgive the Paint newbiness lol but not sure how else to explain it. Assuming I did decide to try and incorporate this, this would be the issue:

ropeissue.png?t=1277660519

The "crane" i guess is the blue part, the rope is green. The red section is where the rope would start to appear if I just translated the rope upwards. Unless its possible to just use translation on the bottom vertices?

Also since I'm at the point to start making LODs and unwrapping the UV map soon... I need to figure this out. In the end will I have to "cut it up"? It was mentioned that a 50x50x50 object could have issues. If I stuck to that, the ship would have to be split up into 7 pieces at least just length-wise, probably another for the island :(

Share this post


Link to post
Share on other sites

If you translate the rope upwards like that and (if it is possible) translate the UVs at the same rate to an area of a texture map with an alpha transparency, you should hide the rope. There may also be some technique where you but an alpha transparent cylinder to act like a sleeve for the rope to go into, and do some clever z priority ordering.

Share this post


Link to post
Share on other sites

Eh, this will just be food for thought for now, have other things to focus on. Going to start playing with the LODs later tonight see if I can get it collide-able/walkable.

Share this post


Link to post
Share on other sites
The "crane" i guess is the blue part, the rope is green. The red section is where the rope would start to appear if I just translated the rope upwards. Unless its possible to just use translation on the bottom vertices?

Yes, you dont need to animate the WHOLE rope, you just animate the bottom tip of the rope. The top never moves (except with the crane, if it moves too).

Thats why I mentioned "stretch". The texture will stretch as you animate the length of the rope, but as I suggested, unless you want to be totally anal about your texture quality, a flat grey or black texture on the (steel ?) rope will look just fine.

Share this post


Link to post
Share on other sites

Heh no I dont, just didnt know you could animate just vertices/faces in arma. And I started playing with the geometry LOD... ugh... what an unfortunate fact that I am gonna have to split it up. I brought it in at full scale and over half the flight deck was fall-through-able haha. Hopefully I wont have to split it up into too many pieces.

Update: Thank god, each piece's position relative to the origin in 3ds max translates into O2, and then into ArmA. Whew, that would have SUCKED if I had to manually align them with a script. So so sad though, I tried like this:

- 1 resolution LOD

- 8 geo-LODs (7 length-wise down the ship + 1 for the island)

And it eliminated the huge holes but seems like there are still some, mostly near the forward section for the bow and a couple spots in the hull I can walk/shoot through, and somehow the island's LOD isnt lined up with it. Maybe I messed it up in O2, was hoping I wouldnt have to cut up the res lod but guess I might have to, so I can at least use them to see where the geo-LODs are. Each piece fits the 50m length/height, but the width is more like 68. Might have to have 16 pieces instead of 8. Wow that sucks.

New question: Obviously, even though I'd read it before, the geo-lod doesn't work well for landing/walking. So for the flight deck do I have to use the road lod AND the geo lod? or will just the road one suffice?

Edited by JDog

Share this post


Link to post
Share on other sites

Welcome to my world ;)

The Kuznetsov recent got chopped into 13 Geo/Roadway pieces and 2 Resolution models (because of visual clipping).

Yes, likely the GEO Lods are really only required for the a) waterline b) island.

But if you start stretching deck/Roadway LODs to 68 meters it likely you'll get holes. (see my very recent thread on this in this sub-forum)

Share this post


Link to post
Share on other sites

Yea I also found some visual clipping when I was within 50-75 feet of the bow/stern and looking away from the carrier's center.

Update:

I only have 1 thing left I want to add to the model, then I make a copy to cut into a full 16 or 18 pieces for the geo-LODs. Only thing I'm thinking might be an issue is that if I have the geometry in separate files than the resolution, hopefully the animations for the elevators and stuff will stay synchronized.

New question:

The ship falls under the StaticShip class. How can I position it in-game? I have a script to spawn it at a location which works fine, but I seemingly cant use any scripting (setPos or setDir) to affect it.

Also, is it possible to introduce keyframe-based animations at all? Or are we limited to translating/rotating about an axis?

Edited by JDog

Share this post


Link to post
Share on other sites

So I started w/ the LODs earlier today. Just been toying with the rear of the ship trying to get all the walkways (roadway) and railings/walls (geometry) working. The roadway LOD went off perfect. Geometry however has been requiring some fine-tuning and figuring out. I think I'm getting it though. Doing it in 3ds max I guess I'm just trying to stay with the most basic of shapes, some railings are still letting me walk thru and fall to my death though.

The "Find Non-Convexities" button gives me some returns, mostly on stuff I'd made an editable poly and played with. But it doesnt help much since some of the stuff it brings up works and others dont. I'll get it all straightened out eventually.

Update: I got that one squared away but ugh... the other half of the ship's stern is killing my will to do this haha. Trying to get the stern out of the way cuz its got the most complex LOD requirements, more like making a building than a ship. Some geometry boxes are pushing out farther than intended, some simply arent working, and some half-work lol. Wish there was like official documentation for how to do it "properly".

Edited by JDog

Share this post


Link to post
Share on other sites
Wish there was like official documentation for how to do it "properly".

Yep, so did I 5 years ago !!

Don't feel you should get complex with the Geo LOD. In reality as couple dozen stretched cubes are all that are needed to represent this collision detection LOD

Simple boxes will never fail any convexities testing.

Tip:

You dont have to center every model within O2. EG, if you chop a very long model into bits, those bits (each saved as a separate p3d) can stay EXACTLY where they are with O2. Then when you SETPOS, you don't have to calculate any offset, the offset is within O2/p3d and that translates to gameworld offset. NOTE: You need to be careful selecting bits in O2 that are a long way away from the O2 center, sometimes your selection is "clipped".

As for scripting, pulled the INIT.SQF from the TAKR_Kuz.pbo (Kuznetsov carrier) and maybe learn a bit from it.

Share this post


Link to post
Share on other sites

I got the geo-LODs almost all figured out. Enough to complete the ship now at least :) But the stern of the ship did require some complex geo-lod'ing, cuz of the few corridors I have in it.

And I know the center is relative to the origin in O2, same as it is in 3ds max, I mentioned that before :) I haven't done anything with the model in O2 at all, don't quite know/havent bothered learning how to yet. Just keep importing my changes from Max, its easier for me. Though it is unfortunate that 1m in Max = ~40m in O2. I always have to import at 1:40 scale.

And yea I'll take a look at the Kuz script, been meaning to.

Now on to texturing... hopefully this wont be as dreadful/difficult as I've been thinking it will be. By the way... how do I make it so sparks come out of the carrier when you shoot it instead of dirt lol?

Edited by JDog

Share this post


Link to post
Share on other sites

Started on textures. Is there a way to use multiple textures files on one model and split the UV mapping up amongst them? I saw this "UV Sets" thing in the editor but seems if I try to load another texture file it applies to both sets. Would sure be nice if I could get some parts of the texture file to tile, mostly so the flight deck doesnt look all stretched. I'll try some stuff again tomorrow.

Share this post


Link to post
Share on other sites

you need to select the faces that has the 2nd uv set and apply the textures to them

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×