Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

Howto Change Color on Static Mesh?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Howto Change Color on Static Mesh?

    Hello

    How do you change the color of a static mesh programatically? Is this possible?

    I would like to change the entire color of the object. Is there a function in Actor that can accomplish this or do I have to modify the texture on the static mesh.

    Thanks for your help.

    #2
    I believe under the static meshes properties-display, theres a skin option. Click new and put the texture in and that should do it.

    Comment


      #3
      Hey, thanks for the replay --- btw - HaloUT looks awesome: good luck with that project!

      As for what i am in need of, I want to use Unreal Script to change the color not the editor. Is there a way of doing that?

      Comment


        #4
        What exactly are you trying to do? Change the color of a static mesh or bsp brush thats been built into the level from code? If thats the case I dont think that will be possible since youd have to rebuild lighting and all that stuff. But if you just want to change the color of like a projectile, weapon or vehicle all you have to do is change its default texture.

        Comment


          #5
          Hey,
          I want to change an object like a vehicle. So how do I change the Texture?

          Thanks

          Comment


            #6
            Skins[0] = texture'Package.texture';


            you need to change the bold texture to shader, when using a shader, or FinalBlend for a FinalBlend and wow this is a suprise Combiner when using a combiner...

            Comment


              #7
              Would this allow you to change the texture of an object on the fly using a keypress or something?

              Comment


                #8
                You could do that but that would require an exec function or an interaction or something. Usually most objects with textures or meshes have it in the default properties. So for a vehicle mesh:

                Mesh=SkeletalMesh'coolmeshes.coolmesh'

                Comment


                  #9
                  Textures can be changed on the fly easier then meshes, using the above that I posted

                  Comment


                    #10
                    ya I know, I was just giving an example

                    Comment


                      #11
                      Does the texture have to be in the same package as the replacement texture?

                      I'm tyring to get it to change with the press of a key and in my log it registers that it's hitting the object and, supposively, changing the texture. However, nothing seems to be happening.

                      Comment


                        #12
                        the easy way to do this would be to make the color textures in a texture package. or the harder way, could be done completely via the code by using the code to create a colorcombiner (I think thats the correct one) texture, then assign the new texture to the staticmeshes skins array, at the point where you want it.

                        Comment


                          #13
                          That's an intersting approach. What I'm trying to to now is use the code from texturetrigger and then somehow link it to the player depending on which room they're in. That dosen't solve the problem of their orientation, but it's a step in the right direction I think...

                          Comment


                            #14
                            Read the part about 'Skins' (scroll down just a little)

                            And apply a modifier (like ColorCombiner) that uses the original texture and the new color u want. Then assign this new modifier for the staticmesh skin.

                            That really only works if u know of what SM that will be used. Otherwise if you are thinking about doing it to any/all SM's then I would say your best bet would be something like maybe a projector or using a Light with the bSpecialLit = true (you would have to code for the SM to do the same)

                            Comment


                              #15
                              Yeah. I think th ebest way to do this might be to rebuild the level as all static meshes...we've used BSPs thus far...I don't know what that will do to the way the game runs though...

                              Comment

                              Working...
                              X