Tempust85 Posted January 23, 2015 Author Posted January 23, 2015 Well I managed to fix the texture issue at least....Normal maps work on ghoul2 models. As you can see, Tavion has the auto generated normal maps from the diffuse textures. Next big issue is ghoul2 bone shit crashing once ingame after a cutscene. That and luke crying for some reason. @@Xycaleth? EDIT: Can't seem to get to the bone crashing stuff in-game atm, could have been something I was messing with. @@ensiformIt's giving an error when loading yavin1b about the scepter weapon's so called item not being in items.dat. I managed to comment out the error to get past it but it's not the solution. How to fix without altering assets? Archangel35757, redsaurus, Boothand and 3 others like this
ensiform Posted January 23, 2015 Posted January 23, 2015 Get rid of the scepter weapon all together, or put it in your items.dat lol.
Xycaleth Posted January 24, 2015 Posted January 24, 2015 ... and luke crying for some reason. @@Xycaleth?Is that where his eyelids are being stretched to 0, 0, 0? I haven't figured out what causes the problem yet :/
Tempust85 Posted January 24, 2015 Author Posted January 24, 2015 Yeah and it only seems to happen on Luke for some reason. Maybe it's to do with skin weights not being within a certain range? I can't figure why I'm getting crashing when loading textures for models. Debugger goes to here in R_FindShader: hash = generateHashValue(name); // // see if the image is already loaded // for (image = hashTable[hash]; image; image = image->next) { if (!strcmp(name, image->imgName)) { //CRASH HERE // the white image can be used with any set of parms, but other mismatches are errors if (strcmp(name, "*white")) { if (image->flags != flags) { ri.Printf(PRINT_DEVELOPER, "WARNING: reused image %s with mixed flags (%i vs %i)\n", name, image->flags, flags); } } return image; } } It happens on any map that has item/weapon spawns. Any ideas?
minilogoguy18 Posted January 24, 2015 Posted January 24, 2015 I've been checking back daily hoping to see this thread move, some progress has definitely been made, wish I could help but I'm rarely home these days. Tempust85 likes this
Psyk0Sith Posted January 24, 2015 Posted January 24, 2015 So in theory if i were to hook you up with a normal mapped player model you could load it without (much) problems? Archangel35757 and Tempust85 like this
Tempust85 Posted January 24, 2015 Author Posted January 24, 2015 Yep, just only in my test map though as it has no item/weapon spawns. Psyk0Sith likes this
Xycaleth Posted January 24, 2015 Posted January 24, 2015 I can't figure why I'm getting crashing when loading textures for models. Debugger goes to here in R_FindShader: It happens on any map that has item/weapon spawns. Any ideas?I think this was either because the hashTable is getting uninitialized when you load a map, or because it's in the server-side code and the hashTable hasn't even been initialized. Archangel35757 likes this
Archangel35757 Posted January 24, 2015 Posted January 24, 2015 ...Normal maps work on ghoul2 models. As you can see, Tavion has the auto generated normal maps from the diffuse textures. It looks like there will need to be some tweaking on how to properly handle the auto-generated normal maps-- because if you look closely... Tavion's tattoo's appear to be cut into her flesh... whereas the tattoo should just be on the top of her flesh with no "+/- thickness". Great work Jon! Keep it up!!! Tempust85 likes this
Tempust85 Posted January 25, 2015 Author Posted January 25, 2015 Hmm, something sinister is going on I think: Why would the ghoul2 API be used when it's an MD3? I set a breakpoint in the same spot on vanilla and it never is loading an MD3... @@Xycaleth ?
Xycaleth Posted January 26, 2015 Posted January 26, 2015 Looks like it just tries to load the MD3 model as a Ghoul2 model regardless. It shouldn't get that far though. It looks like this line is wrong: if (ghlInfo->currentModel->data.glm->header)It should be if (ghlInfo->currentModel->data.glm)
Tempust85 Posted January 27, 2015 Author Posted January 27, 2015 There were a few lines in the G2 files that needed both data.glm & data.glm->header which I just added, but made no difference. Very strange indeed.
Tempust85 Posted January 28, 2015 Author Posted January 28, 2015 Nah, I can't figure out why it's trying to load the ghoul2 api when its an MD3. It's not doing for all MD3's afaik though so it's hella wierd.
Archangel35757 Posted January 28, 2015 Posted January 28, 2015 Anything different or unique in the header of the md3's that have issues?
Xycaleth Posted January 28, 2015 Posted January 28, 2015 I guess I didn't make my point clear in my previous post. It's fine that it's trying to load the MD3 model using the Ghoul2 function. What's not fine, is the line I mentioned. What should happen is that ghlInfo->currentModel->data.glm is NULL, so it doesn't go into the block that you posted with the screenshot, and nothing happens. Also, you shouldn't ever need to check if data.glm->header is NULL - if data.glm is not NULL, then data.glm->header will always be valid. If data.glm isn't NULL, then it sounds like it's not being initialized correctly.
Tempust85 Posted January 28, 2015 Author Posted January 28, 2015 It's just base assets. I did a test and misc_model_static works fine on my test map. It seems to be not getting stuck on the ghoul2 API now, so here's where it breaks in q_shared: const char *SkipWhitespace( const char *data, qboolean *hasNewLines ) { int c; if(parseDataCount < 0) Com_Error(ERR_FATAL, "SkipWhitespace: parseDataCount < 0"); while( (c = *(const unsigned char* /*eurofix*/)data) <= ' ') I managed to trace it back to 3 things during MD3 model loading that are giving me "unable to read memory": - st which points to mdvSt_t- verts which points to mdvVertex_t- indexes which points to glIndex_t Then I also see that vboSurfaces also has "unable to read memory" which is probably because of those 3 above. So freaking weird seeing as misc_model_statics & viewmodel weapons load fine.
ensiform Posted January 29, 2015 Posted January 29, 2015 Whats it crashing on in SkipWhitespace? Did you ensure to use the proper parse session stuff always with COM_Parse and its relevant functions like SkipWhitespace? These are required in SP. Look at SP vanilla renderer.
eezstreet Posted January 29, 2015 Posted January 29, 2015 Sounds like it's breaking in the parser for items.dat, perhaps. I suspect that's where your problems originated in the first place (probably a malformed/unexpected string, or the extension may have been stripped) Archangel35757 likes this
Tempust85 Posted January 29, 2015 Author Posted January 29, 2015 I dare say the shader stuff is still very much FUBAR, as I get shader-related crashes with ghoul2 on certain levels. I did however notice something else. Rend2 looks to be trying to partially do generated normal maps even though the cvar isn't set to 1, I found this out through one of the numerous shader crashes where it was trying to add "_n" onto the end of a texture name and the game was having a shitfit.
Tempust85 Posted December 27, 2016 Author Posted December 27, 2016 Yeah and it only seems to happen on Luke for some reason. Maybe it's to do with skin weights not being within a certain range? I can't figure why I'm getting crashing when loading textures for models. Debugger goes to here in R_FindShader: hash = generateHashValue(name); // // see if the image is already loaded // for (image = hashTable[hash]; image; image = image->next) { if (!strcmp(name, image->imgName)) { //CRASH HERE // the white image can be used with any set of parms, but other mismatches are errors if (strcmp(name, "*white")) { if (image->flags != flags) { ri.Printf(PRINT_DEVELOPER, "WARNING: reused image %s with mixed flags (%i vs %i)\n", name, image->flags, flags); } } return image; } } It happens on any map that has item/weapon spawns. Any ideas? Ok so I've done a fresh rend2 port to SP (this time without butchering things like tr_ghoul2) and I'm still getting this crash. Would appreciate some help on this guys, if you can. @@ensiform @@eezstreet @@Xycaleth P.S there is no datapad_n texture and r_gennormalmaps is 0.
Xycaleth Posted December 27, 2016 Posted December 27, 2016 Is there a shader called datapad_n? I think rend2 tries to automatically look for a texture which has the _n suffix to treat it as a normal map. Not sure why it would be crashing though - you might get a better idea if you build with debug configuration.
Tempust85 Posted December 27, 2016 Author Posted December 27, 2016 Nah, there isn't a shader with that name. I'm using plain base assets. I'll compile through debug and see what I get.
ensiform Posted December 27, 2016 Posted December 27, 2016 But the "_n" is a suffix added on when looking for a normalmap version of "datapad". Assuming you get the same crash with debug, it looks like you have an image object in the dynamic images array that has no name somehow?
Tempust85 Posted December 27, 2016 Author Posted December 27, 2016 Ok so I get an error that appears only when compiling in debug COM_BeginParseSession: cannot nest more than %d parsing sessions So after commenting out that error just to get past it for now, I get a different crash: Had a look through the call stack and here's where it looks to first come up: Character & weapon select screens, ghoul2 models load fine - except for the uber brightness of the model textures. A player model will load when compiled with release with debug info and no item/weapon spawns or bolt-ons in the map. So this crash is different. https://github.com/DT85/OpenDF2/tree/rend2-sp
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