Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Multiple Textures - Single Model - Question

Page: 1 of 1
 Mav
08-23-2006, 3:19 AM
#1
Ok, I'm probably going to answer my own question here, but I figured I get some professional confirmation before I start doing something the wrong way and have to redo anything.

My question is, lets say I wanted to make a model, lets say it is a lightsaber hilt(duh.. Mav), and I wanted two different parts of that hilt to have two different textures. I guess I really have a couple questions, first of all, I'm assuming that those two seperate parts of the model that I want textured, will have to be two different objects with their own respective UVmaps, am I right? A more technical question would be, can I build it as one hilt and then have it separated into two objects using "detach to object" or will I need to create 2 different N-gons

Also in question is, how to rig the hilt to ready it for export. Here is my guess on how to do this part, designate one of the objects as your "main hilt" and use that object as the object which you align the pivot point to the game hilt as well as link to the old hilt's parent. Then you take your second part of the model and and link it to your "main hilt." Am I correct in assuming that this is the way to go about it?

I thought of another question :p, when one eventually gets to the point of using the replacer option of MDLops, one would select the old hilt presumably "lshandle07" and hit replace and select "main hilt" and one would not have to select the other part of the model would one?

Yea I know I'm speaking in some cryptic gmax speech as well as using a dialect known as Mav, but any help would be appreciated, such help as answering this question; is this even possible or has Mav lost it, I"m pretty sure it's possible though.... anyway, any help is appreciated.

Mav
 Inyri
08-23-2006, 3:31 AM
#2
You can use as many objects as you want (as far as I know). I discovered this unintentionally when I was porting some of my own weapons from Jedi Academy to KotOR, and the weapons made use of dozens of parts and about a half dozen textures. All you should have to do is link everything up to the base and you should be good to go.

Anything beyond that I can't help you with, because hilts are not my specialty and they don't interest me enough to dedicate the time to learn to properly rig them ;).
 oldflash
08-23-2006, 4:43 AM
#3
For lightsabers hilt rules are simple:
One hilt=one mesh + one texture. Mesh name need to be unique to be sure that will be no conflicts with other hilts. More, I don't recomand to mess with planes (if you want red lightsaber you should use planes from original red lightsaber and not from other colors)
 Mav
08-23-2006, 5:38 AM
#4
@ InyriForge - thanks for the info and sabers really aren't hard to rig at all, I'm sure it would pose no problem to you and take less than 3 seconds ;), oh and btw I'm diggin the Auron avatar, and KH is a sweet game :)

@ oldflash - so in short are you saying that it's not possible at the moment, to have a two part hilt? I'm afraid I don't fully comprehend what you're trying to say, I don't plan on editing anything with the blade if thats what you're assuming.
 oldflash
08-23-2006, 5:48 AM
#5
@ oldflash - so in short are you saying that it's not possible at the moment, to have a two part hilt? I'm afraid I don't fully comprehend what you're trying to say, I don't plan on editing anything with the blade if thats what you're assuming.
For lightsabers hilt one single model and one single texture for that.
Replace function on mdlops will replace only hilt mesh, uvwmap and texture name. If you link more objects to your custom link , thise objects will be visible in replace window but you need to replace one mesh with another mesh.
Abot blade (planes)... my mistake. It was a hint and far from topic.
 Mav
08-23-2006, 5:57 AM
#6
For lightsabers hilt one single model and one single texture for that.
Replace function on mdlops will replace only hilt mesh, uvwmap and texture name. If you link more objects to your custom link , thise objects will be visible in replace window but you need to replace one mesh with another mesh.
Abot blade (planes)... my mistake. It was a hint and far from topic.

Alright I had a feeling that was what you were talking about, because I knew that the only real kink in my idea was with the replacer function of MDLops and selecting the object to be replaced, thanks for all the help oldflash. It's a shame really, in case curious mind were wondering, I was hoping to be able to have two textures so one texture could cover metallic parts of the hilt and use a shader and have the other texture be able to use the alpha channel as a punchthrough and make certain parts invisible. *sigh* oh well back to the drawing board.
 oldflash
