Announcement

Collapse

Forum Rules

  • No flaming or derogatory remarks, directly or through insinuation.
  • No discussion, sharing or referencing illegal software such as hacks, keygen, cracks and pirated software.
  • No offensive contents, including but not limited to, racism, gore or pornography.
  • No excessive spam/meme, i.e. copious one liners in a short period of time, typing with all caps or posting meme responses (text/image).
  • No trolling, including but not limited to, flame incitation, user provocation or false information distribution.
  • No link spamming or signature advertisements for content not specific to Dota 2.
  • No Dota 2 key requests, sell, trade etc.
  • You may not create multiple accounts for any purpose, including ban evasion, unless expressly permitted by a moderator.

  • Please search before posting. One thread per issue. Do not create another thread if there is an existing one already.
  • Before posting anything, make sure you check out all sticky threads (e.g., this). Do not create new threads about closed ones.
  • It is extremely important that you post in correct forum section.

  • Balance discussion only in Misc.
  • All art related (such as hero model) feedbacks go to Art Feedback Forum.
  • All matchmaking feedback should go here: Matchmaking Feedback
  • All report/low priority issues should go here: Commend/Report/Ban Feedback
  • No specific workshop item feedback. These should go to workshop page of that item.
  • When posting in non-bugs section (such as this), use [Bugs], [Discussion] or [Suggestion] prefix in your thread name.



In case you object some action by a moderator, please contact him directly through PM and explain your concerns politely. If you are still unable to resolve the issue, contact an administrator. Do not drag these issues in public.



All rules are meant to augment common sense, please use them when not conflicted with aforementioned policies.
See more
See less

Dynamic material expression issues?

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

  • Dynamic material expression issues?

    Hi, I'm working on changing a material for the dire sfm tower (to use in an sfm for the saxxys) and I'm having a couple issues:

    1) the documentation on the dynamic expressions are lacking maybe? It's hard to tell, but I'm not exactly sure what "time" really is. Is it on some sort of frequency? Is it in game tick rate or is it something else? small stuff like that could be improved I think. And a google search really isn't giving me many answers.

    2) When I create a dynamic material expression like this into any of the options, I get a nice slow rolling or in and out fading like I want. But when I go to render a scene with the model and material in there, all of the sudden the dynamic material expression now looks really fast. But it looks fine when I played it in the s2fm clip editor and when I was working on it in the material editor.

    Here is the v console output:

    Code:
    [   AssetSystem            ]: Reloading Resource [1/6]: materials/bad_tower002_color_psd_be36b9e6.vtex_c/bad_tower_sfm_color_tga_36816850.vtex
    [   AssetSystem            ]: Reloading Resource [2/6]: materials/tower_model_dire/tower_bad_sfm_animated.vmat
    [   AssetSystem            ]: Reloading Resource [3/6]: materials/tower_model_dire/dire_bad_tower_scroll_speed_tga_4fef122f.vtex
    [   AssetSystem            ]: Reloading Resource [4/6]: materials/default/default_normal_tga_7652cb.vtex
    [   AssetSystem            ]: Reloading Resource [5/6]: materials/default/default_fresnelwarprim_tga_d9279d65.vtex
    [   AssetSystem            ]: Reloading Resource [6/6]: materials/models/heroes/chaos_knight/chaos_knight_motion_fire_2_detail_tga_7cfee8c5.vte  x
    [   AssetSystem            ]: Flushing persistent asset info to disk, 638.589 seconds since last, 1000 change delta
    [   AssetSystem            ]: AssetSystem saved persistent info for 1 layers / 99 assets in 0.005 sec
    So nothing unusual, and here is a video demonstrating the issue:



    edit: and this is what I get on render:



    -----------------------------------------------

    edit: So I found out that progressive refinement of any amount in the render settings is what is causing the issue. Kind of lame since I would like depth of field, but that's okay I guess.
    Last edited by moartuba; 09-02-2016, 07:06 AM.

  • #2
    Time is just system time, from what I can tell since it can follow through with the render of the dynamic expression even when the window/preview is out of focus. Most of the expression functions are a bit hard to use if you don't know how they work properly or how they can be combined with each other. Even simple functions like lerping are pretty useful on their own and can give you an achievable effect.

    Comment


    • #3
      Originally posted by Toyoka View Post
      Time is just system time, from what I can tell since it can follow through with the render of the dynamic expression even when the window/preview is out of focus. Most of the expression functions are a bit hard to use if you don't know how they work properly or how they can be combined with each other. Even simple functions like lerping are pretty useful on their own and can give you an achievable effect.
      I was wondering about that. But how could I get a function to only apply to 1 of the tex coord offsets? any returned value would be input into both value fields. I assume I might be able to to some variables from inside the shader engine itself much like the game code driven dynamic expressions, but I'm still finding references to be difficult for this material.

      Comment


      • #4
        Yea, unfortunately it seems that the dynamic expressions are tied to the property itself, so you might be out of luck trying to modify a particular part of the property (such as 1 texture co-ordinate over another). Maybe some of the variables exposed to us on the Dynamic Expressions wiki page can do something to the effect of modifying a part of the material's property, though that may be unlikely.

        Comment


        • #5
          Originally posted by Toyoka View Post
          Yea, unfortunately it seems that the dynamic expressions are tied to the property itself, so you might be out of luck trying to modify a particular part of the property (such as 1 texture co-ordinate over another). Maybe some of the variables exposed to us on the Dynamic Expressions wiki page can do something to the effect of modifying a part of the material's property, though that may be unlikely.
          Any ideas on how to make, lets say, blend change over time? sin(time) works and you can use a function like that, but I want to do a stepwise style function with time. So I could use the conditional in this way:

          Code:
          return      time >= 6   ?   10 : 0;
          But I'm not really sure what time is giving me whether it's seconds, date, whatever. I would like to probably shove in some more stuff so it isn't a static value past 6 seconds in, but I need to get this part working before I can move on to somethign like this (assume time was seconds starting from 0):

          Code:
          return      time >= 6 && time <= 10   ?   sin(.75*time) : 0;

          Comment


          • #6
            No idea, to be honest. The wiki documentation makes it hard to gather what can and can't be done. I'd say time counts in seconds, but that is possibly wrong. I also don't know if it can take a particular range of time either, but it wouldn't hurt to experiment I guess.

            Comment


            • #7
              Originally posted by Toyoka View Post
              No idea, to be honest. The wiki documentation makes it hard to gather what can and can't be done. I'd say time counts in seconds, but that is possibly wrong. I also don't know if it can take a particular range of time either, but it wouldn't hurt to experiment I guess.
              Okay based on the scripting api, I think time is the same as server_game_time which basically means time based functions have to somehow be made with the other options so there is a 'local' time to s2fm.

              Comment

              Working...
              X