Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / Landscape zooming
1 2 3 4 Previous Next
Parent - - By Clonk-Karl [de] Date 2010-05-05 12:28
Really awesome. I can't wait to see this working in real time :). This is not integrated into Clonk yet, right?
Reply
Parent - By PeterW [de] Date 2010-05-05 19:57
Thanks. But no, Not at all, still the prototype - it's actually a shader demo I'm hacking to death, so I hope everybody understands that I don't want to show code ;)
Parent - - By Ringwaul [ca] Date 2010-05-10 23:18
Hmm, this is looking fantastic. I should ask, do you think will it take too much time to implement it before release?
Reply
Parent - By PeterW [de] Date 2010-05-12 00:01
Without knowing a thing about the release planning: Yes, probably :)
Parent - - By Newton [de] Date 2010-05-05 08:33 Edited 2010-05-05 08:38
Looks astonishing. But I said that already.

By the way, I think the zoom could be safely limited to 3x (e.g. via script function SetZoomLimits) because if zoomed more than 3x, the objects start to look ugly - I keep telling the modellers and artists to "make the object look good on (max) 3x".

The shading looks better now, even though it still feels too smooth for my taste.
Parent - - By Clonk-Karl [de] Date 2010-05-05 12:18

> By the way, I think the zoom could be safely limited to 3x


I think that's a bit too restrictive: I often zoom in a bit more than that, and most models still look quite good at a somewhat higher zoom. Also, in developer mode there should not be a limit (or a much more relaxed one), as zooming often proves to be useful for debugging.
Reply
Parent - - By Newton [de] Date 2010-05-05 12:22
I'm speaking of a default limit that is settable by script: See #175
Parent - By Clonk-Karl [de] Date 2010-05-05 12:35
Still it's annoying if you have to execute a script which increases the zoom limit every time you start a scenario in developer mode to test something. I'm speaking of the default limit if you don't use that hypothetic script function.
Reply
Parent - By PeterW [de] Date 2010-05-05 20:00
Why only a limit? I thought we were going to have the script control the zoom level completely (indirectly via "view distance" in landscape pixels).
Parent - - By Caesar [de] Date 2010-05-05 16:36
What about a soft lighter zone on tunnel on the boarder to sky and about a slight shadow on upper tunnel borders on the tunnel?
Parent - By PeterW [de] Date 2010-05-05 19:37
All possible, but right now I'm still working on the technical foundations. The displayed shading is just "sum of the normal components", which extremely roughly models light coming from the top right corner.
Parent - - By B_E [de] Date 2010-10-06 13:07
This still does look great, is something happening with it right now?
Parent - By Ringwaul [ca] Date 2010-10-06 18:05
I've heard from PeterW (I believe; I may be wrong) it's being delayed from Release 1.
Reply
Parent - - By PeterW [gb] Date 2010-10-11 00:45
Currently slowly working its way up my personal priority list. As I said, won't happen for this release.
Parent - - By Asmageddon [pl] Date 2010-10-11 18:09
Well, isn't it done? @.@
Looks like it's working, so I see no reason why to delay pushing it into repository....
Reply
Parent - - By PeterW [gb] Date 2010-10-11 19:32
That picture is generated from a saved Landscape.bmp, which gets pre-processed quite heavily by a separate hacked-together program before getting passed to a shader. I haven't touched one line of Clonk code so far.

So, no, pushing that into the repository won't help anybody ;)
Parent - - By Günther [de] Date 2010-10-11 20:15
Somebody else might be able to work on it, though.
Reply
Parent - By PeterW [gb] Date 2010-10-12 12:40
Yeah, well, I am awfully protective of what I do ;)

No, seriously, if somebody wants to have a look at it, no problem. There's nothing really surprising in there that I haven't already explained in this thread.
- - By PeterW [gb] Date 2010-11-20 16:24
Playing around with shading a bit...
Attachment: light2.png - Set normals also on material with lower placement (2937k)
Attachment: light3.png - Only on material with higher placement (as reference) (2571k)
Parent - - By Sven2 [de] Date 2010-11-20 17:52
The glossy shading looks super cool imo. Not very fitting for most landscapes, but some scenarios could definitely make use of it.
Parent - By PeterW [gb] Date 2010-11-21 03:09
You mean the first one? Hm, I have to change both data preparation and the shader to switch to the other effect, I'm not sure I would like to fully support switching...
Parent - By PeterW [gb] Date 2010-11-22 16:26
And looking at it again - well, yes, it does look kind of cool in an artsy kind of way. Bit it definitely isn't the realistic 3D effect that was originally intended. I mean, if we end up using GLSL shaders scenarios could theoretically have the scenarios provide their own shaders, which would make a lot of stuff possible.
Parent - By Caesar [de] Date 2010-11-20 19:50
The tunnel/earth border is a bit too shiny imho.
Parent - - By Newton [de] Date 2010-11-21 14:31

>light2


It doesn't look like the normals were only set on the materials with lower placement. If I look at the tunnel<->earth border, I see that the earth is lighted too. If the normals were only set on the background materials, I would only see light/darkness on the tunnel itself, no?

