• Welcome to PiBoSo Official Forum. Please login or sign up.
 
August 26, 2025, 10:48:39 PM

A try at modelling - WIP

Started by h106frp, January 03, 2016, 11:15:39 PM

Previous topic - Next topic

h106frp

I see what you mean - i will try removing the ambient from the normal shader and see if it looks better. The base texture is solid dark for the tread and the shader does the rest.

The parts that rotate are a problem with AO and i have avoided it on the rest of the model by removing rotating parts when computing the AO layer.

The tyre is tiled so the same texture and shader is applied around the circumference - without modelling the tread i don't think you can avoid the situation of fixed ambient lighting.

During model development when i had an untextured model with the mura AO layer you could see the dark spot from the bottom of the tyre when the AO was computed rotating around the wheel so i guess its unavoidable

Warlock

If i understood correctly, is it possible to rotate the uvmap 180° so the bad looking part in is the part of the wheel we cannot see from behind?

Sorry if its a dumb question, im a noob with these things  :P

h106frp

As the texture is tiled onto the UV it would still look the same rotated 180 and still would not work for a rotating wheel. Occlusions in (simple non realtime) bump maps are not dynamic but computed with fixed ambient lighting and baked to the bump map so we end up with strange lighting if the map rotates relative to a strong positional light source. I think i will just have to try it bump normal only first.

HornetMaX

Quote from: h106frp on May 18, 2016, 02:07:00 PM
As the texture is tiled onto the UV it would still look the same rotated 180 and still would not work for a rotating wheel. Occlusions in (simple non realtime) bump maps are not dynamic but computed with fixed ambient lighting and baked to the bump map so we end up with strange lighting if the map rotates relative to a strong positional light source. I think i will just have to try it bump normal only first.
Hmmm I'm lost (no surprise, I really know little abut all this stuff): I though that a bump/normal map was computed once (by an external tool) but then processed in real-time by GPB.
How can you bake the (pre-computed) AO into a bump map ?! To me they do two different things.

I'd try with bump map only first, then with AO only.

Most important (likely): when you compute the AO, you should use an ambient light, not a single (directional) light source hitting your object, otherwise your AO will depend on the light position. Maybe that's enough to fix the issue.

h106frp

May 18, 2016, 03:53:16 PM #289 Last Edit: May 18, 2016, 06:57:55 PM by h106frp
The specular is the alpha layer in the bump map to save texture memory - sorry, bake was probably the wrong description

As far as i can tell all of the normals are applied when you build the model in fbx2edf and it computes a fixed normal map for the bike from the shaders. The game engine then just applies a light source to this map - PB added some dynamic AO but i suspect this only works for geometry.

I will experiment a bit more after i get to the bottom of the LOD issue which has me very confused at the moment

Well having ridden the bike in a circle i think the normal directions of are flipped on the horizontal axis so in game they appear on the wrong side of the lighting model - when lit left they disperse right and when lit right they disperse left, I will re-compute and try again.

Well spotted - completely missed that one and i will have to check the 1P reservoir tops now for the same problem  ::)

HornetMaX

Quote from: h106frp on May 18, 2016, 03:53:16 PM
The AO is the alpha layer in the bump map to save texture memory - sorry, bake was probably the wrong description
First, you have a bump map or a normal map ? I know people sometime use both terms indifferently, but in reality they are not the same (see link below).

Second, are we sure about how GPB interprets your AO when it is placed as alpha channel of your bump/normal map ?
Up to now I think I've only seen AO "maps" as pre-baked layers to be used when skinning a bike (you create your skin and you layer the AO on top of it).
I'm not sure "mixing" the AO and the bump/normal map is something supported.