08-23-2006, 6:05 AM
#7
Somethig like this I was try long time ago. I was try even multiple textures (set 2 textures for a single mesh). Sorry to give you bad news. Now I think to something else: using "blending additive" and "decal 1" which make transparency on black. The alpha chanell will be affected by envmaptexture and all texture will be affected by "blending additive" and "decal 1"
 Mav
08-23-2006, 8:08 PM
#8
Somethig like this I was try long time ago. I was try even multiple textures (set 2 textures for a single mesh). Sorry to give you bad news. Now I think to something else: using "blending additive" and "decal 1" which make transparency on black. The alpha chanell will be affected by envmaptexture and all texture will be affected by "blending additive" and "decal 1"

Ah, so you're saying it might be possible to have both a "metallic" part of the texture, with envmaptexture, and also have a transparent part of the texture, using "blending additive" and "decal 1". Just have to paint the invisible parts, black. Hmm, I might try that out later, the only bummer about that is you can't have anything else in the texture be black :xp:
 Darkkender
08-24-2006, 2:03 AM
#9
Ah, so you're saying it might be possible to have both a "metallic" part of the texture, with envmaptexture, and also have a transparent part of the texture, using "blending additive" and "decal 1". Just have to paint the invisible parts, black. Hmm, I might try that out later, the only bummer about that is you can't have anything else in the texture be black :xp:

Yes you can. Simply flood fill the area of the texture you want black with a color code like "010101" It will still be black to the naked eye however the ga,e engine itself will not recognize it as black and thus you will have Black on the model and a envmap area that is true black.
 oldflash
08-24-2006, 2:10 AM
#10
Yes you can. Simply flood fill the area of the texture you want black with a color code like "010101" It will still be black to the naked eye however the ga,e engine itself will not recognize it as black and thus you will have Black on the model and a envmap area that is true black.
That's good to know. Thanks Darkkender. I always think that the engine split texture in KYMC and use black chanell to set transparency.
 Mav
08-24-2006, 2:14 AM
#11
Yes you can. Simply flood fill the area of the texture you want black with a color code like "010101" It will still be black to the naked eye however the ga,e engine itself will not recognize it as black and thus you will have Black on the model and a envmap area that is true black.

That would most likely work, but I did a little test and it appears to be in vain anyway, my .txi was set up like so:

envmaptexture CM_Baremetal
blending additive
decal 1

however, it appears the "blending additive" makes use of the alpha channel, because it completely kills the texture, as you'll see. The black parts of the model are invisible, however, the alpha channeled parts of the hilt are well... take a look:
http://img89.imageshack.us/img89/9129/blendaddpr0.th.jpg) (http://img89.imageshack.us/my.php?image=blendaddpr0.jpg)
 Darkkender
08-24-2006, 2:26 AM
#12
I always space that Alpha shows up as black. Since I use gimp I always isolate the areas that should be transparent after telling gimp to add an alpha channel then I delete from my image all the black that should be transparent.

Now that I'm not confusing myself here Mav. When you made custom hilts for me in the past I've used this technique to retain the black on a models texture and have a seperate alpha area in the image to apply a envelope map texture.

What is KYMC Oldflash? I'm not familiar with this abreviation.
 oldflash
08-24-2006, 2:37 AM
#13
Sorry, right abreviation is CMYK: 32 bit image (black-yellow-magenta-cyan) used in printing system.
 Mav
08-24-2006, 2:37 AM
#14
Now that I'm not confusing myself here Mav. When you made custom hilts for me in the past I've used this technique to retain the black on a models texture and have a seperate alpha area in the image to apply a envelope map texture.
I'm not quite sure what you mean in that statement, but if I'm just using an envmaptexture, I don't have any problem keepign the black, my problem here is that I'm trying to make it so that the same texture and .txi file is using both an envmaptexture and "blending additive decal 1". Ideally the envmaptexture would apply the CM_baremetal to the parts which I designated with the alpha channel and teh "blending additive decal 1" would apply to anything black in the texture which I want to dissappear essentially. However, it appears that the game engine doesn't like that and the "blending additive decal 1" is also applying to the part of the texture that are designated with the alpha channel resulting in that ugly translucent white look.

