• Welcome to PiBoSo Official Forum. Please login or sign up.
 
October 20, 2019, 03:04:01 am

Shader info

Started by h106frp, February 29, 2016, 04:58:30 pm

Previous topic - Next topic

h106frp

In an old post about GPB graphics;

Quote from PB;
Except for this, everything is supported: normal maps, specular maps, live reflections, static reflections, reflection maps, ambient shadows, 3D grass, 3D marbles, rain reflections, raindrops on the visor, ...

I have read through the track creation guide but find nothing on;
live reflections
reflection maps
ambient shadows
rain reflections

All of which would be very useful, any chance of some quick documentation for these items.

Thank you.

janaucarre

I tried some little things like specular or reflection texture in 3dsmax and export to gpbikes,  i didn't see any changes as without :( if there's some skills some knows I'm interested

h106frp

You have to rebuild any shaders using fbx2edf and shader scripts but reference scripts only exist for normal, specular and static reflection.

Hawk

The Victoria track hasn't got any .shd file for us to reference, yet I heard that it has spec and bump mapping applied? How? Or has it not any maps applied?

Hawk.

h106frp

February 29, 2016, 08:45:13 pm #4 Last Edit: February 29, 2016, 08:47:48 pm by h106frp
It would be great to get this fully documented. I have only done a bit of experimenting with normal/specular/static cube and the effects are great on the 1P cockpit. Flat colored sections really come to life and you do not need to 'fake in' lighting with textures.

Need to do a lot more experimenting but so far i have found that normal map online http://cpetry.github.io/NormalMap-Online/ and GIMP can be used to construct the normal map with specular in the alpha channel http://graphicdesign.stackexchange.com/questions/8397/gimp-using-an-image-as-the-transparency-layer-of-another-imageand it works OK.

I am glad i have tackled this before going any further with the model as it impacts the object and maps if you want different components with multiple different shader effects.

The live reflection interests me the most though i am wondering if the cockpit model is coded to become 'wet' in the rain somehow 8)

Steven

For normal maps there's also a plugin for GIMP here:
https://code.google.com/archive/p/gimp-normalmap/

Concerning your first post:

To create ambient shadows you have to create a plane facing upwards with a texture. I put it in the coordinate center. The texture should be white and with it's alpha channel you control where the shadow is - white means there will be shadow, black means there won't. For example you can create a black-to-white circle shaped gradient or in Blender bake the ambient occlusion to this plane and use it as alpha channel. Then export as "Mesh" (there is "Shadow" but I didn't see any difference with this) and name it in the gfx.cfg ("ambientshadow", see a stock bike for reference).

As always it would be good to have some confirmation, but at least it worked this way.
(For example, if you set the plane higher than coordinate center the shadow gets lighter. And you can also control the shadow with the color channel of the texture, but this looked ugly when there were two ambient shadow planes overlapping (for chassis and wheels).)

The "reflection maps" maybe just belongs into the line "normal maps, specular maps, reflection maps". (With the spec/refl maps you can say how much something specs/reflects.)

And "live reflections" could just be in contrast to the static reflections (with cube maps).
Another thing might be that if you look at the reflections of a bike's chassis for example the reflections are not completely fluent. But if you create a mirror (a plane with a texture called something with "mirror") it's completely fluent. Maybe that's (more) "live".

Rain reflections might be that the track gets shiny when there is rain. So maybe no "wet look" for the cockpit, but you never know with PiBoSo ... (features that are already included but nobody knows about).
(Allthough you could try to misuse the function that gets the windshield wet for the cockpit as well).