• Welcome to Kart Racing Pro Official Forum. Please login or sign up.
 
April 28, 2024, 10:27:57 AM

News:

Kart Racing Pro release13e available! :)


Shaders, Multipe UV's, in game crash.

Started by Bushman52, June 02, 2012, 11:05:55 PM

Previous topic - Next topic

Bushman52

I'm working on my first track for KPR.

So far I've managed to create a working track surrface with kerbs, walls and run offs etc. All surfaces are textured and the level loads and runs fine in game no problems...

However, if I try adding a tyre mark texture map to the opacity slot for the tarmac, (using a 2nd UV channel), the game crashes when it attempts to load my track in, despite the track looking fine in tracked, ie with the tyre mark detail map displaying fine.

Similarly, if I try to add a spec and/or normal map to the track material, using the process described in the creation rules, (ie with the .SHD txt file in the textures folder when you export), the same crash occurs when the game tries to load in my track.

Any help would be most welcome, thanks.

Aritz


Bushman52

The .map file is 3mb in my working version. If I add the 2nd texure and UV set to the asphalt for the tyre mark detail it goes up to 6mb.
I was assuming that both these file sizes are quite small, I hope so anyway as I still have much content to add.

Thanks

Schwoni

U have asph, Kerbs, walls and textures and only 3mb map file? there is something wrong^^ have u set the units to metric? if not u get very small tracks

Bushman52

The track is incomplete. The asphalt is 99% done, but I only have a few kebs and walls in at the moment. As I said I still have much to add so I think the file size is as expected.THe scale is correct - I am able to drive round the circuit on the working version... It's adding the multi channel materials that seem to break it....??

maxrod

What do you mean about multi channel material as the only channels you use in 3dsmax are texture wet and tyre marks. they will not give you a problem, If you are having a problem with game crashing on loading track it will be centre line not closed.

Bushman52

By multi channel material I mean I have a tiling asphalt texture in the diffuse channel and then a tyre mark texture in the opacity channel using a 2nd UV set.

I have saved my centre line to reapply to all exports and it works fine when merged with the export from the basic version of my track, but when the same centre line is applied to the version of the track with the additional material channel I get the crash. I'm sure therefore that it is not an open centreline causing the crash. 

maxrod

And before you applied the tyre marks did you have this problem?, Have you taken it away and tried it?, When it crash do it just go back to desk top, If you can't sort it out you could allways let someone on here have a look at it to tell you where you are going wrong.

Bushman52

Hi maxrod
I did not have this poblem before I applied the tyre marks, and if I remove them again and re-export everything seems to work fine. The crash occurs after pressing "go to track"... I get an audible error tone accompanied by an error message over a black screen. The error message is not particularly insightful. I then have to return to the desktop and end the process to close the KRP .exe
I get exactly the same scenario if I try to include a .SHD shader file for normal and/or specular maps.

Maybe there's something I have overlooked with my material setup... I currently have a separate material for each surface type, (as oposed to a single multi/sub). For the TRKASPH I have a 1024x1024 texture in the diffuse slot and and 1024x1024 texture in the opacity slot for the tyre marks.
Have I missed something?

Do you by any chance have an example file with the correct material setup including the tyre mark channel and normal/spec? If so I could export on my machine to check that it works for me. I'm a little reluctant to release my source assets until they're a little further down the line.

BTW I'm exporting from Max 2010 on Windows 7. The PC is an i7 with 4Gb Ram and an Nvidia GTS 250 graphics card. 

Thanks for your help

maxrod

I have windows 7 64bit 8g ram gtx260, 3dsmax 2010 64 & 32bit, I will pm you a test track with textures but you will have to wait a little time as i will have to sort it out.

Bushman52

Thanks very much, that will be most helpful.  :)

Bushman52

Thanks for the example file maxrod. I was interested to see that you are using overlying decal geometry for the tyre marks rather than using the multiply overlay though the opacity channel as the track creation guidelines specify.   Does everyone use the decal method for tyre marks? Does anyone know if the multiply method works?

It was also good to see that you hadn't hooked up your normal maps in the Max material editor. I did manage to get an export working with the normal/spec .shd and texture, but strangely it sometimes took 2 or 3 exports to get a version that didnt crash the game when loading the track, and even then I couldnt see the effects of the normal and specular maps in game.

I think I need to play around some more and study the files you supplied a little closer.

Thanks again.

maxrod

The more you play around with it the more you will start to understand, It was just a small example and a easy way to incorporated tyre marks, I don't understand why you are getting a crash on load if done correct it should load every time after export.