Szico VII Posted March 15, 2014 Posted March 15, 2014 Cool, except the rend2 I have no longer works with the most recent OpenJK builds And a tutorial on how to use cubemaps would be very nice
Xycaleth Posted March 15, 2014 Posted March 15, 2014 All will be explained soon I just need to make sure it's all actually working properly lol.
Pande Posted March 15, 2014 Posted March 15, 2014 This is gonna be epic. That looks great xyc! Tempust85 likes this
Xycaleth Posted March 16, 2014 Posted March 16, 2014 I guess I can post what I did to get the specular and cube maps working before I disappear unexpectedly again. For cubemaps, you simply place a "misc_cubemap" entity where you want the cube map to be generated. All rendered surfaces use the cubemap that is closest to them. You need to enable it in-game using r_cubeMapping 1. For specular, this is the shader I've been using: textures/rend2/spec25 { qer_editorimage textures/bespin/newfloor { map $lightmap } { stage diffuseMap map textures/bespin/newfloor blendFunc GL_DST_COLOR GL_ZERO } { stage specularMap map textures/bespin/newfloor_s specularReflectance 0.25 // default is 0.04 - non-metallic surface specularExponent 8192 // default is 512 } }The main thing to notice here is the use of 'specularReflectance'. The value here describes the material's refractive index, i.e. how much light is reflected or refracted. For non-metal materials, the default is good. For other types of material, you can look up the refractive index from http://refractiveindex.info. You can also control how much specular specific parts of a texture has by making use of the alpha channel. The value in the alpha channel then gets multiplied by the 'specularExponent' to give the overall shininess of the texture. As you can see from the video, the shininess also makes use of the cube map, so the shinier something is (and the more reflective it becomes), the more visible the reflected scene becomes. Archangel35757 likes this
Guest KENNITHH Posted March 16, 2014 Posted March 16, 2014 this is really becoming too good to be true... I think I can mimic graphics like css/cod/bfbc maybe even csgo or BF3 with the right use of this stuff once theres a fork with sof2 compatibility keep up the good work !
Xycaleth Posted March 16, 2014 Posted March 16, 2014 This is still a long way off anything in CoD and especially BF3. BF3 has some pretty insane stuff in it.
Tempust85 Posted March 16, 2014 Posted March 16, 2014 This is more closer to HL2 in 2007 than anything else.
Guest KENNITHH Posted March 16, 2014 Posted March 16, 2014 I know but still, if you see the difference between the default maps and the ones I made, it's already a huge difference, now with this, it will be even more... Same with Szico's maps, its also a huge difference with the default maps. Might be others too but I only know Szico's map. I actually once made a map and it looked like skyrim but the FPS was so terrible. I also lost a bit of interest in mapping cause of all the restrictions but with this.. I could be back in action ^^
Boothand Posted March 16, 2014 Posted March 16, 2014 @@Xycaleth, I still have the issue with the black dots appearing, using that shader. As in this post: http://jkhub.org/topic/2804-rd-rend2/?p=53470 Here's the specular map - using a TGA with the same image in the alpha channel, for now: https://dl.dropboxusercontent.com/u/58757568/asphalt_spec.jpg
Guest KENNITHH Posted March 16, 2014 Posted March 16, 2014 Hmm I forgot to ask in my previous posts. Will we be able to add cubemaps to the default maps with .ent files?
Xycaleth Posted March 16, 2014 Posted March 16, 2014 Should be able to. q3map2 doesn't do anything with them, it's all done by the renderer.
Guest KENNITHH Posted March 16, 2014 Posted March 16, 2014 Ok cheers Xycaleth, gonna be awesome changing the stock maps.Btw found a cool example of what normal maps are possible to do, even on low vert models: 1640 Verts, 3260 Triangles http://files.gamebanana.com/img/ss/skins/5324e5d1bb117.jpghttp://files.gamebanana.com/img/ss/skins/5324e38544d63.jpghttp://files.gamebanana.com/img/ss/skins/5324e2c67cbbc.jpghttp://files.gamebanana.com/img/ss/skins/5324e2cd2293f.jpg
Boothand Posted March 16, 2014 Posted March 16, 2014 Is there any way to take advantage of rend2's real time shadows (aka the debug feature r_forcesun)? I feel it's kind of painful to have it so close and then be stuck with static lightmaps after all. What I mean is, obviously a map compiled without -light doesn't look good, but forcesun can calculate shadows when brushes move around or when light moves around. For example, some doors I have in a map are dark, but when they swing open they would logically receive light. But, the lightmap is a map.
Xycaleth Posted March 16, 2014 Posted March 16, 2014 If you use the q3gl2_sun keyword, then the sky will cast real-time shadows. You'll need to set r_sunlightMode 1 and r_depthPress 1, both of which are a bit buggy I'm not sure about shadows from regular lights just yet. Keep in mind it's all very WIP. Boothand likes this
Tempust85 Posted March 17, 2014 Posted March 17, 2014 Can someone please verify that adding a .shader / .mtr to an MD3 misc_model / misc_model_static doesn't do anything? Tried to in both rend2 & vanilla renderers, which leads me to think that MD3 has been broken somehow. Also confirm that the MD3 model angle is borked, as in it doesn't face the same way as in radiant/jamp.
Xycaleth Posted March 17, 2014 Posted March 17, 2014 Can someone please verify that adding a .shader / .mtr to an MD3 misc_model / misc_model_static doesn't do anything? Tried to in both rend2 & vanilla renderers, which leads me to think that MD3 has been broken somehow. Also confirm that the MD3 model angle is borked, as in it doesn't face the same way as in radiant/jamp.How are you adding it to the misc_model/misc_model_static?@@Xycaleth, I still have the issue with the black dots appearing, using that shader. As in this post: http://jkhub.org/topic/2804-rd-rend2/?p=53470 Here's the specular map - using a TGA with the same image in the alpha channel, for now: https://dl.dropboxusercontent.com/u/58757568/asphalt_spec.jpgI'm not sure still. Are you using any other texture maps like parallax or normal maps?
Boothand Posted March 17, 2014 Posted March 17, 2014 Nope. This shader. Same thing happens with and without the blendfunc. textures/bootland/asphalt { qer_editorimage textures/bootland/asphalt { map $lightmap } { stage diffuseMap map textures/bootland/asphalt blendfunc GL_DST_COLOR GL_ZERO } { stage specularMap map textures/bootland_nmaps/asphalt_spec specularExponent 8192 blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA } }
Tempust85 Posted March 17, 2014 Posted March 17, 2014 How are you adding it to the misc_model/misc_model_static? I'm loading up an MD3 as you normally would for a misc_model / misc_model_static. The shader should be able to be applied to it, as it works fine in ioquake3. But it's not just the shader issues, it's also the model angle not matching what you see in radiant. It matches fine in jamp.exe though.
Xycaleth Posted March 17, 2014 Posted March 17, 2014 Nope. This shader. Same thing happens with and without the blendfunc. textures/bootland/asphalt { qer_editorimage textures/bootland/asphalt { map $lightmap } { stage diffuseMap map textures/bootland/asphalt blendfunc GL_DST_COLOR GL_ZERO } { stage specularMap map textures/bootland_nmaps/asphalt_spec specularExponent 8192 blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA } } Don't use a blend func for the specular map stage and see how it is.
Boothand Posted March 17, 2014 Posted March 17, 2014 Don't use a blend func for the specular map stage and see how it is. Same thing happens with and without the blendfunc. I'm only using q3map_sunext at the moment, if that matters.
Tempust85 Posted March 17, 2014 Posted March 17, 2014 Make sure you don't have any blendfunc in a rend2 shader stage, and make sure r_sunlightmode is set to 2 in the console.
Boothand Posted March 17, 2014 Posted March 17, 2014 Make sure you don't have any blendfunc in a rend2 shader stage, and make sure r_sunlightmode is set to 2 in the console. Hmm the results were kind of.. visual. I was just about to stream map-making, so I just included this now and made a short video. http://www.twitch.tv/journeytobootland/b/511936526 Also, any brand new rend2 versions I could borrow?
Tempust85 Posted March 17, 2014 Posted March 17, 2014 Try removing map $lightmap, and can you please post your sky shader so I can help you rend2-ify it so you don't need to use r_forcesun 1. r_sunlightmode 2 is meant to look dodgy with non rend2 maps according to the documentation, so I'm thinking it means a non rend2 sky shader.
Boothand Posted March 18, 2014 Posted March 18, 2014 Try removing map $lightmap, and can you please post your sky shader so I can help you rend2-ify it so you don't need to use r_forcesun 1. r_sunlightmode 2 is meant to look dodgy with non rend2 maps according to the documentation, so I'm thinking it means a non rend2 sky shader. It only made it look non-lightmapped and regular.Yeah, in fact I haven't added any sky to my rend2 shader yet. If this is what has caused all my past problems with silly looking normal maps etc, I apologize In any case, here's my current placeholder sky shader, only placed in the vanilla .shader. textures/bootland/bootsky { qer_editorimage textures/skies/sky // red green blue intensity degrees elevation deviance samples q3map_sunExt 0.869713 1 0.472299 900 30 50 2 16 surfaceparm sky surfaceparm noimpact surfaceparm nomarks notc q3map_nolightmap skyParms textures/skies/bespin 512 - }
Tempust85 Posted March 18, 2014 Posted March 18, 2014 //q3gl2_sun <red> <green> <blue> <intensity> <degrees> <elevation?> <deviance?> <shadowamount - 0 too dark, 1 too light> q3gl2_sun 240 238 200 50 195 75 3 0.5 //q3gl2_tonemap <toneMapMin> <toneMapAvg> <toneMapMax> <autoExposureMin> <autoExposureMax> q3gl2_tonemap -5 -1.5 0 -2.0 2.0 q3map_skylight 50 16 q3map_lightimage $whiteimage Add in this code, just tweak the values to your liking. Boothand likes this
Recommended Posts