SimRacingPL Shader Pack - discussion

@KSzczech

my car shaders are running perfect now

Can you plz make a hardcopy like XOA to show some good values for making nice "windows" next ...this screencopy of xoa helped

a lot indeed. THX
 
I just need the part of lights "lens flare?" for head lights, brake etc , and so would know how to do everything.

Thank you very much MaXyM and thanks for shaders KSzczech.
 
In general, I find this approach pretty convenient:

1. Clear both specular scales to 0.0, set fresnel base to 1.0 and fresnel scale to 0.0
2. Select cubemap with best blur level for your material

For example, look at this photo:

2005-Lincoln-Town-Car-Dashboard.jpg


You can see that steering wheel, dashboard and seats reflect environment, but reflection is very blurry. So you can choose srpl_envmap08b07.dds, for example - this cubemap is very blurry version of srpl_envmap08.dds

3. See how reflective given material is when you look straight at it, and adjust fresnel base to get this level of reflection
4. See how reflective given material is when viewn at extreme angles and adjust fresnel scale and fresnel power to control how reflectivity changes with viewing angle

Fresnel settings are exaplained on pages 24/25 of manual.

5. Adjust first specular power and scale to add direct sun reflection
6. Use the other specular power and scale to add bright sky around sun reflection

Specular settings are explained on pages 25/26 of manual.

For materials with very blurry reflections, one specular setting may be enough - in that case you leave the other specular scale at 0.



For glass you will probably want low fresnel base to make clear windows (somewhere around 0.1-0.15), pretty high fresnel scale to get highly reflective glass at extreme angles (fresnel scale around 0.8), and fresnel power around 4.0-5.0.
Cubemap would have no blur, so use srpl_envmap08.dds, but srpl_envmap07.dds could be better for buildings - see page 73 of manual for more info about these cubemaps.

Specular reflection would be pretty strong and sharp - I've been using specular power above 2000 for glass, but then it's good to add second specular reflection to make sky brighter around sun reflection.


Of course keep in mind that base texture should have pretty low alpha channel value for glass.
 
It means that value of texel in texture is close to 0 not 255 (well, 0 is lower than 255 :) ).


I'm always talking in terms of what is actually in the texture, because every graphics program seems to have it's own notion. Some may show you white alpha where it's value in texture is 0, others will show you black alpha there.

In realtime 3D graphics 255 means opaque. If you fed RGB texture without alpha channel to GPU, then pixel shader will always get alpha=255 from it, which means opaque.
 
I have two problems with the sky:

Why does the moon and the sky look like this? I changed nithing, only darkened the clouds01.tga

 
You probably have original sky.gmt file in your project. Check out known issues at the end of sky chapter in manual - it should be described there.

If that's the case, then edit project file - look for SKY.GMT and remove entire <GMT> tag containing it.
Also make sure old SKY.GMT isn't loaded anywhere in .scn file.
 
Hi K Szczech, I´m new here... I want to ask permison to use your shaders in my proyect, Ascari Race Resort.

I was looking your threads and there is a lot of info about shaders, really good work and great to see you want to share...

I was working on Ascari long time ago, I made from scracth the entire circuit and a lot of 3d models like buildings, marshall, sings, other stuff like vegetation are from others moders.

I'm working on BTB, but I also use 3dsimed and blender, you can see a lot of info about the entire proyect on Simracing.es [ SimRacing.es Forum > Taller > 3D > Bobs Track Builder > Proyectos SimRacing.es > [rF] Ascari Race Resort (en construccion) ]