Edit: It is a shame it's not working out really because I had a pretty good idea, but it doesn't look like it will become anything more than an idea.
 Darkkender
08-24-2006, 2:57 AM
#15
Try tweaking the shading of the area that you want to remain black untill the game retains the black. My suggested numbers above were an example case. There is alot of room to tweak colors to appear black however they aren't true black. Since oldflash threw out the CYMK factor that is throwing me off a little since a 32 bit image would technically be read into the engine as a 8 hex number format example would be "00000000" 2 bits for each color RGB and 2 bits for alpha also known as RGBA format. So I'm sure there has to be a point where the engine stops seeing black and begins to see the next shade however the next shade would still be black.

Do you have a ingame screenie of the results that your getting? That is since your screenie is a max screenie which does little for the resulting effect in game.
 Mav
08-24-2006, 3:11 AM
#16
Try tweaking the shading of the area that you want to remain black untill the game retains the black. My suggested numbers above were an example case. There is alot of room to tweak colors to appear black however they aren't true black. Since oldflash threw out the CYMK factor that is throwing me off a little since a 32 bit image would technically be read into the engine as a 8 hex number format example would be "00000000" 2 bits for each color RGB and 2 bits for alpha also known as RGBA format. So I'm sure there has to be a point where the engine stops seeing black and begins to see the next shade however the next shade would still be black.

Do you have a ingame screenie of the results that your getting? That is since your screenie is a max screenie which does little for the resulting effect in game.

Ok I think you and me are both confused here, in fact you got me wondering if were reading the same thread...

1. there screenshot above is of a hilt ingame

2. I'm not trying to retain any black at all in that picture

3. What I did was take the original texture and .txi, and added the blending additive to get the resultant .txi file
envmaptexture cm_baremetal
blending additive
decal 1

4. I was hoping to have the black parts of the texture appear invisible, by using the "blending additive decal 1", think of the black areas that surround the blade color in lightsaber blade textures.

5. I was also hoping that the parts of the texture that have an alpha channel applied to them, would appear metallic as they normally would if there was a just envmaptexture cm_baremetal applied.

edit: http://img89.imageshack.us/img89/9129/blendaddpr0.th.jpg) (http://img89.imageshack.us/my.php?image=blendaddpr0.jpg)
reposted the image, as you can see, it is an in-game screen...
 oldflash
08-24-2006, 3:14 AM
#17
Can you post texture as jpg?
 Mav
08-24-2006, 3:18 AM
#18
Can you post texture as jpg?

yea, gimme a sec to convert it, and I'll post a link to download the .tga and .txi

as a note though, the .txi and texture also have animated texture properties, I was sort of using this texture to test out various things.

Link to jpg (http://img221.imageshack.us/img221/2378/texturepz5.jpg)
link to download (http://dodownload.filefront.com/5451486//885af65913805c429968963d11b40645024b17268f65a88691) 12750d7cf9d4d75526aaf36256a969)
 oldflash
08-24-2006, 4:13 AM
#19
Something like this I make for purple double lightsaber. I was look over .txi

envmaptexture CM_Baremetal
proceduretype cycle
defaultwidth 64
defaultheight 64
numx 2
numy 2
fps 20
#blending additive
decal 1


ignore defaultwidth 64 and defaultheight 64 (has no effect) and try your texture without "blending additive" Should work.
 Mav
08-24-2006, 4:19 AM
#20
ok, I tried several different .txi combos with the texture and this is what I've come up with so far, the picture shows what is in the .txi file and the resultant product.

Link to Image - 518k (http://img227.imageshack.us/img227/612/txitexturecomparexg9.jpg)
 oldflash
08-24-2006, 5:41 AM
#21
I was look at your texture, split to CYMK, and here is the black chanell (oldflash.batcave.net/black.jpg). The gray parts are still make transparency not only 100% black.
I'm out of ideeas. :(
 Mav
08-24-2006, 5:54 AM
#22
no problem, I ran out of ideas a while ago, lol, thanks for all the help oldflash
Page: 1 of 1