Hi everyone!
I am working on my thesis project and I'm focusing on burning things. I was wondering if anyone had any ideas on how to do a smooth transition or “spread” of a new texture over an object. For example, I start with my object textured and shaded normally and then as the fire spreads the material on the object smoothly transforms to a new material as it “burns.”
Currently, I have to separate materials and I change from one to the other when a certain value for the heat point attribute is reached, but this results in an obviously choppy transition: https://www.youtube.com/watch?v=aNvRMr7G_n4 [youtube.com] (sorry it is so dark!)
Thank you!
Gradual transition between two shaders for a burning effect
5179 5 1- sweetmusic3243
- Member
- 11 posts
- Joined: 3月 2014
- Offline
- circusmonkey
- Member
- 2624 posts
- Joined: 8月 2006
- Offline
- sweetmusic3243
- Member
- 11 posts
- Joined: 3月 2014
- Offline
Thank you so much for your reply!
So right now i have a point attribute called “heat” propagating across the surface. Can I convert this to a weight map? I've only used weight maps by painting. https://www.youtube.com/watch?v=N_lz5hc1QCA [youtube.com]
And once I have a weight map, how can I use that to apply the material? Before I used my heat attribute to create a group based on a threshold, but that resulted in choppy material application like the one I originally posted because all of the points were either in the group or not.
Thank you for your help!
So right now i have a point attribute called “heat” propagating across the surface. Can I convert this to a weight map? I've only used weight maps by painting. https://www.youtube.com/watch?v=N_lz5hc1QCA [youtube.com]
And once I have a weight map, how can I use that to apply the material? Before I used my heat attribute to create a group based on a threshold, but that resulted in choppy material application like the one I originally posted because all of the points were either in the group or not.
Thank you for your help!
- circusmonkey
- Member
- 2624 posts
- Joined: 8月 2006
- Offline
So right now i have a point attribute called “heat” propagating across the surface. Can I convert this to a weight map? I've only used weight maps by painting. https://www.youtube.com/watch?v=N_lz5hc1QCA [youtube.com]
That is a type of weight map, your using an attribute to drive , if your object is burnt or not
And once I have a weight map, how can I use that to apply the material? Before I used my heat attribute to create a group based on a threshold, but that resulted in choppy material application like the one I originally posted because all of the points were either in the group or not.
You could use a colour mix vop inside a material. The attribute would be used as the bias value. Using the point group approach you will always either have the point getting a attribute or not ie 0 or 1 . You want those values in between.
If this was me doing a “thesis” I would start by breaking the problem down into bite sized chunks. !
rob
Gone fishing
- sweetmusic3243
- Member
- 11 posts
- Joined: 3月 2014
- Offline
Ok cool! I will work with these ideas and see what I can do. I'm mostly interested in pyro sims and material manipulation was kind of an afterthought that I forgot about, so I've been trying to get my head around how I can manipulate them.
Thanks again for your help! This was my first forum post and you have been so helpful!
Thanks again for your help! This was my first forum post and you have been so helpful!
- Doodlez
- Member
- 25 posts
- Joined: 10月 2012
- Offline
You will probably use only a single shader for both materials. You can do it with two shaders but then it would become a compositing exercise (blending your images based on a mask).
Within a single shader you can mix two inputs using multiple nodes, the end result is usually the same. For the mix bias you can load in your attribute with the parameter node. This might still look a bit blurry because it is dependent on the base geometry resolution. I would suggest using point clouds to look up the mask attribute which creates a nice sharp and more natural transition since it does a weighted average.
Within a single shader you can mix two inputs using multiple nodes, the end result is usually the same. For the mix bias you can load in your attribute with the parameter node. This might still look a bit blurry because it is dependent on the base geometry resolution. I would suggest using point clouds to look up the mask attribute which creates a nice sharp and more natural transition since it does a weighted average.
-
- Quick Links