acctually I`m not using your shaders pack, but I want to use.

Please can you tell me if you kwon what I´m doing wrong with the blend in the terrain?

when the night comes and the cars put the ligth on, the ligth does not iluminate the blended material, so I loose the blending effect when the ligth of the car "hit" a blended material, Rfactor only show the base material.
 
Go ahead and use my shaders.

Good luck with the project, too :)

As for terrain - rFactor has a bit awkward way of adding headlights from cars. It's not real lighting but just blending. That's why it doesn't work well on blended materials, because you can't perform two blendings at the same time.

There isn't much you can do about it. I prefer to use alpha test (so-called chroma transparency) whenever I can instead of blending. For example lots of vegetation can do without blending, but you can also use alpha test for terrain.

For example look at this photo:

RoadEdge01.jpg


There is no blending here - edge between grass and road is sharp but not straight.

Terrain blending is something artificial, created by gaming industry to have "nice, smooth transitions" between textures.
Nice - maybe, but not realistic.
 
but blending simulates "unlimited resolution" of our eyes on quite limited res on our monitors. ;)
Of course I agree with KS - alpha testing is best way to avoid most of problems. Only 2 things must be complied (at least one of them):
- very hight resolution of texture
- camera can't be so close to the object (which is sometimes hard to achieve for example in case of trees)
 
Thanks for reply K Szczech and MaXym.

I think the Beta will have Blending on terrain, I have planned to relase a Beta when all BTB work will be done.

but I will change that on the final version, it is very simple to do a Blending in BTB, but I need to import the entire proyect to Blender to be able to remap everything, anyway I need to do that step to fix some issues and merge some polys, so I will try to do realistic transitions using crhoma transparency and good textures.... not easy goal.

I feel fortunate to have his help, it is curious that many people who know little of Rfactor explain nothing if you ask something.... you know a lot of shaders and tell it all, people like you do my self also want to help others and that is priceless, good work here. :)

This video has many 3D objects "finished" but without optimizing its materials, is an old copy that I use in BTB as a testing ground.

http://vimeo.com/40988348

when I have what I like in the testing ground project I put it in the real project, so I avoid problems with BTB, which is a fantastic tool to start a project, but has many shortcomings when finished.

greetings
 
Do you know if someone released a track with SRPL Shaders?? I really would like to try it.

EDIT: xoa when do you release that awesomeness? It really looks gorgeous
 
Last edited:
We do these updates for our leagues, but these are not our tracks and cars, so we can't just release them. Not even as a showcase, unfortunately.

When I find the time, I'll make some final touches to Nogaro and Navarra - I've come to agreement with authors of these tracks and I might release them after approval.

Also, people are working with these shaders on their projects, but it will take some time until they learn to take advantage of all these features :)
 
I'm looking forward to Nogaro and Navarra then :)

I think every modder should update his stuff with these Shaders.

It's a "next gen" thing.
 
Well, for the public I won't release it. Like K Szczech said, the missing agreements is the problem. I do this work for our private hillclimb league. ;)

Mid'Ohio is just my test-track.
 
Last edited:
Hay K, Lemax and I are finishing a new Yugo mod that we have built from scratch and we would like to have the permission to publish it with your shaders. We have tested it with your shaders and it looks fantastic =)

1.jpg


2.jpg


4.jpg
 
Looks nice :) Go ahead with shaders.


By the way - if this is just one car mod, then it shouldn't be too much work to put shaders on rims, tyres, dashboard, or even play with light effects and cockpit window shader.

Carpaint and glass make the most difference, but it's only tip of the iceberg - other stuff can also help for more complete look :)
And of course, you can save your materials in a database and then simply reuse them on other cars.

If you find good settings, then it's only a matter of similar texturing on cars (especially similar level of brightness in specular maps).


PS. I know you've built some other stuff from scratch aswell, so feel free to use these shaders on your other projects aswell if you want.
Perhaps you'll find shaders with tone mapping an interesting solution for tracks.
 
Last edited:
Hey K,

I've tried out your tool on my fantasy track project but I'v encountered some problem.
My first problem is everything is black in the editor. Couldn't solve it by myself, but it's not that big problem.
Second problem is that after importing my AIW file, setting up the diagram and road materials and then exporting my track, in rF, the whole track is covered by rubber and skids. Don't know what I did wrong because I followed your instructions in the manual.
Could you help me please?
 
As for everything being black - check if you have texture path set properly in project options. Also, tool will not look for textures in subfolders - only in specified folder.

As for the road - it's hard to tell without any specific information or files attached.
Have you modified thexe exported GMT files in any way? Are you sure rFactor loads these exported files and not original ones? Have exported files been edited with other tools?

All GMT files exported by my tool will work in rFactor but not with any other tools.
 
@K Szczech
I noticed games like gt5 shift or pccars have a lot more sunlight and shadow on the track (and cockpit)

Is there a way to get this into rfactor ( in good quality) as well ?
 
Maybe I will try to answer cause I worked on cockpits a last few months. Results of my work you may see on Post Your Screenshots thread: https://community.racesimcentral.net/showthread.php/99-Post-your-Screenshots!?p=63823&viewfull=1#post63823

Basically, there is no way to get result found in Cars or Shift. It's because rF1 cant cast self shadows into cockpit. What you can see in most modern titles, is bright light (from sun) cut off by cockpit elements casting self shadow. That's where contrast comes from. It's impossible in rF1. Period.

However you may improve "feeling" while driving rF1 cars. I have plans to write some kind of tutorial of how create complex materials for cockpits using SRPL ShaderPack. But I try to write a few points now:

1. At first do not use shader with ToneMapping. It makes things very bright when sun is behind of a car. It is unnatural in case of cars with roof. It may fit more for OW cars or cabrios.
2. I used Unrestricted Shaders x1.0 to get results you can see on screenshots.
3. Think about where direct sunlight is operating at most - usually under under windshield, close to lower edge door's windows
4. Do not forget about sky reflecting in cockpit. It will be the same places as listed in #3. But to make it visible you have to give a lot of Fresnel base which affects also specular reflection. You have to tune it up.
5. Best way is to set spec texture for most exposed areas to high values (suggest about 240 avarage). The rest may be way darker.
6. Then set material without specular lighting (with texture but both spec scale set to 0) - to get required result of sky reflection.
7. Then add specular reflection - note - more specular (especialy more spec power), more glossy material you get, especially valid for close-up of material with normal map pattern. For matte materials like alcantara, it is enough to use only one specular, and set it very wide (low specular power).
8. Tune up specular parameters to get as bright result as acceptable when racing against the sun. Check it at 2pm, 4pm, and 5:30pm. Note, that more Fresnel scale - more changing reflection while sun changing position or car changing pitch (it's base rule of Fresnel effect, intensity of reflection depends on reflection angle). To get always a lot of reflection, I suggest to use low fresnel scale. it is not realistic, but without this "trick" you get hard reflection at dawn but too low afternoon. Unfortunately without HDR it cannot be done another way to get visible reflection of sky at noon and not over-brighten reflection later afternoon

In parallel, you may (you have to) mask internal areas of interior by making corresponding parts of specular texture darker. A lot darker ;). It will limits reflections inside of car (it is not quite real but very close to what we can feel while sun light is cut out by roof and other car elements)

What you have to remember (I made such mistakes so I will share with my experience)
1. Do not try to get more diffused reflection by lowering fresnel base too much and then applying high specular to get some light reflection. Firstly because it is not real. IRL if material reflects direct light, it also reflects surroundings and sky (KS words). So, better is to use most blurred cube, set some real fresnel base and some low specular scale. Second reason of this approach is calculation precision. In case of using 0.001 fresnel base, you will never get maximum (white) reflection doesn't matter what high spec scale you set. It is due to limitations of floating point calculations (especially with low precision like 8 bits used in that case)

BTW I have to make two notes:
Note, that SRPL Shader pack allows to create complex materials with two sets of diffuse/normal maps. Documentation says that first set is dedicated for main colour and second set for details. But it is not clear enough if it is allowed to use it in reverse order. Diagram says: yes. But watch out: second set of textures is not rendered when lit by another cars!!! This issue wasn't been known when writing manual I believe. I prepared some cockpit materials as AO texture in 1st set (texture expanded over whole object), and color pattern (ie alcantara, carbon) in second. Under lights I saw only AO, but not material texture. I had to recalculate UVs for all textures, which allows to use pattern in first set and AO-in second one - fortunately Editor provides such feature so it was not a case any more. Now only AO disappears when lit by other cars which is acceptable.

Another note that the same normal map texture used in second set gives slightly softer result. It is done intentionally (some maths) and difference is not such significant. But you have to know about it.

with regards
 
Last edited:
well done. i`ve never work with graphics or else, but now im iteresting to learn on how to create tracks (especially for rf2), so im reading all post, tutorials forums)))
 
