modelling decos for UT question

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.
Managed to get a model of a giant cigarette looking pretty good in Milkshape, exported it, changed the requisite lines, did UCC MAKE with no problems reported, shows in UED2 now as subclass of ut_decoration, added it to my map .... But the textures are wrong ... They look right in Milkshape 3d view from all angles, but in UED2 one texture covers the whole outside, and the others have been shifted and you can see them partway down the inside of the cigarette if you look end-on at it.

Possible problems: 1) i'm using an 256x256 8bit 256-color .bmp ... Thought i read somewhere that was okay, but does it have to be a .pcx or something?

2) In reading some other posts here and there i've heard it said to make sure your animation does not extend outside of a 256x256 bounding box or you might have problems, also i've read 128x128. In Milkshape, my cigarette is 32x320 (i have no idea what units MS3D uses), but i have no animations just the still image (set the # of animations to 1 in the .uc file) ... Could my dimensions be causing the problem? Yet i notice the Lightbox deco in UT is twice as tall as my cigarette at its default scale of 1.0, so hmmm ....

Any other ideas?




here is my cig.uc file:

class cig extends ut_Decoration;

#exec MESH IMPORT MESH=cig ANIVFILE=MODELS\cig_a.3d DATAFILE=MODELS\cig_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=cig X=0 Y=0 Z=0

#exec MESH SEQUENCE MESH=cig SEQ=All STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=cig SEQ=Still STARTFRAME=0 NUMFRAMES=1

#exec MESHMAP NEW MESHMAP=cig MESH=cig
#exec MESHMAP SCALE MESHMAP=cig X=0.1 Y=0.1 Z=0.2

#exec TEXTURE IMPORT NAME=Jtex1 FILE=Textures\cigskins.bmp GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=Jtex1 FILE=Textures\cigskins.bmp GROUP=Skins PALETTE=Jtex1
#exec MESHMAP SETTEXTURE MESHMAP=cig NUM=1 TEXTURE=Jtex1

defaultproperties
{
DrawType=DT_Mesh
Mesh=cig
}
 

ca

CHiMERiC Grandmaster
Oct 11, 1999
84
0
0
www.unrealscript.com
As far as bounds, I'm 90% sure you have a range of 256: -128 to 128, on all axis, so you might want to adjust to origin to fit that. As far as the texture, did you UV map it? Sorry if I'm not much help, I've never really had to deal with importing my own models into UT as I've always had informed artists to work with. :)
 
well i got it working now, it was indeed a bounding problem and the dimensions are as you describe.

Now what i'm confused about is how to handle multiple models/decorations that may share some of the same textures that are destined for the same map ... Instead of making each one into its own .u file is there a way to combine them all into one package so the user doesn't have to distribute a bunch of files in their system directory?
 

Raeled

Feuer Frei!
Jul 1, 2001
161
0
0
39
Dordrecht, The Netherlands
Visit site
you can have more then 1 uc file in the classes dir of your package dir.

this way you'll have multiple classes that all will be in the same package. together with the models/sound/textures (wich actually are also classes)
 

mr.s-d

CHiMERiC Moderator
Aug 30, 2001
65
0
0
UK
www.unrealscript.com
Yeah. Milkshape might give you some dubious code to work with, dunno if it's clever enough to not try to import a texture used by several models over and over for each model.
Just a tip, using #exec MESHMAP SETTEXTURE isn't really the best way to set the texture of a mesh, it'll cause you grief if you ever want to change the texture in-game.
 
yeah, i realized how to do it after i posted.

However, i don't understand the bit about not using #exec MESHMAP SETTEXTURE ... I've seen examples of using IMPORT or something to get textures out of a normal tex package, is this what you are talking about? And i guess i can't think of an example of why i'd need to change the texture in-game?

For example, this is a giant cigarette, i can't imagine wanting to make it looks like a stone pillar or something ... Or am i missing the point, heh, entirely possible ;)
 

Raeled

Feuer Frei!
Jul 1, 2001
161
0
0
39
Dordrecht, The Netherlands
Visit site
#exec MESHMAP SETTEXTURE MESHMAP=cig NUM=1 TEXTURE=Jtex1

this will set multiskin numero 1 to texture Jtex1

if you have an actor and multiskins[1] = None then it will use JTex1

if it's not none then it will use that texture you set it to
 

Raeled

Feuer Frei!
Jul 1, 2001
161
0
0
39
Dordrecht, The Netherlands
Visit site
personally i don't really think it's bad (maybe it's something i haven't experienced yet)

if it happends that an actor (no matter wich one) wich got your cig mesh (model) and the multiskins[1] of that actor (coz your model only uses the multiskin[1]) is set to None (no texture assigned to multiskin[1]) then the texture you assigned with
#exec MESHMAP SETTEXTURE MESHMAP=cig NUM=1 TEXTURE=Jtex1 (so that's texture: Texture'Jtex1') will be used