Jump to content

FEATURE: OpenGL 3 Renderer


Recommended Posts

Well I managed to fix the texture issue at least....

2ly4jf9.jpg

Normal maps work on ghoul2 models. As you can see, Tavion has the auto generated normal maps from the diffuse textures. :P

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. :P

@@ensiform

It'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?

redsaurus, Stoiss, Boothand and 3 others like this
Link to comment

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?

Link to comment

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
Link to comment

...Normal maps work on ghoul2 models. As you can see, Tavion has the auto generated normal maps from the diffuse textures. :P

 

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!!!

DT85 likes this
Link to comment

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.

Link to comment

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.

Link to comment

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.

Link to comment
  • 1 year later...

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

 

 

 

2m84feq.png

 

 

 

P.S there is no datapad_n texture and r_gennormalmaps is 0. :P

Link to comment

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.

Link to comment

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:

 

 

 

2hxx3de.png

 

 

 

Had a look through the call stack and here's where it looks to first come up:

 

 

 

f00f9.png

 

 

 

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

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...