Wind Waker shading style
Blitz3D Forums/Blitz3D Programming/Wind Waker shading style
| ||
I've been wondering for a while how to make objects in Blitz3D shaded like in The Legend of Zelda: Wind Waker It kinda looks like this: ![]() I don't know if it's possible or not, but I would love to make a game with this style of shading. Thanks! |
| ||
I'd say you could come close. Mostly what I see there is really great art. I don't see anything capability wise Blitz could't handle. |
| ||
The Bloom effect is available in FastLibs or AShadow, eveything else is great art as wmaass stated. |
| ||
There's an art overview here, done by independent people: https://simonschreibt.de/gat/zelda-wind-waker-hyrule-travel-guide/ |
| ||
Thanks guys! But what I'm really looking for is a way to shade it like that. I'm not too interested in the bloom effect but thanks for telling me! That could be useful! What I'm after is the flat shading but I don't want every triangle in a model to be distinguishable. Basically, some triangles have are bright and some are dark, and that's pretty much all that it is. |
| ||
You can have a similar effect using a cubemap set to diffuse mode for the lighting. Save the code below as a file in your Blitz3D folder, it uses a model from the Media folder. File "lightingCubemap.png" is this: lightingCubemap.png EDIT: But with a shader it'd be much simpler, no need for a cubemap. It's a simple use of the lambert term to see if the pixel of the 3D object is shadowed or bright. |
| ||
For some reason doesn't work on my laptop. "Texture does not exist" in:TextureBlend( lightingCubemap, MULTIPLY_BLEND ) ;Multiply mode, it's already the default but it's good to explicitly set it. Eventhough it's clearly there and even if path specified. Perhaps my GPU doesn't support it or texture size is too large(1280x213) ?? [EDIT: not texture size, for tried another 256x256. Turns out doesn't work if I add the FLAG_CUBEMAP, while I successfully used cube mapping before] |
| ||
Maybe it's the FLAG_USEVRAM that causes the cubemap to fail. This flag might not be necessary actually since the cubemap is not being modified at all after it is loaded. COLOR + MIPMAP + CUBEMAP should be enough. |
| ||
Good models, textures will do it as a starting point. A bit of lightmapping, perhaps some basic drop shadows or similar will help. A lot of it comes down to the quality of the art available. Tech helps but first and foremost - get good art assets and it will go a long way. |
| ||
Hey, Kryzon, would you be ok if I put that code you wrote on GitHub for me to do more research? It would be very helpful and I would give credit. EDIT: If you don't want me to, that's fine. I'll write my own code that uses the same technique and go from there. EDIT 2: Also, I may have found a way to do this. First, render all the lighting to an image. Next, render the scene with only flat lighting. Lastly, wherever the light would need to be, add brightness wherever there is a pixel brighter than 0,0,0 (in RGB) This may actually be a very resource intensive thing to do, but I'll test it out and report back! |
| ||
Hi. You can use that in any way you want, it's public domain. Diffuse-mode cubemaps have been used before, check the game "Wolf Among Us" by Telltale Games, it uses that. I repeat that with a shader it would be much simpler, it's using the lambert term (n dot L) to see if the pixel should be lit or shaded, see here: http://goo.gl/T2cP0o |
| ||
Since it is at the exterior, and there is only the sunlight (one directlight), you can probably achieve the same result with fastext... |
| ||
@Kryzon Somehow this doesn't work: ;Local lightingCubemap = LoadTexture( "C:\Program Files (x86)\Blitz3D\samples\Kryzon\lighting_Cubemap.png", FLAG_CUBEMAP ) But this is ok: Local lightingCubemap = LoadTexture( "C:\Program Files (x86)\Blitz3D\samples\Kryzon\lighting_Cubemap.png", FLAG_COLOR + FLAG_MIPMAP + FLAG_USEVRAM ) But obviously it's not using cubemaping then. I've tried a lot of combinations but nogo. So I suspect a it's in flags, blend mode, texture size, GPU limitations or odd combination. I vaguegly remember comming accross this issue before (but of course forgot how I solved it ;-). Anyway I dunno what the effect is supposed to look like as there is no screenshot in this thread(perhaps someone can post one?). However I do have a working example demonstrating a lot of texturing & fx called TextureExtreme. ![]() Code by Jan Kuhnert from www.blitzforum.de, Beast model by: Psionic, http://www.psionic3d.co.uk I think it's pretty impressive. For the interested that do not already have it, download here(including source+media): TE-release.zip |
| ||
Last two years i also had the same temptation to create something like this but i have very limited ability and time so i quit and make simpler game:P Just use a gradient white to dark grey texture as cubemap but look not quite right like this: https://app.box.com/s/4ea1j0e8got5jtudwvzh0pd3sg49i35h |
| ||
Hey RickNasher, I see the demo uses spot or pointlight for the scene. Does the normal mapping also works on directional light? |
| ||
Now there's question. I honestly don't know. I haven't delved into the subject that far (yet). But I very quickly checked(no time) and if you change this: AmbientLight 100,100,100 and: light = Dot3_CreateLight(1,piv,1.0,1) Then you can check if works I believe.. Now I wonder what it looks like with fog? :-) |
| ||
@Rick Nasher Anyway I dunno what the effect is supposed to look like as there is no screenshot in this thread(perhaps someone can post one?). Sure! ![]() As you can tell, some parts of the model are bright and some are dark. I'm pretty sure this is called 'cel shading'. |
| ||
Ah, ok thanks very much. Interesting.. |
| ||
So I found something interesting about the mode '128' for loading textures. Apparently, cubemaps could have been an experimental feature that was never really finished in Blitz3D. Even the TextureFilter example doesn't even show it as a way to import textures, in fact it just skips 128 in general: ; ClearTextureFilters and TextureFilter Example. ; ---------------------------------------------- Const tex_color = 1 ; Color texture Const tex_alpha = 2 ; Alpha texture (Include alpha channel data) Const tex_mask = 4 ; Masked texture (black is transparent) Const tex_mipmap = 8 ; Create texture mipmaps Const tex_clampu = 16 ; Restrict U texture coords from "bleeding over" Const tex_clampv = 32 ; Restrict V texture coords from "bleeding over" Const tex_envshpere = 64 ; Load texture as a spherical environment map Const tex_vram = 256 ; Force texture graphics to vram Const tex_highcolor = 512 ; Forces texture graphics to be 32-bits per pixel Graphics3D 640,480 ; Removes any texture filters that might apply. ClearTextureFilters ; Add an alpha texture to the list of ; texture filters to apply to files ; that have "_alpha" in their filenames. TextureFilter "_alpha",tex_color + tex_alpha + tex_mipmap ; Set appropriate texture flags for loading ; suitable skybox textures from files named ; something with "_skybox". TextureFilter "_skybox", tex_color + tex_mipmap + tex_clampu + tex_clampv ; Set the flags for loading a spherical refletction ; map to apply to all "_refmap" files. TextureFilter "_refmap", tex_color + tex_mipmap + tex_envshpere ; Setup a texture filter to allow faster ; (and easier) pixel manipulation on all ; loaded "_fastblit" files. TextureFilter "_fastblit", tex_color + tex_vram + tex_highcolor ; This is where you would normally load your special ; textures. ; The next bit resets the texture filters to their ; standard settings. ClearTextureFilters TextureFilter "", tex_color + tex_mipmap End Maybe spherical environment maps will work? |
| ||
Well I know cubemapping works for I've used it in the past and also these (<download>) classic Blitz3d cube mapping examples work ok on my machine: ![]() |