Szico VII Posted February 24, 2014 Posted February 24, 2014 @@BoothandNo probs - heres some closer up shots to illustrate a slightly finer blend after decreasing the first stages alpha a bit more
Boothand Posted February 24, 2014 Author Posted February 24, 2014 You're a wizard. I'm kind of still struggling to make it look slightly similar to your first one. But the idea was to make pinestem4's alpha smaller than the original (for instance shrinking the alpha using the burn tool?), and making pinestem5's alpha bigger than the original (but... exceeding the area that is textured?) I also noticed, though it won't be a real problem I suppose, that the part of this which is the blendFunc blend still bugs with the other trees etc. But it's not very noticable since it blends with the hard edged version. I suspect I'll be more than happy when I get it to look the way you did. I haven't compiled with lighting yet, because the lighting stage takes about 20 minutes even on small portions of the map...! (Which in turn generally makes it hard to experiment and finetune lighting in my maps. But that's an issue for a different thread, another time )
Szico VII Posted February 24, 2014 Posted February 24, 2014 You don't notice it at all, and realistically, for the very edges you would probably expect to see partially through to the trees behind anyway. Heres my PS4 And PS5 alpha As for the lighting, it takes a few seconds for me because 1) I reduced your skybox size (shouldnt really be using an actual "box" really anyway) and 2) didnt use a skybox shader with surfacelight paramater. Dont use a sky box light with surfacelight, Use one with q3map_sunExt Boothand and ent like this
Boothand Posted February 24, 2014 Author Posted February 24, 2014 That's very similar to what I had yeah. Hmm now I see what happens.When viewing the branches against anything else - the sky, the grass, the background, I can't see the soft edge blend at all. But when viewing it against the tree, it appears. Yours seems fine either way. Hmmpf! This happens also with lighting applied - which is really exciting by the way. You're right, it only takes a couple of seconds when adding q3map_sunext [etc]. I've seen it used with q3map_skylight as well, and the shader manual didn't seem to forbid it. What do you think about that? Edit: Seems like someone marked the thread solved, and moved it to modding assistance I'll make a new pine showoff thread once this is all settled.
Szico VII Posted February 24, 2014 Posted February 24, 2014 @@BoothandIts the "onlyvertexlighting" command paired with the "lightmapped" spawnflag on the models. Just remove the vertexlighting command and keep the lightmapped spawnflags. I forgot I'd removed that models/map_objects/bootland/trees/pinestem4 { q3map_alphashadow qer_trans 1.0 surfaceparm nonsolid surfaceparm nonopaque surfaceparm trans cull twosided { map models/map_objects/bootland/trees/pinestem4 alphafunc GE128 rgbGen vertex } { map models/map_objects/bootland/trees/pinestem5 blendfunc blend rgbGen vertex } }I moved the thread as it is kind of a help thread at present
Boothand Posted February 24, 2014 Author Posted February 24, 2014 Yay! Success I don't expect a 100% bugfree solution, but I'll just mention the last few things I notice. When viewed against the grass, it works as it should. When viewed against the water, and the sky (or I suspect *any* shader) it shows the hard edges only. It's not something I passionately intend to fix, but it's worth noting, just in case. Lastly, when removing the onlyvertexlighting command, it becomes in need of either a lightmap stage, or a nolightmap. Adding nolightmap, it loses what it gained by removing onlyvertexlighting. Adding a lightmap stage, it seems to kind of override/collide with the "lighted" spawnflag, and appears very shadowy and dark compared to before. (Oh it was you Of course)
Szico VII Posted February 24, 2014 Posted February 24, 2014 @@Boothand - It does not require a lightmapstage or a nolightmap in the shader. The "lightmapped" spawnflag will do everything for you. And I still dont see any of those issues.... Did you re-run the compile with the shader posted above and the lightmapped spawnflags? No sky or other shader issues...
Boothand Posted February 24, 2014 Author Posted February 24, 2014 Yep, even with the exact same shader. No assets colliding with it. Thought it might be a rend2 issue, but tested it on a clean base install in a pk3, and same results. Not able to test it on other PCs at the moment, since I'm *home* for a week. Crazy days. The reason why I brought up the lightmap was because the console is accusing me of not keeping my promises of a lightmap stage... for every branch
Szico VII Posted February 24, 2014 Posted February 24, 2014 Weird, I dont get any error messages... :| I guess nolightmap wouldnt hurt to get rid of them. I have no idea why then...
Boothand Posted February 24, 2014 Author Posted February 24, 2014 Stwaaaynge. I'll see in a week or so if I can further identify the issue. Could ATI drivers interfere with these things perhaps? Even though I'd highly doubt it. Nolightmap did hurt a bit to get rid of them, since it reverted to the state where it could only be seen in its own shade, and was hard-edged against anything else. For now I'll use the one that worked with non-shaders (and probably improve the texture itself!)
Solution Szico VII Posted February 24, 2014 Solution Posted February 24, 2014 models/map_objects/bootland/trees/pinestem4 { qer_trans 1.0 surfaceparm nonsolid surfaceparm nonopaque surfaceparm trans cull twosided q3map_alphashadow { map models/map_objects/bootland/trees/pinestem4 alphafunc GE128 rgbGen vertex } { map models/map_objects/bootland/trees/pinestem5 blendfunc blend rgbGen vertex } { map $lightmap blendFunc filter depthFunc equal } }Heres a lightmapped one that seems to work as well.
Boothand Posted February 24, 2014 Author Posted February 24, 2014 models/map_objects/bootland/trees/pinestem4 { qer_trans 1.0 surfaceparm nonsolid surfaceparm nonopaque surfaceparm trans cull twosided q3map_alphashadow { map models/map_objects/bootland/trees/pinestem4 alphafunc GE128 rgbGen vertex } { map models/map_objects/bootland/trees/pinestem5 blendfunc blend rgbGen vertex } { map $lightmap blendFunc filter depthFunc equal } }Heres a lightmapped one that seems to work as well. Yeah, it gets rid of the error as well, but it's a bit too dark I think. Liked it better the way it was before. Either way though, it still gives me the same blending troubles. To get those shadows, are you using a really strong intensity value of the sun?
Szico VII Posted February 25, 2014 Posted February 25, 2014 @@Boothand - I added _castshadows "1" to the misc_models and changed the grass brushes to a func_group with _lightmapscale 0.25, which gives you nicer shadows at the cost of compile time and lightmap space Well Ive packaged everything I have in a pk3. OpenJK rd-vanilla has a bug with the q3map_sunext at present so you'll have to either run in base JA or using rd-rend2, or remove the q3map2ext line when you test AFTER compiling and then put it back in when you need to compile lighting again. Ill be interested to see if it runs properly for you when using this pk3 http://s000.tinyupload.com/index.php?file_id=08011130653871898963 Boothand likes this
Boothand Posted February 25, 2014 Author Posted February 25, 2014 Impressive! Thanks so much! I've learned lots of neat tricks from this. The water environment map looks so nice, although for obvious reasons it kind of only looks right from one angle. Wish there was a way around that. I'll play around with it though. One last question, since we've kind of covered all kinds of topics by this time. Would you use the skylight parameter? The sunext looks very nice, but even with bounce8, it leaves a lot of areas not in direct sunlight way too dark. I don't wanna potentially ruin the shading spectrum with a minimum ambience light, although it could be the way it should be done. I was wondering if skylight is involved in this. After this, I'll try more and ask less Just in case it had compiler disadvantages such as surfaceLight, though.
Szico VII Posted February 25, 2014 Posted February 25, 2014 So, do the trees work properly for you when using this pk3?Ambient settings are fine for low values if you juust want to tone up veeery slightly, say 10-30 at most. Or you can use _minlight to prevent everything from being brightened and only brighten those which are completely dark. The envmap can be changed to reflect the other sides of the map (but they dont exist yet so.. )One more point - the q3map_alphashadow is the shader paramater that allows the compiler to use the alpha channel of the leaf texture to cast shadows See here --> http://jkhub.org/tutorials/article/97-shadowing-effects-and-alpha-shadowing/
Boothand Posted February 25, 2014 Author Posted February 25, 2014 So, do the trees work properly for you when using this pk3?Ambient settings are fine for low values if you juust want to tone up veeery slightly, say 10-30 at most. Or you can use _minlight to prevent everything from being brightened and only brighten those which are completely dark. The envmap can be changed to reflect the other sides of the map (but they dont exist yet so.. )One more point - the q3map_alphashadow is the shader paramater that allows the compiler to use the alpha channel of the leaf texture to cast shadows See here --> http://jkhub.org/tutorials/article/97-shadowing-effects-and-alpha-shadowing/ The trees behave like before. Bugged against sky/water.I see, I'll try out some of those. Hmm I'll probably ask for help about the envmap if I don't figure it out... soon enough, some time .Yeah I checked out alphashadows yesterday. Very handy!
Szico VII Posted February 25, 2014 Posted February 25, 2014 Really weird that...maybe it is a videocard issue then... :/
Boothand Posted February 25, 2014 Author Posted February 25, 2014 So, if any others are reading this thread - could you try the map and see if the branches have gradual blending seen against the sky and water? Especially if anyone has ATI drivers.On my main PC, the stationary, I have a geforce card, but I won't be with it until next week.
h643 Posted February 25, 2014 Posted February 25, 2014 (edited) For me looks like this: Vanilla Rend2 Edited February 25, 2014 by Circa not a fan of being taken off site Boothand likes this
Szico VII Posted February 25, 2014 Posted February 25, 2014 @@Boothand - Looks like an issue on your end then - the trees in @ screenshots look like they're working fine. (Ignore the skybox bug, thats an openJK issue with the vanilla renderer I think)
Boothand Posted February 25, 2014 Author Posted February 25, 2014 Cool. Comparison:JampVanillaRend2 Okay, so there is a difference when I use vanilla/rend2. It kind of works. Not sure if it's exactly the same as you have though. Maybe openJK could take care of it if it was an ATI card bug. Who knows what this tiny problem's mom and dad looks like. They could be tearing down the game from the very ones and zeros.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now