Quote from: h106frp on May 18, 2016, 03:53:16 PM
As far as i can tell all of the normals are applied when you build the model in fbx2edf and it computes a fixed normal map for the bike from the shaders. The game engine then just applies a light source to this map - PB added some dynamic AO but i suspect this only works for geometry.
Hmm ... that's not my understanding of normal maps (but again, I can be wrong on that).
I thought a normal map is obtained by a hi-poly model and, once combined with a low-poly model, it vastly improve its detail.
The normal map stores the information about the normal direction (as RGB values) at points of the low-poly surface, computing the normal direction from the hi-poly surface.
The game will then have to consider the normal direction provided by the normal map in order to compute the lightning of the low-poly surface (which, thanks to the normal map, will not be as flat as the low-poly model but more detailed, closer to the hi-poly model).

http://blog.digitaltutors.com/bump-normal-and-displacement-maps/

I agree on your conclusion anyway: just start with a normal map + eventually darker color for the groves in the texture (which kind of emulates ambient occlusion without the issue of the light soucre direction).

h106frp

May 18, 2016, 07:28:11 PM #291 Last Edit: May 18, 2016, 08:19:55 PM by h106frp
Sorry for the confusion max i did make a few errors in my description before;

The specular map which is just a grayscale is in the alpha of the normal map which is RGB for the normal vector - this is how PB documents the normal map as RGBa.

The AO for a texture is normally computed from the model in the 3D software and then added as shading to the base texture. When computing a bump map it generates the normal,specular and  AO map for the shader. I add the ambient to the tyre texture.

The high poly/low poly model is the full method. Most people are using crazy bump or normalmap to generate normal maps from grayscale textures.

Sorry for creating more confusion  :-[

I have had another try and flipped the R and G components and this appears to have corrected the lighting angle in game

Any closer to what is desired?


doubledragoncc

Oh yeah baby. I could get my tongue stuck in them theyer thingies.

Looks far better H. Great work.

DD
GPBOC Live Streams: https://www.youtube.com/c/IASystemsComputerControls; i7 12700K 5.1GHz Z690 ASUS Strix Z690-A Mobo 32GB 3600MHz DDR4 RAM ASUS Strix RTX3080 OC 10GB DDR6X ASUS Ryujin 360 AOI Cooler ROG Thor 1200w PSU in ROG Helios Tower Case.

Hawk

That looks so much better mate!  ;D 8)

Hawk.

doubledragoncc

Just noticed, thats the first time I saw someone put a valve on the rim, no wonder the other bikes were a pig to ride, no air in tyres lol.

Love the level of detail H. Brilliant

DD
GPBOC Live Streams: https://www.youtube.com/c/IASystemsComputerControls; i7 12700K 5.1GHz Z690 ASUS Strix Z690-A Mobo 32GB 3600MHz DDR4 RAM ASUS Strix RTX3080 OC 10GB DDR6X ASUS Ryujin 360 AOI Cooler ROG Thor 1200w PSU in ROG Helios Tower Case.

Napalm Nick

"The post you are writing has been written at least ten times already in the last 15ish years. Its already been reported, suggested, discussed, ignored or archived (but mostly ignored). Why are you doing it again?"

h106frp

Thanks, i know to observe the lighting a bit more carefully now. Could not help but try to make the tread look a bit shallower like a real tyre rather than the deep black relief - i quite like it but i will go with the majority opinion  :)


doubledragoncc

Perfect. +1

The other may be better while in motion though.

DD
GPBOC Live Streams: https://www.youtube.com/c/IASystemsComputerControls; i7 12700K 5.1GHz Z690 ASUS Strix Z690-A Mobo 32GB 3600MHz DDR4 RAM ASUS Strix RTX3080 OC 10GB DDR6X ASUS Ryujin 360 AOI Cooler ROG Thor 1200w PSU in ROG Helios Tower Case.

h106frp

Probably the latter is a bit better in motion, the slightly lower contrast reduces the 'striping' effect and is easier on the eye.

HornetMaX

Excellent h106 ! 2nd tyre looks like it's a bit used. Both are fine for me. If one of the two is better when spinning, then go for it.
BTW, is there some sort of motion bur for the tyre (tread) too ?