Author Topic: Using multiple textures  (Read 4798 times)

0 Members and 1 Guest are viewing this topic.

Offline Mahak

  • 25
Using multiple textures
Howdy all,

Has anyone nailed down specific methods for using multiple textures on the same model?

I'm trying to use 2 textures on one model, however when I bring it over into pcs2 it will only show the first texture on the whole model.
I have tried using a different heirachy setup:
detail0 (group)
   --detail0_01 (uses texture 1)
   --detail0_02 (uses texture 2)
... as well as just having one single model (looking at the orion for reference, which is just a single model with around 6 different textures attached).  Using the above setup simply results in the second mesh (with the second texture) not appearing at all.

Going through the forums I've found a couple of different opinions as to how this should work, but none work for me!  D'oh!

Any clues?

M.

 

Offline Rodo

  • Custom tittle
  • 212
  • stargazer
    • Steam
Re: Using multiple textures
Those multiple textures on the Orion might be those Detail Boxes I've been hearing all around for a while now.

Try checking this Wiki entry, might give you a hint about how to use one of those.
el hombre vicio...

 

Offline Water

  • 210
Re: Using multiple textures
Which app are you using to export to pcs2? and are you using cob or dae?

 

Offline Aardwolf

  • 211
  • Posts: 16,384
Re: Using multiple textures
Those multiple textures on the Orion might be those Detail Boxes I've been hearing all around for a while now.

Try checking this Wiki entry, might give you a hint about how to use one of those.

Completely irrelevant. Detail boxes are an SCP feature typically used to save the renderer drawing time by ruling out specific highly-detailed parts of ships unless the viewpoint is within a certain region around the ship.

As for the OP, it probably depends on how you export/import/etc., provide more details

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
Re: Using multiple textures
K. Texturing on the Orion is a bad example of efficiency. As many of those maps, are multiple maps just to one LOD.

The idea is that the base diffuse texture is to be mip-mapped and the lower LODs inherit that providing they are wrapped to the base map as well. So that you don't need a separate texture for each LOD, just one texture that get's loaded and used for all LODs, to which -shine, -glow and -normal all touch on at visible range when appropriate.

Multiple textures in one model should only ever be the case where you need a 1024x1024 and a 512x512 but don't want to waste the space of making it 2048x2048, as an example, or when the UV-Unwrap geometry makes it damn near impossible to unfold to a single map.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Water

  • 210
Re: Using multiple textures
Multiple textures in one model should only ever be the case where you need a 1024x1024 and a 512x512 but don't want to waste the space of making it 2048x2048, as an example, or when the UV-Unwrap geometry makes it damn near impossible to unfold to a single map.
If it's a cap ship...  not really. Multiple textures are standard when using tiled textures. His main problem is the exporter, it may only be able to handle one texture per object. Two options, one is to export to dae, the other by splitting the mesh into parts, one for each texture.

 

Offline Mahak

  • 25
Re: Using multiple textures
I imagine that my next comment will generate a load of "well, there's your problem"...

I'm using maya, exporting to dae (using colladaMaya), and using the collada version of PCS2.  On principle I will not be installing a 5 year old version of max or truespace to use, so please don't ask me to download and use those programs!  I'm aware that there is more support for max & truespace, but I also know that people around here use maya, and I can't see why I shouldn't be able to get the same results with it.

Anyways, I've tried both a single mesh & mutiple meshes, neither work.  It almost seems to be related to a naming convention thing, as whatever texture I name xxx_01 works, and xxx_02 fails to appear.

I'm using 2 textures because one has an ambient occlusion pass so needs to be 1:1 uv ratio, the second texture is tiled for larger, less detailed geometry sections.  I'm using dds textures, so it's not about mip mapping.

Hopefully thats enough detail, I don't know what else I can mention without it devolving into artspeak!

Cheers for all your replies guys,

M.

 

Offline Water

  • 210
