Hi,
an other idea of mine:
Lava could look more like lava when we would have two surfaces of the landscapes where two different textures of the lava are applied:
one texture that is normal and one texture where the gaps in the lava rocks are glowing.
The two surfaces are then faded between each other in a sine-curve so that it looks like real glowing lava.
You could also use this technique to animate water and make gold glittering.
an other idea of mine:
Lava could look more like lava when we would have two surfaces of the landscapes where two different textures of the lava are applied:
one texture that is normal and one texture where the gaps in the lava rocks are glowing.
The two surfaces are then faded between each other in a sine-curve so that it looks like real glowing lava.
You could also use this technique to animate water and make gold glittering.
![](https://attach.openclonk.org/avatars/185-9473.png)
Though I keep wondering how will all of this stuff affect game productivity?
I am already upset a bit by the fact that I can not play OpenClonk anymore on neither of my computers due to the increased system requirements and just want to know how far is this going to go.
I think it is a nice idea, but i am wondering weither we need there multiple textures instead of just two.
Was that suggestion targeted at me? Then you need to explain it better, I don't understand it. Also doubling the amount of texture data just for a glow effect doesn't seem very attractive.
Animated water, for example, can be implemented without it by using something similar to Günther's solution.
Animated water, for example, can be implemented without it by using something similar to Günther's solution.
>Then you need to explain it better, I don't understand it.
you have a time factor. from this, you calculate the interpolation factor:
float interpolationFactor = 0.5+0.5*sin(timeFactor)
with this interpolation Factor, you can calculate the color:
vec4 color = interpolationFactor*Texture2D(tex1) + (1-interpolationFactor)*Texture2D(tex2)
Well, with my shader, obviously neither texture1 nor texture2 will just be simple lookups. But the more interesting question is: What should texture1 and texture2 contain?
the two landscape surfaces that are blended into each other.
one with glowing things and one without.
one with glowing things and one without.
You still haven't answered how you intend to calculate the "glowing" part. Do you mean:
* local lightening on surrounding materials (realistic, but I guess it wouldn't really show)
* have some sort of "fog" over surrounding materials, representing either real fog or some sort of "overglow"
* just have the lava itself get lighter and darker over time
Each would need a different solution.
* local lightening on surrounding materials (realistic, but I guess it wouldn't really show)
* have some sort of "fog" over surrounding materials, representing either real fog or some sort of "overglow"
* just have the lava itself get lighter and darker over time
Each would need a different solution.
some materials would have two textures.
i'll show it in an example:
i'll show it in an example:
So your idea is to have some kind of material texture animation? Hm, that's something where we could actually use the fact that the material textures are stored as one 3D texture now...
We could even have an animated bump-map! Living slime material anyone? ;)
We could even have an animated bump-map! Living slime material anyone? ;)
![](https://attach.openclonk.org/avatars/31-31746.png)
![](http://global.hidden-street.net/sites/global.hidden-street.net/files/monsters/monsters006.gif)
![](https://attach.openclonk.org/avatars/126-5136.png)
zomg
![](https://attach.openclonk.org/avatars/32-20798.png)
You love MMOs, don't you?
![](https://attach.openclonk.org/avatars/31-31746.png)
![](https://attach.openclonk.org/avatars/126-5136.png)
![](https://attach.openclonk.org/avatars/185-9473.png)
1) Have more than 2 textures;
2) Change not entire texture but different parts of it;
Or are there any techniques that can simplify this?
![](https://attach.openclonk.org/avatars/1-0778.png)
A glowing effect in this manner
>* just have the lava itself get lighter and darker over time
would be reached if the two textures (e.g. those in carli's post) are not just blended into each other but blended additively. Both textures are then constantly moved against each other.
What do you mean by additively? 3D textures would allow me to pretty cheaply blend together textures. Everything more complicated would at minimum require another branch and possibly another texture lookup. What additional functionality would you like to see?
![](https://attach.openclonk.org/avatars/1-0778.png)
IIRC there are different blend-modes to choose from. You can select to blend them together additively (add the color values instead of using the average of the two).
Sum is only average times two. Applying some kind of factor should be the least problem. I mean, if you just want to change around brightness, I can include a variable for that and we wouldn't have to add additional textures at all? But I still fail to see why this should be useful.
![](https://attach.openclonk.org/avatars/1-0778.png)
Uhm, I think I have seriously lost track of what we are discussing here. What I am talking about:
Brightness stays the same. Now doing it the way what I thought you meant by "additively":
Brightness doubles between animation phases. Actually same effect as above, with multiplicators of 1, 3/2, 2, 3/2, 1. I have no idea why this would be a good idea in any way, so I guess you meant something else. Can you explain?
---------- <- color = tex1
<- color = (3 tex1 + tex2) / 4
<- color = (2 tex1 + 2 tex2) / 4
<- color = (tex1 + 3 tex2) / 4
---------- <- color = tex2
Brightness stays the same. Now doing it the way what I thought you meant by "additively":
---------- <- color = tex1
<- color = tex1 + tex2 / 2
<- color = tex1 + tex2
<- color = tex1 / 2 + tex2
---------- <- color = tex2
Brightness doubles between animation phases. Actually same effect as above, with multiplicators of 1, 3/2, 2, 3/2, 1. I have no idea why this would be a good idea in any way, so I guess you meant something else. Can you explain?
![](https://attach.openclonk.org/avatars/1-0778.png)
>---------- <- color = tex1
> <- color = (3 tex1 + tex2) / 4
> <- color = (2 tex1 + 2 tex2) / 4
> <- color = (tex1 + 3 tex2) / 4
>---------- <- color = tex2
Err, what? (What are those lines?)
The 2D textures. That's how 3D textures work: You bind a few layers to 2D textures, then access coordinates between them, and the GPU interpolates the color as I described.
Here's a picture, for example.
Here's a picture, for example.
![](https://attach.openclonk.org/avatars/1-0778.png)
> <- color = tex1 + tex2
constant but moving the textures against each other. So, the animation doesn't happen by blending one texture into another and back but by, well, moving the textures against each other.
E.g. you have two layers in GIMP, the first has the mode "additive". Then you move the first around slowly. That is what I was talking about.
Like fog moving over Lava? I feel that it would be a better idea doing that by just using particles. Most animations I can think of aren't of the "one texture moving relative to the other" variety. What do you have in mind?
![](https://attach.openclonk.org/avatars/1-0778.png)
This is just a suggestion though. I have not tested whether this can actually look good
Well, that's three times the texture lookup per pixel, that's bound to be costly in terms of rendering performance. I like the texture phase approach more, I'm afraid.
![](https://attach.openclonk.org/avatars/1-0778.png)
http://www.westnordost.de/misc/test.html
Hm, bubbles going up or something might be worthwhile. Could also work for acid, not sure about water. Still, I'm not that happy with adding multi-texturing just for such a feature. If GPUs really don't branch-predict, that would increase the complexity of all pixel draws, even if no animated texture is visible.
![](https://attach.openclonk.org/avatars/79-5162.png)
![](https://attach.openclonk.org/avatars/185-9473.png)
We can make material texture change from time to time but hardly need something more than that.
Well, so can normal textures. What's your point? The only possible upside I see is that procedural textures take up less space on the disk - which isn't exactly a problem right now.
![](https://attach.openclonk.org/avatars/29-2030.png)
They can have an endless level of detail - if you are willing to program details for all levels of detail. Or use some sort of fractal.
Either way, this is actually less important for Clonk - no matter how much we zoom in or out, we will never have as much variety in texture scalings as a typical 3D scene. Procedural textures are a solution for a problem we just don't have.
Either way, this is actually less important for Clonk - no matter how much we zoom in or out, we will never have as much variety in texture scalings as a typical 3D scene. Procedural textures are a solution for a problem we just don't have.
![](https://attach.openclonk.org/avatars/79-5162.png)
i made a small photomanipulation to show what i mean: Glowing Lava
i think that looks really nice.
what do the engine developers say to this? would something like this be possible?
I'm not a dev, but it definitely would be possible, either using shaders or an overlay map.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill