Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Glowy models
#1
Hello everyone,
currently working on a different model for the cokebags. however, I'm getting this.
[Image: ZsXWbnD.jpg]
Also, other models (or actually parts of them) have this gray and glowy look as well. f.e. the screen of the laptop on Murky Station.
Any ideas?
Reply
#2
(03-20-2017, 08:45 PM)HONOUR AMONGST THIEVES Wrote: Hello everyone,
currently working on a different model for the cokebags. however, I'm getting this.
[Image: ZsXWbnD.jpg]
Also, other models (or actually parts of them) have this gray and glowy look as well. f.e. the screen of the laptop on Murky Station.
Any ideas?

It would be best if you give us the files first for us to check if they are correct or not. My best bet is an incorrectly saved dds file. There are 2 ways you can save a texture file (In Photoshop at least, I don't know about The Gimp which is terrible):
[Image: fp4cneN.jpg]
This will save your texture as lossless format, allowing for max quality texture (without artifacts on the texture after compression). You would use this if your texture is small.

[Image: TXoUHc0.jpg]
This will compress your texture to get a lower size file but will deteriorate the texture a bit. I usually don't prefer to use this one but it's only depending on what you want.

If after trying these 2 way of saving a dds file didn't help, you could check the alpha layer of your texture:
[Image: 5SpQhjM.png]
If the layer is full white or if there isn't any, then create one (if not existing) and fill it with black then check the result in-game.

[Image: TbK5CCU.jpg]
If after that it doesn't work, I don't really know what else could fix it.

If the problem persist, try sending the files here and I'll try to see why it doesn't work.
[Image: Babyforce.gif]
Reply
#3
I didn't change any textures. I merely changed the material_config to direct the textures to a different texture. I figure that it is because of that. Is it possible to override object files? If yes, I could just change the object files for the various cokebag props to direct them to a different material_config and keep those that use the default textures unchanged.
Reply
#4
(03-21-2017, 06:45 AM)HONOUR AMONGST THIEVES Wrote: I didn't change any textures. I merely changed the material_config to direct the textures to a different texture. I figure that it is because of that. Is it possible to override object files? If yes, I could just change the object files for the various cokebag props to direct them to a different material_config and keep those that use the default textures unchanged.

Depending on if the texture exists already in the game files or not, there are few different things you can do:
  1. 1. If you want to add a texture to the game, you need a add.xml at the root of your mod folder to add the file to the game with this inside: <table>    <texture path="path/to/your/texture" force="false"/></table>
           If you don't do that, the game won't see your texture and will think you're trying to apply nothing to the object, leaving it like this (or was it Yellow/Blue texture?

           2. If you're trying to apply an existing texture in the game files to the object, then either your .material_config has something wrong in it or the texture isn't adapted.

To be honest, I don't know in details what you're trying to do so I try to help with only the little details your giving me. You can also modify the .object file but I don't see why you would do that since you can only change the UV Map through it. You can't make them to redirect to few more .material_config, only 1 material_config per object file.

If you want to randomize the texture, adding the textures to the game and using a LUA mod for this seems to be more appropriate.

Again, I'm trying to help with the only details you gave me. Try to see if anything above worked or not.

(I was trying to make a good format but MyBB won't let me do that so I hope it's not too confusing)
[Image: Babyforce.gif]
Reply
#5
Payday 2 has two sets of cokebag models: The first style is the one that the default coke loot is built out of (units/world/props/apartment/cocaine/cokebag.material_config), the second style (units/pd2_dlc_flat/props/flt_prop_cocaine_bag/flt_prop_cokebagvaria.material_config) was introduced presumably with Panic Room and used most prominently on Scarface Mansion (cokebags with hidden recorder inside them). Both exist in four variations (Single cokebag, a variant of the former, ripped open, and depleted). I wish to completely replace the first style with the second.
However, the first style cokebag uses a texture that is also used by some other things, namely a coke mirror as well as two models for loose coke powder. Overriding that texture would mess up the textures for the mirror and powder. I think the glowy nature of the models may be caused by some parameters in the material_config of the second style which I had changed the original material_config to. At the time when I took the screenshot the cokebag.material_config was identical to flt_prop_cokebagvaria.material_config. I assumed if I could use the object file to make only the cokebag models refer to a different material_config, there would be no interference in terms of texture.
Reply
#6
(03-21-2017, 05:59 PM)HONOUR AMONGST THIEVES Wrote: Payday 2 has two sets of cokebag models: The first style is the one that the default coke loot is built out of (units/world/props/apartment/cocaine/cokebag.material_config), the second style (units/pd2_dlc_flat/props/flt_prop_cocaine_bag/flt_prop_cokebagvaria.material_config) was introduced presumably with Panic Room and used most prominently on Scarface Mansion (cokebags with hidden recorder inside them). Both exist in four variations (Single cokebag, a variant of the former, ripped open, and depleted). I wish to completely replace the first style with the second.
However, the first style cokebag uses a texture that is also used by some other things, namely a coke mirror as well as two models for loose coke powder. Overriding that texture would mess up the textures for the mirror and powder. I think the glowy nature of the models may be caused by some parameters in the material_config of the second style which I had changed the original material_config to. At the time when I took the screenshot the cokebag.material_config was identical to flt_prop_cokebagvaria.material_config. I assumed if I could use the object file to make only the cokebag models refer to a different material_config, there would be no interference in terms of texture.

Ok, now I understand the situation better. If you didn't change the model of the first coke bag and want to use the .material_config on it to avoid copying any texture file or anything, you must have done something wrong. There would be 2 way to proceed, although I'm pretty sure you'll have to replace the model as well:

To only replace the texture, place the cokebag.material_config in your mod_overrides folder like you did then change the code from:


Code:
<materials version="3">
   <material name="coke" render_template="generic:DIFFUSE_TEXTURE:NORMALMAP" version="2">
       <diffuse_texture file="units/world/props/apartment/cocaine/cocaine_atlas_df"/>
       <bump_normal_texture file="units/world/props/apartment/cocaine/cocaine_atlas_nm"/>
   </material>
   <material name="coke_trans" render_template="generic:ALPHA_MASKED:DIFFUSE_TEXTURE:EXTERNAL_ALPHA_REF:OPACITY_TEXTURE" version="2">
       <variable value="0.5" type="scalar" name="alpha_ref"/>
       <diffuse_texture file="units/world/props/apartment/cocaine/cocaine_atlas_df"/>
       <opacity_texture file="units/world/props/apartment/cocaine/cocaine_atlas_df"/>
   </material>
   <material version="2" render_template="generic:DIFFUSE_TEXTURE" name="coke_flat">
       <diffuse_texture file="units/world/props/apartment/cocaine/cocaine_atlas_df"/>
   </material>
</materials>

To:
Code:
<materials version="3">
   <material name="coke" render_template="generic:DIFFUSE_TEXTURE:NORMALMAP" version="2">
       <diffuse_texture file="units/pd2_dlc_flat/props/flt_prop_cocaine_bag/flt_prop_cokebag_df"/>
       <bump_normal_texture file="units/pd2_dlc_flat/props/flt_prop_cocaine_bag/flt_prop_cokebag_nm"/>
   </material>
   <material name="coke_trans" render_template="generic:ALPHA_MASKED:DIFFUSE_TEXTURE:EXTERNAL_ALPHA_REF:OPACITY_TEXTURE" version="2">
       <variable value="0.5" type="scalar" name="alpha_ref"/>
       <diffuse_texture file="units/pd2_dlc_flat/props/flt_prop_cocaine_bag/flt_prop_cokebag_df"/>
       <opacity_texture file="units/pd2_dlc_flat/props/flt_prop_cocaine_bag/flt_prop_cokebag_df"/>
   </material>
   <material version="2" render_template="generic:DIFFUSE_TEXTURE" name="coke_flat">
       <diffuse_texture file="units/pd2_dlc_flat/props/flt_prop_cocaine_bag/flt_prop_cokebag_df"/>
   </material>
</material>

This way, it should tell the game where exactly the texture is. I don't know if you did it before and I didn't try but it must work. The only thing I'm afraid of is "Will the texture fit the model properly?". If after some tests, the result isn't what you expected, I recommend you to replace the model itself as well. You seem to know how to proceed so I'm letting you do.

I hope it helped, I'm still here if you need more help.
[Image: Babyforce.gif]
Reply
#7
What you recommended was the first thing I tried. This has the flaw that the aforementioned other models ("cokemirror.model" and cokeplane_big.model") now refer to that texture as well and don't fit at all. I've figured it out by now. I simply merged both textures and changed the UVs of all the models so that the ones that use "cocaine_atlas" have their UVs on the right half of the model and the cokebags (using the "flt_prop_cokebag" texture) have their UVs on the left half of the merged texture. Works like a charm.
Thanks for your help.
Reply
#8
(03-21-2017, 10:52 PM)HONOUR AMONGST THIEVES Wrote: What you recommended was the first thing I tried. This has the flaw that the aforementioned other models ("cokemirror.model" and cokeplane_big.model") now refer to that texture as well and don't fit at all. I've figured it out by now. I simply merged both textures and changed the UVs of all the models so that the ones that use "cocaine_atlas" have their UVs on the right half of the model and the cokebags (using the "flt_prop_cokebag" texture) have their UVs on the left half of the merged texture. Works like a charm.
Thanks for your help.

I'm glad you finally found a way to fix it. I know I wasn't very helpful but you're welcome.
[Image: Babyforce.gif]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)