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

Thread: Grey Screen

  1. #11
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by guiismiti View Post
    Why is it that I can't generate valid material+image with the asset_manager?
    I created a jpg file (supported format), it's a 512x512 green square. Then I followed the steps from this tutorial and got two tiny files. I set the green square as a fullscreen shader and I get an error when trying to load it.
    Code:
    ERROR: Couldn't open techniqueSet 'materials/techniquesets/
    =soE`v.gdf
    green
    104
    912561463
    79
    .te'
    WARNING: Could not find material 'green'
    Also tried using DXT5 instead of DXT3.
    It's the same error I was having with the killIcon yesterday when I gave up, but using the asset manager to create iwi+material seems like a very basic thing for modding.
    Thanks in advance.

    @kung foo man - I'm gonna try to use the white shader now.
    You cannot use .JPG to create a materials + .IWI file. It must be either .DDS or .TGA

  2. #12
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts
    Does anything look wrong? Spent quite some time without success so far.

    This is how I saved the DDS file:
    Click image for larger version. 

Name:	photoshop.png 
Views:	36 
Size:	64.4 KB 
ID:	762

    This is the asset manager:
    Click image for larger version. 

Name:	asset_manager.png 
Views:	36 
Size:	29.5 KB 
ID:	763

    The result of the asset manager are 40~50 bytes iwi and material.
    This is the material file opened with a hex edittor:
    Click image for larger version. 

Name:	hex.png 
Views:	36 
Size:	7.1 KB 
ID:	764

  3. #13
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    That is not a valid materials file. You aren't saving your .GDT file in the right location. It has to go into [COD2 INSTALL]/source_data/[name_of_custom_file].gdt

    Whenn you open Asset Manager, click "open" and navigate to the source_data folder and open your .GDT file. Then, click the entry you want to compile, and it should all work properly then.
    Last edited by Tally; 17th September 2014 at 00:20.

  4. The Following User Says Thank You to Tally For This Useful Post:

    guiismiti (17th September 2014)

  5. #14
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts
    Really stupid mistake..... I was getting the output .iwi from the cache directories instead of main/images.

    Thanks for helping anyway. I'm also saving the gdt on source_data from now on.

    Click image for larger version. 

Name:	airstrike_bomb.png 
Views:	35 
Size:	44.8 KB 
ID:	765
    Last edited by guiismiti; 17th September 2014 at 00:35.

  6. #15
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Quote Originally Posted by Tally View Post
    Hud elements are not vars. They are structs. Furthermore, and here is a PRO-TIP: if you check to see if the hud element is defined before you create it, you will never double your hud elements.

    And finally, all client hud elements are player elements. It is impossible for them to be otherwise. That is why they are called CLIENT elements. As in PLAYER! So, your nonsense-talk about local vars vs player vars is completely invalid.
    Im just saying that if you know what you're doing you dont need to store the hud in a player.var, but you can keep it in a normal var. (or struct for that matter, as hud elems are a special kind of struct again)
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  7. #16
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by IzNoGoD View Post
    Im just saying that if you know what you're doing you dont need to store the hud in a player.var, but you can keep it in a normal var. (or struct for that matter, as hud elems are a special kind of struct again)
    I know what I'm doing. But ever since I first met you, you've been trying to teach me how to mod. I keep telling you I know how to do it already, but you keep insisting on trying to teach me. If you can't get the message, then best if you don't reply to any of my posts. That way you wont fuck me off any more than you already have.

    Are we clear? Or do I need to draw you a picture?
    Last edited by Tally; 17th September 2014 at 01:55.

  8. #17
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts
    This is the final result for the green screen.
    This will create the green screen and also two vertical black bars aligned to left and right to make you have a squared view instead of fullscreen (rectangular) view.
    Tested on 1366x768 and 640x480, but not on 1920x1020 (although it should work).
    The only thing is, I set sort to 0 but the black bars are still over the clock.

    PHP Code:
    cameraScreen()
    {
        if(
    isdefined(self.hud_green))
            
    self.hud_green destroy();

        
    self.hud_green newClientHudElem(self);
        
    self.hud_green.vertAlign "fullscreen";
        
    self.hud_green.horzAlign "fullscreen";
        
    self.hud_green.alpha 0.4;
        
    self.hud_green setShader("white"640480);
        
    self.hud_green.color = (0,0.5,0);
        
    self.hud_green.sort 0;

        if(
    isdefined(self.hud_black1))
            
    self.hud_black1 destroy();

        
    self.hud_black1 newClientHudElem(self);
        
    self.hud_black1.vertAlign "fullscreen";
        
    self.hud_black1.horzAlign "center";
        
    self.hud_black1.= -492;
        
    self.hud_black1.alpha 1;
        
    self.hud_black1 setShader("white"180480);
        
    self.hud_black1.color = (0,0,0);
        
    self.hud_black1.sort 0;

        if(
    isdefined(self.hud_black2))
            
    self.hud_black1 destroy();

        
    self.hud_black2 newClientHudElem(self);
        
    self.hud_black2.vertAlign "fullscreen";
        
    self.hud_black2.horzAlign "center";
        
    self.hud_black2.312;
        
    self.hud_black2.alpha 1;
        
    self.hud_black2 setShader("white"180480);
        
    self.hud_black2.color = (0,0,0);
        
    self.hud_black2.sort 0;

    Click image for larger version. 

Name:	shot0000.jpg 
Views:	38 
Size:	81.8 KB 
ID:	766
    Last edited by guiismiti; 17th September 2014 at 02:48.

  9. #18
    Lieutenant Loveboy's Avatar
    Join Date
    Nov 2012
    Posts
    546
    Thanks
    229
    Thanked 72 Times in 46 Posts
    I just meant white-black screen like this:

    Click image for larger version. 

Name:	grey.png 
Views:	28 
Size:	1.36 MB 
ID:	767

  10. #19
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts
    Well I have no ideas for that

  11. #20
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by Loveboy View Post
    I just meant white-black screen like this:

    Click image for larger version. 

Name:	grey.png 
Views:	28 
Size:	1.36 MB 
ID:	767
    It can't be done in COD2. COD4 has engine functions to completely "wash" all color from the screen (r_filmEnable, r_filmContrast, r_filmDesaturation, r_filmInvert). No such functions exist in COD2.
    Last edited by Tally; 21st September 2014 at 10:34.

  12. The Following User Says Thank You to Tally For This Useful Post:

    kung foo man (21st September 2014)

Posting Permissions

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