Boothand Posted March 31, 2014 Posted March 31, 2014 Will anything else eventually prevent the lightmap from competing with rend2's light?
ensiform Posted April 1, 2014 Posted April 1, 2014 Don't think thats the purpose of rend2. You could just make sure that it and surrounding area doesn't receive and cast shadows. Boothand likes this
Boothand Posted April 1, 2014 Posted April 1, 2014 You could just make sure that it and surrounding area doesn't receive and cast shadows. https://www.youtube.com/watch?v=JitOUDxGVig It actually made me speak "Wow" out loud, trying this in-game. All the problems caused by weird shading in the lightmap are now gone. The rotating box I was testing with receives light as it should when it rotates, and darkens on the sides not facing the sun.I really recommend to anyone trying _rshadows 0/_cshadows 0 on all entities in your map and testing it out with rend2. It's not the same as skipping the light compile of course, it maintains the good vibe and color but makes it compatible with rend2's sun. Great. On the other side, this obviously reduces compatibility with vanilla. But then again, rend2 performs 3x better on my map than vanilla seems to do. It wouldn't be much compatible in any case One hitch for now, using _rs 0 on my models, planes seem to be completely black. I only suppose that's what's causing it, but that's the only visual issue so far. Any ideas?
Boothand Posted April 1, 2014 Posted April 1, 2014 I made a little video showing some rend2 (and possibly some bugs). Forgive my babbling at times. I have a cold, and don't even sound like myself Also I kind of went on a bit longer than needed, but have a look. Things that happen:-Black planes.-Random inverted normal map (?).-White saber marks. http://www.twitch.tv/journeytobootland/b/516155702
Tempust85 Posted April 1, 2014 Posted April 1, 2014 Regarding darkness of objects, you can use _minlight <number> on your worldspawn to make everything not go full black if theres no light. Also, ensiform added minimum lighting to all entities in a recent rend2 build. There is an intensity setting for gl2 sun in the shader, but I'm not sure if it works for OpenJK rend2. Use normalScale <Red> <Green> underneath the normalmap stage in your statue shader to flip the red or green channel of your normal map. Example: Using your normal map as-is in the game: normalScale 1 1 Flipping the green channel: normalScale 1 -1 You can also increase your normal map intensity with higher numbers. MD3 normal maps look perfect in my tests, but Ghoul2 normal maps give iffy results atm. Boothand likes this
Boothand Posted April 1, 2014 Posted April 1, 2014 In my case, the backside of the model's normal map looked correct, but the front side looked inverted. Then another place there was accidentally a normal map (on the computer) it looked correct. But it was all the same normal map. I'll check out the minlight stuff Intensity didn't have much effect on the shadows at least, not sure if it worked at all.
Tempust85 Posted April 1, 2014 Posted April 1, 2014 Check that r_recalcmd3normals is set to 0. I also just loaded up your statue model in Max and flipping the red channel reproduces what you see in-game at least from the front. Try flipping it in the shader and see how it looks.
Boothand Posted April 1, 2014 Posted April 1, 2014 Minlight works great for making the shading look more natural! It does also help lighten up my trees, but my bushes remain very much black (unless you squeeze your face into them, but even then). It doesn't seem possible to set minlight per entity. Flipping the green channel with the shader seemed to do the trick (for some reason! I thought it would just reverse the problem to the back, but it's all good now..) PS. I take back what I said about the normal map not responding to the moving sun... it does.
Tempust85 Posted April 1, 2014 Posted April 1, 2014 Min light only works on brushes afaik. You'll need a recent rend2 build for entities to have a minimum light.
Boothand Posted April 1, 2014 Posted April 1, 2014 I have an important question now.Is there gonna be any use of the sun's dynamics? It's already proven that the engine handles lighting and shading when light moves around, and it even displays normal maps correctly as the light source is moving (read: r_forcesun 2). And this is already looking so impressive - is there no way to add possibilities for a moving sun (at any speed), clouds making variations in light conditions etc? It just seems like it's all already there, but the way I've understood it, it's not the aim for the renderer. What's the situation/thoughts on that? Archangel35757 likes this
ensiform Posted April 1, 2014 Posted April 1, 2014 The core features probably will not change unless @SmileTheory implements them.
Xycaleth Posted April 1, 2014 Posted April 1, 2014 I'd consider those extras at the moment, but I'm not against having them added at some point. There's still a lot of little problems as you've found that need sorting out first though. One problem with a dynamic sun as well is how do you show the sun is moving in the sky? Skyboxes are static images so there would probably need to be a way to add a procedural sky box which draws the sun and the sky. Archangel35757 likes this
Tempust85 Posted April 1, 2014 Posted April 1, 2014 r_drawsun 1 will show a sun at the location of the sun in the shader, but I don't think it moves with r_forcesun 2. Archangel35757 and Boothand like this
Boothand Posted April 1, 2014 Posted April 1, 2014 I'd consider those extras at the moment, but I'm not against having them added at some point. There's still a lot of little problems as you've found that need sorting out first though. One problem with a dynamic sun as well is how do you show the sun is moving in the sky? Skyboxes are static images so there would probably need to be a way to add a procedural sky box which draws the sun and the sky. Yeah, it's not a priority now of course. I just feel it adds so much potential with atmosphere. So maybe eventually. Well, you can both have animating skyboxes, and you can add other moving entities such as a sprite with a bright sun shader, which I think would look good. But I don't know how you would instruct the renderer's sun to move with it. Maybe by making a new entity for rend2, such as has been done for cubemaps. Archangel35757 likes this
ensiform Posted April 2, 2014 Posted April 2, 2014 FYI Force Sun is cheat protected, meaning you can't use it on public servers.
Xycaleth Posted April 2, 2014 Posted April 2, 2014 I was thinking more something like this: But probably a bit less cartoony looking. Boothand and Archangel35757 like this
Tempust85 Posted April 2, 2014 Posted April 2, 2014 *queue Lion King opening music* gerbilOFdoom, Xycaleth and Omicron like this
Boothand Posted April 2, 2014 Posted April 2, 2014 FYI Force Sun is cheat protected, meaning you can't use it on public servers. I never intended to use that for more than debugging
Boothand Posted April 2, 2014 Posted April 2, 2014 Just made a stone!3 different lighting conditions (r_forcesun 2 and last one without forcesun): https://dl.dropboxusercontent.com/u/58757568/lyingstone1.jpghttps://dl.dropboxusercontent.com/u/58757568/lyingstone2.jpghttps://dl.dropboxusercontent.com/u/58757568/lyingstone3.jpg
Guest KENNITHH Posted April 2, 2014 Posted April 2, 2014 Xycaleth, I really hope you'll manage to do that sun + sunrays but keep on doing the important stuff. And Boothand, I just noticed your water, have you tried a normal map on it yet? If not could you or someone else try one of these sets? They are from frostbite just to see what it gives. http://www.mediafire.com/download/9a0maux0dp91pua/watercollection.zip
Boothand Posted April 2, 2014 Posted April 2, 2014 And Boothand, I just noticed your water, have you tried a normal map on it yet? If not could you or someone else try one of these sets? They are from frostbite just to see what it gives. http://www.mediafire.com/download/9a0maux0dp91pua/watercollection.zip I tried but didn't see any effect of the normal map so far. Not quite sure of the best way to shader this, since there's so much transparency too. I'm excited to see it working though, if anyone's up for trying as well Update: Both deformVertexes and blendFunc X seems to break it for me. I am able to have a normal map on it before it's deforming and before it's transparent - that is before it looks like water at all.
dvg94 Posted April 11, 2014 Posted April 11, 2014 So I gave REND2 a try, with a lot of help of Xycaleth (sorry to have bothered you so much mate ;p).It gave me a lot interesting results, but also a lot of problems. I'll start with the good bits, my marble floor finally looks like marble: I used a mix of specular and parallax mapping in my shader (prefab shader from the rend2 readme)I also 3 misc_cubemaps to my ''throne room'' and that really helps reflection to look good. but now, on to the ''not so good'' part, I can't get parallax/bumpmapping to work properly: As you can see it doesn't look nice, and I know it's my fault, I probably f'ed something up in either the shader or the normal/parallax map (maybe even both)So I need some help with this. here's the diffuse: here are the normal map + the parallax in alpha of the normal map and here's the specular map (I don't think that's the problem though) and finally here's the shader: textures/dvg_got/wall1 { qer_editorimage textures/dvg_got/wall1.jpg { map textures/dvg_got/wall1.jpg rgbgen identity } { stage normalparallaxmap map textures/dvg_got/wall1_n.png normalScale 1 1 parallaxDepth 0.04 } { stage specularmap map textures/dvg_got/wall1_s.png specularReflectance 0.2 specularExponent 32 } { map $lightmap blendfunc GL_DST_COLOR GL_ZERO } } Boothand likes this
dvg94 Posted April 11, 2014 Posted April 11, 2014 I tried that DT85 (becuase I think you told booth that a couple of pages back), but it didn't change anything.thanks for the suggestion though
Xycaleth Posted April 11, 2014 Posted April 11, 2014 Try increasing the parallax depth. Also try removing the specular to see how it looks.
Recommended Posts