Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: How to change image/iwi in existing maps?

  1. #11
    Private
    Join Date
    Apr 2020
    Posts
    66
    Thanks
    28
    Thanked 14 Times in 13 Posts
    Here is a visual representation of what is happening.
    shot0010.jpgshot0011.jpgshot0012.jpgshot0013.jpg
    It seems like all the images have the same orientation regardless of the angles given... In the last picture is is displayed ok because the wall happens to be in the same orientation.

  2. #12
    Private pollo's Avatar
    Join Date
    Jul 2012
    Location
    Spain
    Posts
    116
    Thanks
    93
    Thanked 69 Times in 35 Posts
    I see. Well I succeeded to avoid that and play it perpendicular to the surface, but yeah for some reason it appears weirdly rotated. I also rotated the origin (commented function) to see if the fx follows the forward vector of the origin, but apparently it does not, which is the root of the problem

    Give it a try and do this lil workaround, normally it should be OK for axis-aligned surfaces. If it's no use then you'll have to go with the model approach.

    PS: In FX editor make your fx spawn 1 unit ahead in forward vector, so that it doesnt coincide with the surface and do that "flashing" thing. I left you an .efx I used inside the .iwd which has that already.

    z_pos.iwd
    Last edited by pollo; 12th March 2021 at 01:01.

  3. #13
    Private
    Join Date
    Apr 2020
    Posts
    66
    Thanks
    28
    Thanked 14 Times in 13 Posts
    Quote Originally Posted by pollo View Post
    I see. Well I succeeded to avoid that and play it perpendicular to the surface, but yeah for some reason it appears weirdly rotated. I also rotated the origin (commented function) to see if the fx follows the forward vector of the origin, but apparently it does not, which is the root of the problem

    Give it a try and do this lil workaround, normally it should be OK for axis-aligned surfaces. If it's no use then you'll have to go with the model approach.

    PS: In FX editor make your fx spawn 1 unit ahead in forward vector, so that it doesnt coincide with the surface and do that "flashing" thing. I left you an .efx I used inside the .iwd which has that already.

    z_pos.iwd
    Thanks again!!!
    You mean the rotateYaw() function i guess. I'll try to play with that and see. The fx in the last picture appears to be flashing but in fact is not. I had just included an alpha channel to see how it would work. I had already spawned the fx in a way so it did not coincide with the wall. If it doesn't work I'll have to go with the model approach (i try to avoid it because i haven't used blender or any other 3d software before) or just go with this method on axis aligned surfaces.

  4. #14
    Private
    Join Date
    Apr 2020
    Posts
    66
    Thanks
    28
    Thanked 14 Times in 13 Posts
    I decided to go the model approach since once it's created it is easier to manipulate.The hard part is to create the model... Too bad i couldn't make it your way. But maybe i use it to do fun stuff like playing a gif in the middle of the map or something. Thanks again for the effort and the info you shared. At least i learned something

  5. The Following User Says Thank You to agribilos For This Useful Post:

    pollo (12th March 2021)

  6. #15
    Private pollo's Avatar
    Join Date
    Jul 2012
    Location
    Spain
    Posts
    116
    Thanks
    93
    Thanked 69 Times in 35 Posts
    Yeah it'll be better that way, tho it's a bit of a pain in the ass to do hehe. Anyways you still can use the script to get the location of the model, since what is bugging is the playfx function. Hopefully it won't bug (in the past I placed models through script and they work fine in whatever angle).

  7. The Following User Says Thank You to pollo For This Useful Post:

    agribilos (12th March 2021)

  8. #16
    Private
    Join Date
    Apr 2020
    Posts
    66
    Thanks
    28
    Thanked 14 Times in 13 Posts
    Quote Originally Posted by pollo View Post
    Yeah it'll be better that way, tho it's a bit of a pain in the ass to do hehe. Anyways you still can use the script to get the location of the model, since what is bugging is the playfx function. Hopefully it won't bug (in the past I placed models through script and they work fine in whatever angle).
    Sure the script will be very useful but first i have to learn the basics of blender. If i am right the latest version that works with the "Blender to COD" is 2.63?

  9. #17
    Private pollo's Avatar
    Join Date
    Jul 2012
    Location
    Spain
    Posts
    116
    Thanks
    93
    Thanked 69 Times in 35 Posts
    Quote Originally Posted by agribilos View Post
    Sure the script will be very useful but first i have to learn the basics of blender. If i am right the latest version that works with the "Blender to COD" is 2.63?
    Last one that I know it's still supported is 2.78

  10. The Following User Says Thank You to pollo For This Useful Post:

    agribilos (13th March 2021)

  11. #18
    Private
    Join Date
    Apr 2020
    Posts
    66
    Thanks
    28
    Thanked 14 Times in 13 Posts
    I confirm it works with 2.78

  12. #19
    Private pollo's Avatar
    Join Date
    Jul 2012
    Location
    Spain
    Posts
    116
    Thanks
    93
    Thanked 69 Times in 35 Posts
    So I've been playing around with the models, so far it's working, though with a few decals (detail textures that overlap with normal textures, so to speak, like dirt on walls) you can see some of these through the signs. You'll also need to place them in sites that are flat, otherwise other brush that has different height will "eat" the sign (in the photo below you'll see it):

    signs.jpg

    I reworked a bit the scripts so that it lets you place the sign and remove it with melee button. Find inside the .zip the Maya scene (.ma + image texture), the model_export for if you want to import into Blender as well, and the .gdt to export both the texture + model to cod2 with Asset Manager. If you want to add more signs, you don't need to make another model, just need to:

    1. make a new material image with a different sign
    2. copy/paste the sign model from the xmodel folder eg. sign2
    3. open it with a text editor, change the material name to the new one (you'll find it easily among the rest of binary data: mtl_custom_sign1)

    and

    4. in script, make sure to precache it and change the name of the default model in _getpositions to test the new one, to test how it looks

    If you wish to only use one sign, you can just replace the texture .iwi with the IWI_X_DDS tool before.

    If you wish to change the size of the model, you can edit the model itself, or also re-do the texture adding alpha-channels (that manage the transparency) + setting to "Blend" in Asset Manager's blendFunc selectbox. For example, the alpha channel would be like this if you want to display on walls only the red text "Custom Sign" (the more white the more opaque; the more black the more transparent):

    alpha.png

    signs.zip

    Cheers
    Last edited by pollo; 13th March 2021 at 13:05.

  13. The Following User Says Thank You to pollo For This Useful Post:

    agribilos (13th March 2021)

  14. #20
    Private
    Join Date
    Apr 2020
    Posts
    66
    Thanks
    28
    Thanked 14 Times in 13 Posts
    Wow you did your miracle again!!! Thank you so much!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •