Jump to content

FEATURE: OpenGL 3 Renderer


Recommended Posts

Posted

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?

Stoiss, redsaurus, Bek and 3 others like this
Posted

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?

Posted

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
Posted

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

Tempust85 likes this
Posted

Hmm, something sinister is going on I think:

 

 

 

2i75unr.jpg

 

 

 

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 ?

Posted

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

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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
Posted

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.

  • 1 year later...
Posted

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

Posted

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.

Posted

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?

Posted

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

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