It is currently Sat May 18, 2013 8:32 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Jan 04, 2011 8:12 am 
Offline
Jackman
Jackman

Joined: Mon Jan 03, 2011 7:43 pm
Posts: 6
Hello
I noticed that 3Dsimmed is able to damage gmt when it uses custom shaders (probably not recognized by the program)
In result bumpmapping look weird after loading into rfactor.

background:
We are using our custom shaders (SimracingPL Shaders Pack by Krzyszto Szczech). We set new shaders as well as other material properties using external tool. I can't put those shaders into 3Dsimed - it doesn't work. So 3Dsimed sets diffuse shader for materials any time it find custom shader.
We have no problem with it because after any modification we can set material properties to whatever we want (usually the last saved settings).

But yesterday we had situation here. We found that object in rF looks strange - different than it looked before. After some investigation we found that 3Dsimed changes something in gmt file after loading gmt which contains custom shaders and saving it.

See the screenshots:

screenshot1: upper part is wrong. lower one is correct
Image

screenshot2: upper part from screenshot1 looks even good from close range. But believe me - it is wrong. Now how it looks from normal camera position
Image

Finally how to reproduce:
download: http://maxym.simracing.pl/temp/cpit_bad.zip
archive contains 3 files:
- bmw_m3_e92_kit03_interior_cpit_orig.gmt - original gmt without custom shaders
- bmw_m3_e92_kit03_interior_cpit.gmt - gmt with custom shaders. Notice the same size of gmt comparing to original one
- bmw_m3_e92_kit03_interior_cpit_bad.gmt - damaged gmt. Notice different size of gmt comparing to original one

Load bmw_m3_e92_kit03_interior_cpit.gmt into 3Dsimed and save it. You will see that new file is quite different.
Load orig one into 3Dsimed and save it. You will see that new file has the same size.

Conclusion:
I can compare material properties for all files using external utility. I'm sure that materials for source and just saved files are the same. It means changes in visualisation (see pictures) are due to changing objects, not materials.
3Dsimmed may damage objects (in gmt file) when material contains not recognized shaders.

BTW: How to add custom shaders (SRPL Shaders Pack) to 3dsimed? Is it possible? puting it into Hardware Shaders directory doesn't work.

best regards


Top
 Profile  
 
PostPosted: Wed Jan 05, 2011 2:57 pm 
Offline
US Pits Crew
US Pits Crew

Joined: Thu Sep 01, 2005 9:58 am
Posts: 749
Location: Barnet, London
The shaders are not recognized because 3DSimED is expecting the DX9 shader to have the prefix "L2". Not only that but it looks as if no shaderdowngrade is defined for some of the shaders in the pack.

I will make some changes to enable 3DSimED to read the shader definitions from the GFX and then I think the correct data should be written back to the .GMT (the tex coords, binormals etc. depend on the shader).

Cheers!

Dave N.


Top
 Profile  
 
PostPosted: Wed Jan 05, 2011 3:42 pm 
Offline
Jackman
Jackman

Joined: Mon Jan 03, 2011 7:43 pm
Posts: 6
Thank you for answer.
For me strange is, that when shader is not recognized, then gmt lost some data which are not recoverable later.

For example if I save object (gmt) with diffuse shader, which doesn't support bumpmapping etc, I can later load this model again, change shader and everything works fine. I can also replace material outside 3dsimed using 3rd party stuff and it will also work as expected.
But it doesn't work this way in case of model with unrecognised shader.

I hope You got my point. Hope it will be solved.

Best regards


Top
 Profile  
 
PostPosted: Thu Jan 06, 2011 4:30 am 
Offline
US Pits Crew
US Pits Crew

Joined: Thu Sep 01, 2005 9:58 am
Posts: 749
Location: Barnet, London
You are very lucky if you can do that because the data for the bump mapping will only get written if there a bump map present. So if you changed a material with a bump map to a simple diffuse then the binormals and tangents required for high quality bump mapping are lost but the texture coordinates of the channel should be preserved so it might look correct on first look but it is not the same. Try it with both SimED and ISI 3DSMax plugin - the .gmt changes size based on the texture coordinates, binormals etc required by the shader.

Cheers!

Dave N.


Top
 Profile  
 
PostPosted: Thu Jan 06, 2011 2:40 pm 
Offline
Jackman
Jackman

Joined: Mon Jan 03, 2011 7:43 pm
Posts: 6
OK, My fault.
I believed that original material was diffuse only. I've checked now and it uses shader for specbump and has assigned related textures.

I don't know gmt format at all, but I'm sure it is possible to leave needed for bumpmapping data untouched even if diffuse shader is assigned.
If implemented to 3dSimed, it may be very useful for experimenting with materials. Finally there may be a checkmark called 'optimize' on GMT save dialog to remove unneeded data.

thank you for all answers.
best regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group