Does this make sense?
Parent - - By PeterW [gb] Date 2010-11-21 19:22
Both are wrong. The shading in Light2 completely ignores which material is foreground and which is background, and just produces a gradient along the edges. The reason that you don't see anything is that the Tunnel texture is too dark.
Parent - - By Asmageddon [pl] Date 2010-11-21 20:12
I think I once proposed(or forgot to post the picture :p) that light will be raycasted:
Sunlight shines at angle of 60 degrees to the surface, and it's lightmap has resolution of 1 light map pixel = 4x4 terrain pixels
Stationary light sources have 1 pix = 4x4 terrain pixels
Moveable light has 1 pix = 8x8 terrain pixels
The terrain would just get generic bump mapping effect basing on those.
As for the effect used currently, it could stay as it is since it wouldn't be that important anyway...
Reply
Parent - - By PeterW [gb] Date 2010-11-22 14:26
Raycasting sounds expensive, but dynamic lights and bump-mapping are what I want to get at. Won't be easy though.
Parent - - By Asmageddon [pl] Date 2010-11-23 20:09
Yeah, that is why it would be at a greatly reduced accuracy.
Sunlight and other static light casting wouldn't be that expensive, since it could be done once at start, and then just updated when a region of map it can reach is modified.
As for mobile lights... well, the only way to do it efficiently would be to use shaders, but then it would depend on GPU, which would deny the small hw requirements of OC....
Reply
Parent - - By PeterW [gb] Date 2010-11-24 12:58
Uhm, the whole zooming technique relies quite heavily on shaders. My prototypic implementation without them was just too slow. It is pretty much decided that we will require some sort of shader support to run these effects.
Parent - - By Asmageddon [pl] Date 2010-11-24 15:54
Well, bitmap manipulation without shaders is pretty slow, especially when it comes to stuff that has to be done each frame...
But precalculated and then updated, straight-ray lightning should be doable by CPU.
Not that I advise doing it. Graphic cards exist so CPU can focus on calculations, and not rendering.
Reply
Parent - By PeterW [gb] Date 2010-11-25 17:00
Hm, currently I am thinking whether there's a place for shadows in my design (see Cäsar). Generally speaking, some precalculation has to be done anyway, so there might be a way - as long as as the behaviour can be encoded by one float per landscape pixel for all directions the light could possibly come from. Shorter shadows close to the surface or something. Not sure it's worth it.
Parent - - By PeterW [gb] Date 2010-12-19 00:14
Okay, now with shadows...



Not sure whether it's worth using a full channel for it. Would even require two channels if I made it multi-directional like the shading...
Parent - - By Ringwaul [ca] Date 2010-12-19 00:22
Do want indeed.
Reply
Parent - - By Asmageddon [pl] Date 2010-12-19 10:50
Me too :>
I'd also like some simple bump mapping and raycasted light(at least sky- and stationary...)
Reply
Parent - - By PeterW [gb] Date 2010-12-19 14:17
Would you volunteer to make proper bump-mapped textures? The actual implementation is pretty easy, my shader already supports it. The textures just look worse when I just apply some arbitrary bump map on top.
Parent - - By Asmageddon [pl] Date 2010-12-19 15:18
Yeah, I know it's easy, but I don't even know OpenGL properly, not mentioning GLSL itself.
Also, I am very bad at analyzing code, and don't know much C++ (oh well, I do, but I didn't use it much since I prefer Python)
I could try, but I doubt I will be able to do it.
I don't even know what file the code is in :<
Reply
Parent - - By PeterW [gb] Date 2010-12-19 18:50
That's why I was asking you about textures, not code. You know, image files. I have no idea whatsoever how to create a good bump-map.
Parent - - By Asmageddon [pl] Date 2010-12-19 20:35
Ah, that's what you mean? :p
Sorry, I need to stop reading everything as fast as I can....
I could try, but how would I view them, so I can see how it looks?
I thought of Blender, but it's a bit of overkill for such a simple task...
Reply
Parent - By Ringwaul [ca] Date 2010-12-20 00:42
It fills the function nicely. Why need another tool just for viewing bumpmaps?
Reply
Parent - - By Marky [de] Date 2010-12-20 09:18
Gimp has a plugin that lets you create bump-maps, it includes a preview as well

http://code.google.com/p/gimp-normalmap/
Parent - By Asmageddon [pl] Date 2010-12-20 15:13
Well, I've had it installed since loooong ago, but didn't use it, so I forgot, thanks, I'll see what I can do...
Reply
Parent - - By Newton [de] Date 2011-03-09 19:00
Just re-reading the topic after some time: I can provide you with some bumpmaps for the textures in that prototype of yours if you wish.
Parent - - By PeterW [gb] Date 2011-03-09 19:06
That would be nice. The local light would be a pretty good use case.
Parent - - By Newton [de] Date 2011-03-11 15:34 Edited 2011-03-11 15:37
Here is a test normal map for the sand_rough texture. I fiddled around with it a bit but I have no idea if this will look good. So perhaps you should try it out first before I make other normal maps with the same workflow (which is quite cumbersome). Perhaps I overdid it.

I hereby license the following file(s) under the CC-by license
Parent - By PeterW [gb] Date 2011-03-11 16:01 Edited 2011-03-11 16:05
Hm, no special actual texture to go with it? I'd imagine having shading in the image as well as from the bump map might look strange, but I'll try...
Parent - - By Matthias [de] Date 2010-12-19 14:36
I don't like the shadow on top of the water. I think shadows on tunnel would be enough.
Reply
Parent - - By PeterW [gb] Date 2010-12-19 14:41 Edited 2010-12-19 14:44
That's really easy to change, but that's what CR does as well if I'm not mistaken.

See e.g. here.
Parent - - By Matthias [de] Date 2010-12-19 15:03
True, but in your screenshot, water has this texture which already suggests you're looking at it from some perspective. With the shadows, this gets even more irritating. It wasn't that big an issue with the flat water in CR, I guess - at least, I didn't even notice it back then :)
Reply
Parent - - By Günther [de] Date 2010-12-19 15:39
Haven't we reverted to flat water again?
Reply
Parent - By Matthias [de] Date 2010-12-19 17:33
Might well be - I based my opinion solely on the posted Screenshot. Even if it's flat, I'd like to see how it looks without the shadows on water
Reply
Up Topic Development / Developer's Corner / Landscape zooming
1 2 3 4 Previous Next

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill