PDA

View Full Version : Imported mesh texture problems...Help!


Fordy
4th Sep 2001, 08:29 PM
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)

http://www.planetunreal.com/fordy/images/timmay.gif

Jack oneill
5th Sep 2001, 07:02 AM
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 :)

Fordy
5th Sep 2001, 07:36 AM
Im gonna give that a try rightaway.

BTW what is the Stragate bit mean in the :

Mesh=LodMesh'Stargate.streetlite01' ?

Thanks!

zenzelezz
5th Sep 2001, 11:23 AM
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
5th Sep 2001, 12:18 PM
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
5th Sep 2001, 02:01 PM
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 :(

Euphoric Beaver
5th Sep 2001, 02:24 PM
I'm not sure but if you upload the .psa and .pcx files, these lovely people would help you and post the .uc. :D

Fordy
5th Sep 2001, 04:29 PM
thanks, I have uploaded the zip file here:

http://www.planetunreal.com/fordy/asn/sasdeco2.zip

Its 231 kb & all the files are in the apropriate folders.

Im simply trying to make the glass cover unlit !

Many thanks!

zenzelezz
5th Sep 2001, 04:30 PM
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

Fordy
5th Sep 2001, 05:32 PM
Tnaks for that info but i still cant get it going, lol, like how hard can it be!

anyway if you want to mess about the files are here :

http://www.planetunreal.com/fordy/asn/sasdeco2.zip

-Thanks & good luck!

Mr.Mitchell
6th Sep 2001, 04:13 PM
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.

Fordy
6th Sep 2001, 07:13 PM
hell for your first post you couldnt have been more helpfull!!

That works wonderfully!

Thankyou everyone that has replied!