Texture Question

Want to edit the game, build your own craft and missions? Here you'll find help, tools, guides and people to discuss with.

Texture Question

jmarso
Cadet 1st Class
Posts: 240
Joined: Wed Apr 01, 2020 5:51 am

Post by jmarso » Thu Apr 02, 2020 11:45 pm

Found a free .obj download of Buck Rogers starfighter and am converting it to an OPT file.

It came textured; the textures were .jpeg files that loaded normally into XWA OPT Editor.

In game, the textures seem to 'glow'. This is with the bloom effect enabled with the new effects, but even without it enabled those glowy parts are still a lot brighter than the wings, even though the colors in the texture files are all the same. (See screenshot)

Question: is there a way to tone down those textures so that they don't glow like that? Disclaimer: I'm an absolute noob at OPT editing, so think of me as an idiot child when explaining it. :?
You do not have the required permissions to view the files attached to this post.

User avatar
blue_max
XWAU Member
Posts: 2296
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Apr 03, 2020 4:10 am

jmarso wrote:
Thu Apr 02, 2020 11:45 pm
In game, the textures seem to 'glow'. This is with the bloom effect enabled with the new effects, but even without it enabled those glowy parts are still a lot brighter than the wings, even though the colors in the texture files are all the same. (See screenshot)
The screenshot shows that you still have the Bloom effect enabled (not sure if that's what you intended to post). To disable the bloom effect, open Bloom.cfg and set "bloom_enabled = 0".

There are only 2 reasons why a texture will bloom: 1. If the texture is illuminated, the areas that are marked as illuminated will glow; and 2. Textures will glint when reflecting light from the main light source if they are metallic/plastic.

To fix #1, you need to open XwaOptEditor and check your textures (click on the "textures" tab on the left). Then check the "Is Illuminated" column. If it says "True" then you need to reset that to False. To do that, select the texture, then the "Illumination" tab and click on "Reset Illumination" at the bottom.

To fix #2, go to the Materials directory and create a new file with the name of your OPT but with extension .mat. For instance if your OPT is called "BuckRogers.opt", then create a new file called "Materials\BuckRogers.mat" and put the following:

Code: Select all

[Default]
Metallic   = 0.0
Intensity  = 0.0
Glossiness = 0.0
That should remove all the glint. I know the materials are not documented anywhere, so I'm sorry about that. I'll try to post some information later; but it's much easier to understand with images and that's going to take a little bit.

You could also use Jeremy's ddraw to check your craft because that's the golden standard.

jmarso
Cadet 1st Class
Posts: 240
Joined: Wed Apr 01, 2020 5:51 am

Post by jmarso » Fri Apr 03, 2020 5:00 am

Thanks for the reply.

Looked at Fix #1 and the textures were already all set to 'False', so no luck there.

Fix #2 produced an odd result. See the screen shot below; I tried a few different numbers for the three values in there as well, and copied and paste some from other .mat files just to see what would happen. The final result in each case was either 'all' or 'nothing'. 'All' would be the screenshot I put in the OP, with glowing textures. 'Nothing' looks like the screenshot below:
You do not have the required permissions to view the files attached to this post.

jmarso
Cadet 1st Class
Posts: 240
Joined: Wed Apr 01, 2020 5:51 am

Post by jmarso » Fri Apr 03, 2020 5:02 am

Just for comparison, the OPT looks fine in the Cockpit HUD.
You do not have the required permissions to view the files attached to this post.

jmarso
Cadet 1st Class
Posts: 240
Joined: Wed Apr 01, 2020 5:51 am

Post by jmarso » Fri Apr 03, 2020 5:07 am

Something else I'm having trouble figuring out is unrelated to textures. The hardpoints on this model are below the eyeline of the pilot, but in the HUD the weapon indicators appear in the top of the reticle, and in first-person (cockpit view) the lasers seem to fire from the 10 and 2 o'clock positions.

The good news is that they're shooting yellow with Buck Rogers sound fx. :D
You do not have the required permissions to view the files attached to this post.

User avatar
blue_max
XWAU Member
Posts: 2296
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Apr 03, 2020 5:59 am

I probably need to take a look at the OPT itself to see what's going on with the textures. If possible, please post your SSAO.cfg and Bloom.cfg files too. One thing, though: try not to use 100% white textures. Use 80% gray or something like that.

Regarding your other questions -- I don't know; but others might be able to help you.

jmarso
Cadet 1st Class
Posts: 240
Joined: Wed Apr 01, 2020 5:51 am

Post by jmarso » Fri Apr 03, 2020 6:17 am

I'll PM you those files tomorrow. Appreciate the assistance.

jmarso
Cadet 1st Class
Posts: 240
Joined: Wed Apr 01, 2020 5:51 am

Post by jmarso » Fri Apr 03, 2020 11:10 pm

Here's another texturing question:

Collada files come with a model.dae file and a model folder with the textures as a TGA file. Is there a known process for converting these to a textured obj file that can be imported via XWA OPT Editor?

Bman
Lieutenant Commander
Posts: 1170
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Sat Apr 04, 2020 4:44 am

Other options... Go to your in-game video menu and turn down the brightness to dim. I'm not sure about skirmish mode but for a custom mission file you can use Allied tool to turn down the brightness of each backdrop flight group. 0.1 or 0.01 or 0.001 or maybe zero is lowest light emitting strength you can set for stars, planets, galaxies and so on
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

jmarso
Cadet 1st Class
Posts: 240
Joined: Wed Apr 01, 2020 5:51 am

Post by jmarso » Sat Apr 04, 2020 5:07 pm

blue_max to the rescue!

Just wanted to give him a shout-out for cracking the code on the glowing textures issue. Turned out to be a glitch of file wording in a model that wasn't necessarily designed for gaming. If something is labeled a 'xxxlaser' in the obj file, the game thinks it's a laser and makes it glow!

Below are a couple screens of the finished product, in two different texture versions:
You do not have the required permissions to view the files attached to this post.

jmarso
Cadet 1st Class
Posts: 240
Joined: Wed Apr 01, 2020 5:51 am

Post by jmarso » Sat Apr 04, 2020 5:10 pm

Uno mas...
You do not have the required permissions to view the files attached to this post.

User avatar
Driftwood
Admiral (Moderator)
Posts: 2174
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Sat Apr 04, 2020 6:02 pm

You should get some L/R/T/B/F/R angles on those texture jobs ingame because it's really hard to assess the details or which one "looks cooler" from the provided images. Objectively from what I've seen, the lighter color version above looks better than the darker one that I can only see the rear on.

That said, I'm actually quite impressed with how well the textures have held up, or perhaps rather are enhanced by the current beta rendering processes!

There are a few oooooold opts, a few of which from Flavid that I think beg re-hosting and perhaps some QA updates given how well they've held up over time and it'd be a shame to lose them entirely.

jmarso
Cadet 1st Class
Posts: 240
Joined: Wed Apr 01, 2020 5:51 am

Post by jmarso » Sat Apr 04, 2020 6:14 pm

Another look at the grey texture
You do not have the required permissions to view the files attached to this post.

jmarso
Cadet 1st Class
Posts: 240
Joined: Wed Apr 01, 2020 5:51 am

Post by jmarso » Sat Apr 04, 2020 6:18 pm

I might have asked this before, but does anyone know a process or utility that would allow a textured sketchup or collada file to be converted to obj/mtl without losing the textures along the way?

I've found a treasure trove of free 3D models, mostly BSG, and in some formats (notably sketchup) they come textured. I just can't find a way to convert them from their original format --> obj --> opt without losing the textures. Maybe there is no way to do it; I don't know. I just don't know enough about the texturing process.

User avatar
blue_max
XWAU Member
Posts: 2296
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sat Apr 04, 2020 11:12 pm

I think you can probably import the Collada files in Blender and then export that to OBJ format. Once in OBJ format, you should be able to load them in XwaOptEditor. At some point along the way, you'll have to rename the materials to follow the TEXNNNNN naming convention.

A few more tips: if you add transparency to the cockpit glass texture, it will automatically glint when receiving light at the right angles.

Try adding shading material definitions to your OPT. Like I said before create a file under "Materials\<OptName>.mat" and write something like:

[Default]
Metallic = 0.5
Intensity = 0.8
Glossiness = 0.1

"Metallic" goes from 0 (plastic) to 1 (fully metallic). Metallic areas have specular reflections that take the color of the texture. Plastic reflections are always white.
"Intensity" goes from 0 to 1. This is the intensity of the specular glint
"Glossiness" is exponential from 0 (the glint is spread) to 1 (the glint is focused, like a shiny surface).

Different textures can have different material definitions. There are lots of examples in the "Materials" directory in release 1.1.1

jmarso
Cadet 1st Class
Posts: 240
Joined: Wed Apr 01, 2020 5:51 am

Post by jmarso » Sun Apr 05, 2020 12:02 am

I downloaded blender today and tried exactly what you were saying- for some reason the Collada files won't import properly into blender so that isn't working- after much research I had high hopes for that process. It's not that it just wouldn't import the textures- it wouldn't import the DAE file either. After some research I found that I'm not the only one having that problem.

I'll try what you said with the .mat file.
Last edited by jmarso on Sun Apr 05, 2020 1:10 am, edited 1 time in total.

User avatar
blue_max
XWAU Member
Posts: 2296
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sun Apr 05, 2020 12:07 am

Well, there may be other 3D software that can transform Collada into OBJ or other intermediate formats. I guess it's a matter of trial-and-error unless someone knows for sure how to do that.

jmarso
Cadet 1st Class
Posts: 240
Joined: Wed Apr 01, 2020 5:51 am

Post by jmarso » Sun Apr 05, 2020 1:45 am

Converting between file formats is really no problem at all, and I have most of these models in multiple formats, but I only have the textures in the Sketchup / Collada versions (from 3D Warehouse). The problem is the textures- there apparently aren't many ways to carry the textures over to the new format as well.

Playing with blender earlier, I did an experimental export of an obj file. I then loaded it back into XWA OPT editor, and found that the textures didn't come with it. Turns out that blender masticated the mtl file- I was able to edit the mapping lines in that and then the textures worked again, so exporting from blender to obj with textures works okay as long as you shepherd along the mtl file.

As for importing from collada into blender, I don't know what the deal is. I tried a couple troubleshooting tips but nothing worked, and today was literally my first day messing around with blender. I figure if the people who've been using it forever can't figure it out, I probably won't. It's frustrating as hell- there's all these programs and formats, and then you find a process that SHOULD work and it's inexplicably borked. Someone has already done all the work and these models / textures look great, but they are all but unusable unless I want to try to learn texturing and then texture them all one by one, which ain't gonna happen. :zensur:

User avatar
Driftwood
Admiral (Moderator)
Posts: 2174
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Sun Apr 05, 2020 1:47 am

It also may be required to download a 3rd party .dae importer. I've had mixed results trying to import things apart from .3ds, .Obj, .fbx, .dxf.

One thing that may be an option is buy a license for 3d object converter and attempt to import the .dae file into it and save it as .Obj.

I use the program quite a lot as in the event the textures don't import correctly, assuming it can load whatever the 3d file format it is, you can manually re-assign texture images within the program and save as whatever format, .obj is usually what I use, and the textures will be applied correctly if the UV map isn't broken and the correct texture files are assigned to the right material slot. It's pretty straightforward even without a tutorial since the material slots tell you what texture names are.

jmarso
Cadet 1st Class
Posts: 240
Joined: Wed Apr 01, 2020 5:51 am

Post by jmarso » Sun Apr 05, 2020 2:07 am

Any advice on a third party DAE importer?

I'm also not totally convinced that the problem isn't with the source DAE files on 3d warehouse, because apparently collada in general has its issues. But I guess the way to ferret that out would be to try something other than blender and see what happens.

User avatar
Driftwood
Admiral (Moderator)
Posts: 2174
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Sun Apr 05, 2020 2:47 pm

Not really no, I have had very bad luck with .dae files working in general and having since just reformatted my system my blender version updated and I'm not sure if I had a 3rd party plugin or the default.

Other files I've not had any luck with are gmax and milkshape related files. Last I saw there aren't any plugins that work.

Also, 3d object converter also doesn't seem to load .dae for me (at least the files I tried). Though, blender seems to be able to import some .dae files.

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Sun Apr 05, 2020 8:32 pm

jmarso wrote:
Sat Apr 04, 2020 6:18 pm
I might have asked this before, but does anyone know a process or utility that would allow a textured sketchup or collada file to be converted to obj/mtl without losing the textures along the way?

I've found a treasure trove of free 3D models, mostly BSG, and in some formats (notably sketchup) they come textured. I just can't find a way to convert them from their original format --> obj --> opt without losing the textures. Maybe there is no way to do it; I don't know. I just don't know enough about the texturing process.
So you were able to get the geo converted to obj, just not the textures? What did that process look like?

Targa is becoming a bit obscure. I wonder if the trick is to convert them to something like png first?

User avatar
Driftwood
Admiral (Moderator)
Posts: 2174
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Sun Apr 05, 2020 11:23 pm

keiranhalcyon7 wrote:
Sun Apr 05, 2020 8:32 pm
Targa is becoming a bit obscure. I wonder if the trick is to convert them to something like png first?
Also, it's worth noting that if you have issues with a photo editing program (like I often do) converting stuff over from a particular format like .dds or .tga, you can open them in blender and then go into the UV editor and load a texture file and hit "Save As" tab and select a file format to re-save the file as that will duplicate the file leaving the original file untouched and leaving you with a new file in say .png, or .jpeg.

jmarso
Cadet 1st Class
Posts: 240
Joined: Wed Apr 01, 2020 5:51 am

Post by jmarso » Mon Apr 06, 2020 3:00 am

Gawd, this is KILLING ME! :kopfwand:

Trying it in Rhino 6 now.

Again, I can import the sketchup file no problem into Rhino. It shows up fully textured in Rhino. I can save it in 3dm, 3ds, or even technically as an OBJ file, but once again the textures aren't exporting and the mtl file for the obj is incomplete. However, if I can save in 3dm or 3ds, should be fine, right? Because with XWA OPT Editor I can import a 3dm file directly, and there is another tool, 3ds->opz, which converts a 3ds file into the format used by OPTECH. The saved 3dm files are large enough that the textures should be baked in there, and when opening a saved 3dm file back into Rhino, the textures are still there. Is there only supposed to be the 3dm file, or a separate texture file / folder as well?

Nothing will import into XWA OPT Editor. Importing a 3dm file, I get the following error message:

SystemArgumentOutOfRangeException: Specified argument was out of range of valid values. Parameter name:fileName at JeremyAnsel.XWA.OPT.Texture.FromFile(String fileName, String fileNameAlpha, String fileNameIllum) at OptRhinoConcverter.Converter.RhinoToOpt(String rhinopath, Boolean scale at XwaOptEditor.ViewModels.MainWindowViewModel.<ExecuteImportRhinoCommand>b_101(Action 1 dispatcher) in C:\projects\xwaopteditor\XwaOptEditor\XwaOptEditor\ViewModels\MainWindowViewModel.cs:line 547.

Furthermore, OPTECH is not finding the textures from a converted OPZ file. The wireframe shows up, along with the message: "The texture "default.bmp" is missing." That particular file is in the OPTECH folder, and the program also appears to copy it to whichever folder the opz file is in, so I don't understand that one either.

I can only conclude:

1. I am doing something wrong in Rhino in the process of either importing or saving these files in different formats, although it seems to be pretty cut and dried. Maybe I'm missing a step somewhere.

2. There is some disconnect between either XWA OPT Editor and/or OPTECH and Rhino 6. Does anyone know which version of Rhino was in use when these tools were created?

Anyone with experience using either Rhino or these tools, if you can see where the fail is happening here, please illuminate me! :hilfe:

jmarso
Cadet 1st Class
Posts: 240
Joined: Wed Apr 01, 2020 5:51 am

Post by jmarso » Sun Apr 19, 2020 3:32 am

Anyone know what causes, basically, a 'bad face' error when trying to import an obj file into XWA OPT Editor? Obviously it's a face the editor doesn't like, but what should I be looking for? I get the error sometimes even on low poly models that have been 'cleaned' in blender.

Post Reply