Jump to content

rd-rend2 (old thread)


eezstreet

Recommended Posts

Posted

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?

Posted

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
Posted

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.

Posted

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.

Posted

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.

Posted

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
Posted

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
Posted

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
Posted

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 :)

Posted

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.

  • 2 weeks later...
Posted

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:
 
ykmRzq1.jpg

 

Tj0gqIo.jpg

 

gVHQZMX.jpg

 

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:

 

QdLIks8.jpg

 

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:

nPsLiuo.jpg

 

here are the normal map + the parallax in alpha of the normal map

0mHSWMw.jpg

YCIrY5p.png

 

and here's the specular map (I don't think that's the problem though)

9IHmeWX.jpg

 

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
Posted

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 :D

Guest
This topic is now closed to further replies.
×
×
  • Create New...