THX MaXyM
very nice screenies and explanation

Will try to test some tipps of yours but seems to be a lot of work and time (very complex).

cheers
 
...I suggest to use low fresnel scale. it is not realistic...
Why not? :)
Some materials may have similar reflectivity at different viewing angles.

Check this out: LINK

Note that aluminium's reflectivity actually drops, only to raise at the end.
It's not currently possible to create a curve exactly like this one in the editor. I don't suppose anyone would go so far with his materials. Besides, with reflectivity raising only near edges, you would end up with aliasing artifacts.
Fresnel parameters are there to allow recreating general look of a material.

If I wanted to go into details I would create curve editor instead of fresnel parameters. Shaders allready can support any curve.
I just didn't see lots of modders going over internet looking for material reflectivity curves just to create some model for rFactor :) Without proper lighting and shadows it would be pointless to go that far anyway.
 
Last edited:
I suggested that for the purpose - for shading most light exposed materials like underwindow surfaces (ie dashboard). With "correct" Fresnel scale reflection, intensity would (and will) change significantly with daytime and also with changing car pitch. Nothing wrong with this excepting, that you must limit this effect to get no over-exposing. You have to options:
- lower specular scale - then you got very weak sun reflection ie at 13pm
- lower specular texture - you may set up more sun reflection but you will loose sky reflection.

So, I said it is a "trick" which helps to get required amount of reflection in all conditions in rF environment (without HDR/tone mapping). Anyhow I found no other solution.

I just didn't see lots of modders going over internet looking for material reflectivity curves just to create some model for rFactor
smile.png
Without proper lighting and shadows it would be pointless to go that far anyway.

Yeah.. That's why you should prepare curves for 10-20 common materials not asking them (including me) for impossible ;) To be honest I don't know till know what Fresnel power should be used for which substance... ;)
 
