Imported mesh texture problems...Help!

  • 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.

Fordy

Member
Jul 10, 2001
300
0
16
58
York, UK
www.planetunreal.com
Hi
Im having real problems with a street light model I have made. It consists of 2 textures, one for the main body of the street light & one for the lamp cover. I would really like the lamp cover to be transparent. When I inspect the textures in the compiled .U file, it's Transparent property is set to true, but it shows up solid

Could anyone please point me in the right direction?

Heres the Class file:

//=============================================================================
// streetlite01.
//=============================================================================
class streetlite01 expands SAS_Lights;

#exec MESH IMPORT MESH=streetlite01 ANIVFILE=MODELS\streetlite01_a.3d DATAFILE=MODELS\streetlite01_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=streetlite01 X=152 Y=0 Z=0

#exec MESH SEQUENCE MESH=streetlite01 SEQ=All STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=streetlite01 SEQ=streetlite01 STARTFRAME=0 NUMFRAMES=1

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

#exec TEXTURE IMPORT NAME=Jstreetlite01_01 FILE=Textures\streetlite01_01.PCX GROUP=Skins // Blue Light
#exec TEXTURE IMPORT NAME=Jstreetlite01_01 FILE=Textures\streetlite01_01.PCX GROUP=Skins FLAGS= 4 // Lamp Cover

#exec MESHMAP SETTEXTURE MESHMAP=streetlite01 NUM=1 TEXTURE=Jstreetlite01_01
#exec MESHMAP SETTEXTURE MESHMAP=streetlite02 NUM=2 TEXTURE=Jstreetlite01_02

defaultproperties
{
DrawType=DT_Mesh
Mesh=streetlite01
DrawScale=4
bBlockActors=True
bBlockPlayers=True
bCollideActors=True
CollisionHeight=160
CollisionRadius=10
}

Thanks in advance,

-Fordy ( SAS - Mapper/Modeller/Skinner)

timmay.gif
 

Jack oneill

New Member
Sep 4, 2001
81
0
0
42
France
atlantis.jolt.co.uk
i don't understand something...

Well, there is something which wrong... It's not on the transparency import, but on your texture names : You told that you have two maps for your model, but i see that your textures import is the same. You are generating two times the same file (streetlite01_01.PCX). I think you have made an error in the name of your file.

Also, i would advice you to make this : in the default properties, you should use the LOD system. Just put this :

Mesh=LodMesh'Stargate.streetlite01'

I hope it will work :)
 

zenzelezz

Member
Sep 5, 2001
113
0
16
The Stargate thing is the package (.u file) from which the model will be loaded. So if your model is located in a package called MyVeryOwn3DModel then you'd put

Mesh=LodMesh('MyVeryOwn3DModel.NameOfYourVeryOwn3DModel')

in the defaultproperties
 

Jack oneill

New Member
Sep 4, 2001
81
0
0
42
France
atlantis.jolt.co.uk
hope this works

Oh, sorry :) I wrote "Stargate" because it's really usually for me too write so ! I'm the leader and lead coder of the Stargate mod for UT. So, even time i must wirte a package name, i use Stargate :)

So, you should replace "Stargate" by the name of your package...

Hope it will work :)
 

Fordy

Member
Jul 10, 2001
300
0
16
58
York, UK
www.planetunreal.com
Thanks..

Thankyou everyone, but im giving it up as a bad idea, I just can't get the stoopid things to go translucent at all, I feel like I have tried everything & nothing works :(
 

zenzelezz

Member
Sep 5, 2001
113
0
16
I am *absolutely* not sure, but you might try using this .uc instead of the one you originally posted:


//=============================================
// streetlite01.
//=============================================
class streetlite01 expands SAS_Lights;

#exec MESH IMPORT MESH=streetlite01 ANIVFILE=MODELS\streetlite01_a.3d DATAFILE=MODELS\streetlite01_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=streetlite01 X=152 Y=0 Z=0

#exec MESH SEQUENCE MESH=streetlite01 SEQ=All STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=streetlite01 SEQ=streetlite01 STARTFRAME=0 NUMFRAMES=1

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

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


#exec TEXTURE IMPORT NAME=Jstreetlite01_01 FILE=Textures\streetlite01_01.PCX GROUP=Skins // Blue Light
#exec TEXTURE IMPORT NAME=Jstreetlite01_02 FILE=Textures\streetlite01_02.PCX GROUP=Skins FLAGS= 4 // Lamp Cover

#exec MESHMAP SETTEXTURE MESHMAP=streetlite_map01 NUM=1 TEXTURE=Jstreetlite01_01
#exec MESHMAP SETTEXTURE MESHMAP=streetlite_map02 NUM=2 TEXTURE=Jstreetlite01_02

defaultproperties
{
DrawType=DT_Mesh
Mesh=LodMesh('<nameofpackage>.streetlite01')
DrawScale=4
bBlockActors=True
bBlockPlayers=True
bCollideActors=True
CollisionHeight=160
CollisionRadius=10
}


Changes to the original code is in italic, modified lines are in bold...

Replace <nameofpackage> with the name of the .u file that this .uc file compiles to, i.e. if it compiles into FordysLights.u then use Mesh=LodMesh('FordysLights.streetlite01') in defaultproperties

As mentioned, I have no clue whether or not this would work, but you could try it, and if you have any problems then you can (if you trust me) send me the _a.3d , _d.3d and the textures and I could try it out and see if I managed it.

Never give up on a good idea!

- zenzelezz
 

Mr.Mitchell

New Member
Sep 5, 2001
140
0
0
the Netherlands
home.ict.nl
Fixed it

Woohoo, fixed it. I wanted to play with the transparent feature for some time, but I never found a reason to use it.

I will attach the fixed version. I renamed the streetlite to lamp, but otherwise the .uc is the same as you used (I think).

I couldn't use the .3ds file cause MilkShape crashes on it, so I opened up the .3d file and made two groups. The pole is one group and the Bulb is group 2. Now I opened up UnrealFX and selected all faces with material 2 and pressed the huge Edit button. Now just select 2-sided and translucent. Save the .3d file and compile a new .u file. I exported the modified model to .3ds so you can have a look at it if it is not clear enough.

UnrealFX can be downloaded at: http://www.fileplanet.com/dl/dl.asp?q2pmp/tools/UT/UnrealFX.zip

I noticed that the Bulb intersects with the Pole. In UT it is a bad thing when polys intersect. I have made two screenshots that show the transparent bulb and you will notice that the edges of the bulb are "blocky". This is because of the intersecting polys. Please note the "blocky" effect depends on the Hardware and/or drivers so it doesn't show up on all videocards and not in all modes (OpenGL/D3D).

Screenies at:
http://www.xs4all.nl/~wetering/Shot0026.zip (600k)
http://www.xs4all.nl/~wetering/Shot0027.zip (600k)

Still got questions let me know.