Results 1 to 5 of 5
  1. #1
    Palace Guard
    Join Date
    Jan 2010
    Location
    Germany
    Posts
    3,940

    Default Materials: apply UV to existing vector?

    I am currently trying to figure out how to create a MaterialFunction for a DetailNormalMap. My problem is that I can't find a way to combine the external scalar value for the detail UVs with the external texture input that I get as Vec3D:




    The TextureSampler seems to be the only way to get UV coordinates in the mix, but it doesn't accept anything except TextureObjects in it's Tex-input. And TextureObjects as function inputs are too inflexible for what I'd like to do, so is there any other way that I am missing here?
    Our Loop, which art in source code, hallowed be thy keyword.
    Thy condition come, thy instruction be done, in RAM as it is in cache.
    Increment us this day our daily counter,
    and forgive us our typos, as we also have forgiven our compilers.
    And lead us not to the nullpointer but deliver us from bugs.
    For thine is the API, the GUI, and the CLI while(true).
    Semicolon;
    Please don't send me questions about how to do something in the UDK via PM. That is better discussed in the forums and we only have limited PM storage.

  2. #2
    MSgt. Shooter Person
    Join Date
    Nov 2006
    Posts
    95

    Default

    I'm not sure I understand what you want to achieve by using the scalar value in the tex input:

    - If you want to adjust the UVs with it you could just use it between that append node and the texture sampler. For example: put in a multiply with the results from that append and your scalar to adjust the final UV scaling.
    - If you want to adjust anything else you should be able to do so after the texture sampler node.

    What exactly should the scalar value influence?

  3. #3
    Palace Guard
    Join Date
    Jan 2010
    Location
    Germany
    Posts
    3,940

    Default

    The append node ultimately is the scalar. Or do you mean the Vector3 when you say "scalar"?
    It goes into the TextureSample's UV input to scale the UVs. And in the TextureSample's Tex input did I direct the Vector3 in an attempt to have the Sampler scale it up by the UV scale.


    This is the full function.
    http://i47.tinypic.com/rbz6hf.jpg

    And this is how it would look properly when plugging TexObjects in. But as I said, this is not desirable as it doesn't provide any flexibility to modify the textures before they enter the function.
    http://i48.tinypic.com/a285m1.jpg
    Our Loop, which art in source code, hallowed be thy keyword.
    Thy condition come, thy instruction be done, in RAM as it is in cache.
    Increment us this day our daily counter,
    and forgive us our typos, as we also have forgiven our compilers.
    And lead us not to the nullpointer but deliver us from bugs.
    For thine is the API, the GUI, and the CLI while(true).
    Semicolon;
    Please don't send me questions about how to do something in the UDK via PM. That is better discussed in the forums and we only have limited PM storage.

  4. #4
    MSgt. Shooter Person
    Join Date
    Nov 2006
    Posts
    95

    Default

    Ah, I indeed misunderstood what you were trying to achieve. This makes a lot more sense now. (probably also helps that I'm now near UnrealEd so I could try it out for myself )

    However I'm afraid to say that what you want to do is not possible. It may seem logical that you could still adjust the UVs of the Vector3 input because you inserted a texture into it. However by plugging the texture into the Vector3 input you convert it to a simple color value which has no notion of UVs.

    For example: that Vector3 input could also contain a blend between two textures that use completely different UV sets or you could use a procedural gradient based on world space coordinates, which uses no UVs at all.

    If you want to be free to adjust the detail normal outside of the MaterialFunction you should consider leaving the final Add with the main normal map outside of the function. You could then adjust the output of the MaterialFunction however you like before adding it to the main normal map.

    Additionally I would expect the editor to give you a warning in this case instead of just turning the results black. The way the editor sort of acts like it should work is kind of confusing.
    Last edited by Arnage; 06-17-2012 at 07:48 AM.

  5. #5
    Palace Guard
    Join Date
    Jan 2010
    Location
    Germany
    Posts
    3,940

    Default

    Hmm, seems like an idea. Thanks for the help anyway.
    Our Loop, which art in source code, hallowed be thy keyword.
    Thy condition come, thy instruction be done, in RAM as it is in cache.
    Increment us this day our daily counter,
    and forgive us our typos, as we also have forgiven our compilers.
    And lead us not to the nullpointer but deliver us from bugs.
    For thine is the API, the GUI, and the CLI while(true).
    Semicolon;
    Please don't send me questions about how to do something in the UDK via PM. That is better discussed in the forums and we only have limited PM storage.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.