Boothand Posted February 14, 2014 Share Posted February 14, 2014 I've found a celshader. It works perfectly with JKA. When compiling for JK2, it gives the error MAX_MAP_DRAW_SURFS (131072) exceeded. I've tried commenting out some lines in the shader, but can't find what's wrong. The annoying part about it is that Grand Flaw uses this exact method and celshader, and copying the exact way it's done there (including things like blocksize and gridsize) still gives the error. A friend of mine has the same problem. Key: _celshaderValue: celshadertest/ink Shader: // ink shader for maps // to use, add "cel" to shaderlist.txt // add a "_celshader" key to worldspawn entity with a value of "cel/ink" textures/celshadertest/ink { qer_editorimage textures/celshadertest/black.tga q3map_notjunc q3map_nonplanar q3map_bounce 0.0 q3map_shadeangle 120 q3map_texturesize 1 1 q3map_invert q3map_offset -2.0 surfaceparm nolightmap surfaceparm trans surfaceparm nonsolid surfaceparm nomarks sort 16 { map textures/celshadertest/black.tga rgbGen identity } } textures/celshadertest/no_ink { // qer_editorimage gfx/colors/black.tga // q3map_notjunc q3map_nonplanar // q3map_bounce 0.0 // q3map_shadeangle 120 // q3map_texturesize 1 1 // q3map_invert // q3map_offset -2.0 surfaceparm nodraw surfaceparm nolightmap surfaceparm nonsolid surfaceparm trans surfaceparm nomarks // sort 16 // { // map gfx/colors/black.tga // rgbGen identity // } } Any ideas? Link to comment
mrwonko Posted February 15, 2014 Share Posted February 15, 2014 Since cel shading is implementing by duplicating each surface (it's moved outwards a bit and flipped) it doubles their number. You'll thus hit engine limits earlier. The limit in question, that for drawn surfaces, seems to have been increased in Jedi Academy, which would explain why you only run into it in JK2. You'll have to drop some geometry to "fix" this. Link to comment
Boothand Posted February 15, 2014 Author Share Posted February 15, 2014 Since cel shading is implementing by duplicating each surface (it's moved outwards a bit and flipped) it doubles their number. You'll thus hit engine limits earlier. The limit in question, that for drawn surfaces, seems to have been increased in Jedi Academy, which would explain why you only run into it in JK2. You'll have to drop some geometry to "fix" this. This was tested by cel shading a single square block in an empty room. While grand flaw, which is a JK2 map, is massive. Link to comment
mrwonko Posted February 15, 2014 Share Posted February 15, 2014 This was tested by cel shading a single square block in an empty room. While grand flaw, which is a JK2 map, is massive.Oh I see. You're obviously not actually hitting a limit then, so it's probably some problem with Q3Map2. But if it works in Grand Flaw in JK2 there's got to be some way, presumably just not the one you used? Are you sure it's done using _celshader there? Link to comment
Boothand Posted February 15, 2014 Author Share Posted February 15, 2014 Oh I see. You're obviously not actually hitting a limit then, so it's probably some problem with Q3Map2. But if it works in Grand Flaw in JK2 there's got to be some way, presumably just not the one you used? Are you sure it's done using _celshader there? Yeah, I have decompiled it to see how it was done, and that's where I initially got the _celshader from. I feel I maybe shouldn't hand out .map files like that, but the celshaded entity in question has: _celshadercel/ink The worldspawn entity has: gridsize272 272 320 _blocksize8192 I've tried using those as well, as if it would somehow impact, but obviously they shouldn't really make a difference. The only thing I can imagine is that he used a different compiler (or certain -keywords to omit the issue) As far as I know, all versions of GtkRadiant (and JK2Radiant) uses the same q3map2 though? EDIT:Note: Compiling for JKA and running it in JK2 works with the celshader. However, there should be a more proper way to fix it, since entities are not the same, and I suppose I've got to use the JK2 compiling process for other entities. Link to comment
Szico VII Posted February 15, 2014 Share Posted February 15, 2014 Is there not a worldspawn _celshader key? Link to comment
Boothand Posted February 15, 2014 Author Share Posted February 15, 2014 Is there not a worldspawn _celshader key? Yeah, you can set it on the worldspawn as well (which is what I intend to do). Not sure what effect it has on large maps, but for now, it doesn't compile in JK2 mode in any case. Link to comment
Szico VII Posted February 15, 2014 Share Posted February 15, 2014 I mean have you tried compiling with it set on a per-map basis not a per-shader basis Link to comment
Boothand Posted February 15, 2014 Author Share Posted February 15, 2014 I mean have you tried compiling with it set on a per-map basis not a per-shader basis I'm afraid you'd have to explain that again What do you mean? Link to comment
Szico VII Posted February 15, 2014 Share Posted February 15, 2014 As in dont add your celshader to individual entities or individual map shaders, just try adding it globally to the worldspawn? Link to comment
Boothand Posted February 15, 2014 Author Share Posted February 15, 2014 As in dont add your celshader to individual entities or individual map shaders, just try adding it globally to the worldspawn? Yeah, that doesn't work either. It works as long as the engine path points to JA. The "Game" can be set to JO and it will work. But again, not good for some entities I suppose. Link to comment
Szico VII Posted February 15, 2014 Share Posted February 15, 2014 Engine path points to ja? I didnt think q3map2 cared about or needed an engine path@? Link to comment
eezstreet Posted February 15, 2014 Share Posted February 15, 2014 It does. q3map2 does different things based on game. And no, entities aren't affected by what game you use for q3map2. Link to comment
Szico VII Posted February 17, 2014 Share Posted February 17, 2014 It needs a game switch not an engine path for that? Link to comment
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