JK and MotS Editing >> Modeling >> tuskangun .3do in MoTS: I don't get it...     (Moderator: Admins) Previous Topic | Next Topic
Page 1 of 2 Goto page 1, 2  Next
 Author 
 Post 
Post 26-Nov-2010 14:39        

Messing about in Zed, and I came across something weird. This .3do, while clearly holding a Stormtrooper Rifle, drops a Blastech that you can't pick up. And when he shoots, the incoming fire isn't aligned with the gun, it more or less comes out of his shoulder. Weird.

I think this may be specific to MoTS, in the Ka'pa the Hutt's Palace mission, where tuskan's don't attack you when you acquire the disguise. But the tuskan .3do holding the bowcaster works just fine. How should I get round this: re-texture a weequay and change his .snd file, or import the tuskan from JK?

Thanks.
Post 26-Nov-2010 19:04        

I was surprised to learn today that there are apparently no strifle-wielding tuskens in the Ka'Pa Palace level And for that matter, I think there are only the brown tuskens in the level/entire game (no grey ones). I have no idea how I failed to notice this before (maybe because the enemy set is rather diverse in the first place? -- gran, rodians, ithorians, tuskens, gammoreans, etc...)

Anyway, you are encountering a template problem - the fireoffset param in the template is wrong.

I made two new templates for the two tuskens (with fixed fireoffset values). You can copy/paste these at the end of your mots.tpl file (in your project directory), then in Zed, do "Commands -> Reload Templates" to import your changes.


# DESC: Tusken with strifle
# BBOX: -.04 -.01 -.12 .04 .02 .07
tuskangun2        tuskangun          fireoffset=(.035/.0682/-.01)
# DESC: Tusken with bowcaster
# BBOX: -.04 -.01 -.12 .05 .06 .07
tuskan2           tuskan             fireoffset=(.035/.0682/-.01)


You may or not want to tweak the offsets a little more, but I'll leave that to you

(P.s. if you don't have a mots.tpl in your project directory, copy the one from Jeddata in your Zed directory)
Post 27-Nov-2010 14:52        

Cool. The fireoffset is fine, thanks. Only thing is, he still drops an uncollectable blastech. So I copied the tuskan's template from JK's master.tpl, and then changed the fireoffset to your value.

There were definetely strifle-wielding tuskans in JK's level 3: return to Sulon. I wonder if their fireoffset was messed up too? I never noticed.
Post 27-Nov-2010 18:34        

Oops, I got so caught up with the fireoffset that I completely forgot about the blastech issue.

Anyway, it's just a small adjustment to the strifle tusken's actor cog to fix that. Basically, the cog is creating a powerup template that (A) is the wrong weapon (Blastech), and (B) does not have a cog attached (making it impossible to pick up). We need to (1) fix the tusken's cog, and (2) make the template use it.

  • Extract actor_tb_pnch.cog from JKMRES.GOO
  • Open the cog, and toward the top you should see a line that reads:
    template    powerup=+DBlastechPistol         local

  • Change that line to:
    template    powerup=+DSTrifle         local

  • Save the cog. Make sure the cog is saved in your PROJECT_DIRECTORY\cog directory (name it actor_tb_pnch2.cog or something else to prevent conflicts with the original file)
    (Item 1 complete)
  • Modify the template I gave you before so it reads:
    # DESC: Tusken with strifle
    # BBOX: -.04 -.01 -.12 .04 .02 .07
    tuskangun2        tuskangun          fireoffset=(.035/.0682/-.01) cog=actor_tb_pnch2.cog

    (Don't forget to reload templates in Zed)
    (Item 2 complete)


The advantage to this solution (versus just copying the JK template) is that you get to retain the punching behavior that follows force-pulling the strifle tusken's weapon.
Post 27-Nov-2010 19:23        

Ah, good thinking. Forgot about that. Done!
Post 28-Nov-2010 14:13        

One other thing, when it comes to templates. I added a new .3do to my level, in the usual way. However, while it looks fine in Zed, the 3do in-game is just a small cube in the grey default texture. Here's the exerpt from the .tpl:

bigdeadtree treestump1-b size=.732617 movesize=.732617 model3d=bigdeadtree.3DO
# DESC:
# BBOX: -.15 -.15 -.72 .23 .22 .46

Thanks again.
Post 28-Nov-2010 19:54        

I think, usually, that indicates a problem with the 3do itself, so I'll assume that for the moment (especially since I don't see anything wrong with your template).

Did you make or download the bigdeadtree.3DO ? If you made it, which programs did you use?

Make sure the 3do has fewer than 512 polygons per mesh (this is the max that JK can handle). If it has more, you will need to split the offending mesh into multiple meshes.

If that doesn't solve it, import and export the 3do from Zed, if the 3do was modelled using a different program (in any case, import the 3do into Zed and make sure the consistency checker doesn't report any problems -- F10 key).

If it still isn't working, post back or email/PM me the 3do so I can have a look. Also post the treestump1-b template that your tree template is based on; then we can verify that no problems are being propagated from the parent template.
Post 29-Nov-2010 12:29        

Hi again,

It's a 3do I downloaded from Massassi, and I think it is a problem with the 3do itself, since I've been adding other 3do's which work fine.

I've used a variety of parent templates, but each one produces the same effect. Anyway, I'm going to just email you the 3do file, and you can have a look at the treestump template as well.

Thanks
Post 29-Nov-2010 21:01        

If memory serves, the small dflt cube will also display if you have a solid 8-bit texture on a surface flagged as +GEO 4. To fix it, either change this surface value to +GEO 3 or convert the texture to 16-bit. I would check this first since it's a model that you downloaded from Massassi. A lot of the models there were made with 8-bit, software rendering in mind.