Re: Using multiple textures
Anyways, I've tried both a single mesh & mutiple meshes, neither work.  It almost seems to be related to a naming convention thing, as whatever texture I name xxx_01 works, and xxx_02 fails to appear.
Rename texture xxx_01 to xxxaaa and xxx_02 to xxxbbb, that'll confirm if there is a naming problem.

The next thing to check is your export settings.

 

Offline Mahak

  • 25
Re: Using multiple textures
Good thinking water!  I did try that, and yes, whatever comes first (xxx_01 or xxx_A) is the texture that is displayed on the whole mesh (if I export as 1 mesh), and if I export as 2 separate meshes whatever mesh has the second material does not show at all.

Interestingly, PCS2 does register that there are 2 textures applied to the mesh (the 2 texture names appear under the 'textures' tab), it just doesn't display them or export them to pof if I try...

I can't see anything obvious in the export settings...  There were some extra attributes on the shaders for the orion (saved to .dae from pof file) which I played around with, but they didn't seem to make any difference...

Just to make sure, everything uses the same naming convention, so the dds's in the maps folder, the shaders in maya, and also those extra attributes I mentioned above all have matching names...

This is driving me bananas!!!

 

Offline Water

  • 210
Re: Using multiple textures
Can you create a cube, have 3 faces using texture one and the others three with texture 2. Export as dae and post here.

  

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Using multiple textures
What version of PCS2 are you using?  The 2.0.3 one from Nov 7th 08 is the one to use.  If you have the 2.1 Alpha version that may be your problem as it has loads of issues. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline Mahak

  • 25
Re: Using multiple textures
I'm using PCS2 v2.0.3, from november 7th, so all good there.

I've done a test as you mentioned Water, the dae will expect the maps in c:\test_01\.

Test_01.zip - 3.14 KB

See what you think...

EDIT: Dang it, can't get a direct download link working, sorry you'll have to nav to fileswap using the link above and download from there...
« Last Edit: January 24, 2010, 03:23:55 pm by Mahak »

 

Offline Water

  • 210
Re: Using multiple textures
Opened it in another viewer that can import dae, and the materials were all there. PCS2 obviously interprets it a bit differently, so you may need to experiment.

As an example: In Blender I can unwrap a cube, create two materials with images, and assign them to the faces. When I export it, it won't work.

Instead with no material and just using the uv editor and assigning each of the faces a different  texture will work. So for a Blender export it cares about the uv assigned texture rather than the assigned material.

Also if I change export  triangles to export polygons, the cube won't show in pcs2. So it may be worthwhile for you to set exportTriangles=1

 

Offline Mahak

  • 25
Re: Using multiple textures
Hmmm yeah it seems like maya is stripping off some info somewhere - I can open up a dae that's been saved out from pcs2, but if I open that dae (for example, the orion from freespace2) and re-export, it loses the multiple materials...

I guess I'm going to be crawling through the dae's in a text editor line-by-line to see whats different.  Sigh.

Cheers for your help with that, it's given me clues what to look for.  One of the problems is that I can't do what you suggested, and directly apply the texture file.  Maya's node system requires a shader material for each texture file node, so far as to auto-create a shader if you try and use a texture file by itself, and I suspect that collada/pcs2 doesn't deal with maya's shaders well or something...

If anyone here uses maya and knows a way around this, please let me know!

 

Offline Spicious

  • Master Chief John-158
  • 210
Re: Using multiple textures
I get a blue and red cube with my last build (which is a somewhat unstable (especially for other people) 2.1 alpha). It's probably a bug from back then that no one noticed at the time.

 

Offline Mahak

  • 25
Re: Using multiple textures
Well how about that!  Guess I'm using your build from now on, works brilliantly!  And if there are issues with your build all I need to do is save out the dae from 2.1 & I should be able to open it with 2.0.3, I'm guessing...  We'll see.

Anyways, thanks heaps for looking into that, much appreciated!

M.