Last edited:
I don't know either :)

Experienced 3d artist would know and I'm not an experienced 3d artist. I could write very advanced 3d engine on my own, but I'm not sure if I would have the right touch when comes to creating textures and materials for it :)

Understanting helps of course - you know what to look for when observing materials in real life, but it's not like people who created 3D Studio are telling artists what to do and how to do it, right? Neither does Adobe tell anyone how to make good artwork with Photoshop.
Artists know these things allready and all they need is good tool that make things possible.


It's not the job of tool developers to teach artists their art. It's the other way around actually - it's the artist that tell tool developers what they need.
For example - when ID Software licensed their game engine to other companies (and that was a top quiality engine of course), they got feedback about material properties from artists working in these companies. They said that set of material properties is not sufficient and they cannot achieve every kind of material appearance they would like to.


I will of course help with anything related to shader pack or tools - technical issues, doubts, etc. I'm here to help with that, not to tell people how to create artwork.
 
I got your point. I know also that real artists just know what result they want to get - just know how it works in world around us.
But sim word is not dedicated for artistic expression - it should simulate real world. That's why I'm asking for values which corresponds to real world ones. And you are most appropriate person for this I know.
 
Last edited:
As for everything being black - check if you have texture path set properly in project options. Also, tool will not look for textures in subfolders - only in specified folder.

As for the road - it's hard to tell without any specific information or files attached.
Have you modified thexe exported GMT files in any way? Are you sure rFactor loads these exported files and not original ones? Have exported files been edited with other tools?

All GMT files exported by my tool will work in rFactor but not with any other tools.

My textures can be found in materialtool2/HV_source directory and this is what I have in my project file:
View attachment 2296

After exporting the track, I've just copied the files into my track's SRPL subdir and edited the scn file like this:
SearchPath=.
SearchPath=HighVoltage
SearchPath=HighVoltage\SRPL
//--------------------------------------------------------

//MASFile=HighVoltage.mas

So it will only look for gmts and textures in directories and not in mas files. Did not edit them with other tools. After seeing there's a problem with it, I've just ran your materialtool to see in the .xml if every texture is correct.
Here's my log file:
View attachment 2297
 
There are only two directories seeking for textures:
image/textures/ - global shared directory for MaterialTool. It contains provided with MaterialTool textures like cubemaps. I suggest to put here your own shared textures
directory set in project settings - may point to whatever directory in your filesystem. But if placed inside MaterialTool home directory, path is saved relatively to this homedir which makes moving/copying a project easier.

BTW You can set SearchPath in scn file to any directory you want, even outside rfactor home dir. For example
SearchPath=.
SearchPath=HighVoltage
SearchPath=D:\Programs\MaterialTool2\Projects\YourTrack\textures

BUT:
when using "Export all" feature, Material tool will export every needed texture into destination directory. So it is no need to set search path as in example above because all gmts and textures will end up in the same place. Also you have to use "Export all" feature when using unrestricted or tonemapping shaders (to replace all stock shaders by new ones in all gmts) - so as yo can see, it is not a case.

In other word, place all source files (gmt/textures) in some project directory (best place is somewhere inside MT dir), then export it into rF directory structure. I found this approach easiest and most comfy.
 
Last edited:
That's not the problem. Log says that shaders failed to link - I need to look into it.
 
Hi, great tooll!
I managed to apply road shaders correctly but i dont understand how skidmars are placed on track. (i have no modding knowledge;).
I was thinking its done with this 3d AI line but no matter what changes i make to it skidmarks are always in the same place. So sometimes i have them in turn and sometimes not...
 
Yes, you need to load AIW file but it will only determine the racing line, not skidmarks strength.

To control strength you should manually edit graph in road surface editor (see pages 65 and 66 in the manual). Black line on the graph only shows you what's in AIW file, but does not affect the look of road shader. It's the yellow line that decides everything and it's flat by default - you need to edit it.

And of course I assume you have selected all road materials? To make sure use "highlight mat" option and see if materials cover entire track.
And while editing, you may want to use "copy all button" to propagate settings from material you're editing to all the rest.
 
It's the yellow line that decides everything and it's flat by default - you need to edit it.

And of course I assume you have selected all road materials? To make sure use "highlight mat" option and see if materials cover entire track.

Yep i selected all. I already was making some changes to the red/yellow racing line but couldnt see any changes in where skids were placed. Will work on it some more. At least i know for sure what i need to do:) Thx a lot
 
Changes won't be visible untill you press "Generate UV" button - they're not shown in realtime.

Of course when you export your track then it doesn't matter if you ever pressed "Generate UV" - export will always be up to date with graph.
 

Back
Top