Also, keep in mind that the 512 limit is a texture vertex limit (if I'm remembering that correctly). The general rule has always been to try and keep the surface count under 350. If it gets larger then that, then just start separating the mesh into separate sectors and rename the layers to something different. I don't believe there is a layer limit, so you can still have high poly models that are well into the thousands.
Post 30-Nov-2010 01:50        

(Darth_Stewie -- skip to the end of my post if you just want your solution )

===========================================

(Original Draft Post - preserved simply for reference/documentation purposes)

If the texture vertex limit is indeed 512, then bigdeadtree.3do is way past that limit at 782 texture vertices.

I recall various discussions, experimentations, etc. of the texture vertex limits and vertex limits. Most notably, I recall this one. What I have seen in JK myself tends to conform to the description in the original post, so I use that as my guideline (I.e. keep everything below 512). This includes one recent experience where I merged 6 surfaces into 1 to drop a 3do's poly count from 516 to 511, after doing so JK was happy (final texture vertex count on that model was 348 btw).

Of course, I tend to dwell in simple, testing box levels, rather than full-blown production levels... that may be part of why I haven't seen any odd deviations, but anyway...

I thought that one of the Hub references on 3dos mentioned at least one of texture vertex or surface limits, but I can find neither... hmm...

===========================================

AFTER SOME TESTING RELATED TO THE BIGDEADTREE.3DO ...

Hmm, based on my testing, it appears that MotS (if not also JK) may have a texture vertex limit at 768 ( = 512 + 256 ... coincidence? ).

I imported and exported with Zed, which dropped the texture vertex count from 782 to 761 (supposedly omitting duplicate texture vertices). This was the only difference between the two copies of the model that should have been causing a problem. I tried transplanting the surface normals, hierarchy, etc. between the two models, but no changes occurred.

After I added some texture vertices to the "after" model, it broke again. I found that at 768 texture vertices, the model rendered fine as a tree in-game, then at 769, it went to dflt-cube in-game. (These texture vertices I added are not referenced in any surface lines... they are only listed).

Check it out here:
http://www.jkhub.net/project/get.php?id=2106

Sorry this post got so wordy... just trying to provide information on the topic.

(On a side note, this seems oddly familiar... does anyone know -- has this result been discussed/encountered elsewhere before?)

===========================================

SOLUTION FOR DARTH_STEWIE

Just import and export the original bigdeadtree.3DO in Zed, and that should do the trick (it did for me)
Post 30-Nov-2010 15:24        

Thanks guys. It now works fine. I downloaded your tutorial, darthslaw, and used the fixed .3do example you gave there. I'm sometimes lazy, I know!

It was very interesting, reading all that stuff, including the old post on Massassi.net. It does seem correct that LEC made the texture vertex limit at 768; the magic number! It's just too much of a coincidence that the .3do should break after adding another. Perhaps their way of preventing models getting too complex for their own good? Home computing systems were very different back in 1997/98, and building certain .3do's (starships, walkers etc.) would cause some significant slowdown if a lot of them were placed in a single perspective. I think all those limits on .3do's was both a technical and a creative decision back in the day: a pre-imposed limit for the artists to work against. Sometimes too much freedom is a bad thing!

Ah, Jedi Knight: even after all these years, you still have secrets to reveal.
Post 01-Dec-2010 19:57        

Darthslaw, thank you for that research. Though, I am curious, how are you finding the texture vertex count? The best way I can think of to find this limit would be to use forceremap on a 3do with 1 texture on it. The 3do would need to have 512 Surfaces and 512 Vertices. Then you would adjust the texture scale in forceremap, which would change the UV of the textures on the 3do.
Post 01-Dec-2010 23:25        

There's a mesh subsection in 3dos for texture vertices. This is viewable in notepad.

http://www.jkhub.net/library/index.php/Reference:3DO

I opened the bigdeadtree.3do in notepad and added the texture vertices by hand.

Here's a snippet to show where the section is in bigdeadtree.3do (the original file)


# MODEL C:\games\jedi\Jed\Projects\3dos\bigdeadtree.3DO created by JED 0.91 beta

SECTION: HEADER

3DO 2.1

SECTION: MODELRESOURCE

MATERIALS 1
0: 03tree.mat

SECTION: GEOMETRYDEF

RADIUS .732617

INSERT OFFSET 0 0 0

GEOSETS 1

GEOSET 0

MESHES 1

MESH 0
NAME tree
RADIUS .732617
GEOMETRYMODE   4
LIGHTINGMODE   3
TEXTUREMODE   1

VERTICES 265

0: -.100149 .081454 -.721154 0
1: -.100149 .081454 -.621154 0
2: -.055149 .103954 -.621154 0
3: -.055149 .103954 -.721154 0
4: .020851 .075954 -.621154 0
5: -.035149 .103954 -.621154 0
6: -.035149 .103954 -.721154 0
7: .020851 .075954 -.721154 0
.
.
.
263: -.129013 -.134163 -.546683 0
264: -.100015 -.022843 -.486828 0

TEXTURE VERTICES 782

0: 0 -32
1: 20.03 -32
2: 20.03 0
3: 0 0
4: 32 20.8
5: 32 0
6: 0 20.8
7: -32 -38.4
.
.
.
780: 21.26 67.49
781: 17.47 0




This should definitely get tested some more, with a more "controlled" testing model like the one you are describing. I certainly would like to verify that this isn't just some odd fluke, and that there aren't other unknown limits just waiting to strike. I'll probably get started within the next couple of days.
Post 02-Dec-2010 01:29        

Good stuff. Thank you!
ZeqMacaw
Site Admin
Post 02-Dec-2010 10:35        

Relevant methinks: Limits reference

*** Post commands are unavailable for guests. ***