Open TheLonetrucker opened 8 years ago
This is not a issues, you should post your tutorial here http://www.rigsofrods.com/forum.
It is a issue I would like A better implantation Into rigs of rods for bumpmapping
Also normal mapping on vehicle meshes is not possible(yet?)
@TheLonetrucker What objects would you like to use normal mapping for?
For vehicles, we have managed-materials: http://www.rigsofrods.com/wiki/pages/Truck_Description_File#Managedmaterials. Simply specify the filename for normal-map and normal mapping will be enabled. EDIT: Derp, managed mats don't support normal-mapping.
For other objects, we currently don't have any out-of-the-box solution. Our 3D engine (OGRE 1.9) requires supplying your own shader code, which is a very advanced task.
@only-a-ptr What? How does one specify normal maps in managed materials? It only has placed for the diffuse, specular, and damage, when applicable. The KME fire truck has a written shader code in it for bump mapping, but as far as I know only worked .37. http://www.rigsofrods.com/repository/view/2502
@DarthCainRor :blush: I mixed it up with terrain material generator in my head.
This is more of a "bug report" than a "request" but I figured here would be the best place to post what I recently discovered.
While converting terrains to 0.4 and reworking textures, I found out that normal maps seem to actually work on OpenGL, while on DirectX they don't:
Map used for testing: https://archives.rigsofrods.org/repo/0.4-Terrains/MRY11-RaceTrack-BetaTest-1-04.zip
DirectX: OpenGL:
I also tested @DarthCainRor's normal map test material with different results:
DirectX: OpenGL:
To date, RoR doesn't have any built-in support for normal mapping (or more generic bump mapping). Modders need to bring their own shaders and link them to OGRE materials.
Novadays, shaders need to be written in GLSL (for OpenGL) or HLSL (for DirecX). In the Dx9/OpenGL2 times (which overlaps with RoR's famous 0.38+ era), there was another choice, Cg from nVidia, but that's a long obsolete technology today: https://developer.nvidia.com/cg-toolkit
Nonetheless, OGRE 1.9 still supports Cg (IDK what version) and majority of shaders in RoR seem to be Cg. If any of them aren't working, I suggest looking into RoR.log for OGRE errors reporting Cg problems. This is an OGRE issue, not RoR issue.
@Michael10055 The second pair of screenshots feels like DirectX is actually working right and OpenGL has some ugly specularity issue. But that's just me and the static screenshots.
Here's another example: DirectX: OpenGL:
EDIT: Just reread what you wrote...I blame the lack of sleep. 😆
Darth's test materials probably isn't setup correctly since there's been no proper way to test them.
@Michael10055 Actually it's a OpenGL "bug". On OpenGL Normal Maps are always on, even when NormalMappingEnabled are disabled, while on DirectX NormalMappingEnabled must be enabled in the OTC file. DirectX:
@Speciesx Oh, right, I forgot OgreTerrain has built-in normal mapping support. So we have that.
@Speciesx Ah, completely forgot about that, thanks! I'll update the download.
hey I know Box posted a tutorial but it seems like its not as much as really a bump mapping... I would be willing to help Test any Features around bump mapping As I know how to make a bump map.. I would think the newer ogre as this ability... here are some examples without normal map with normal map
and the normal map texture some examples Credits to photos Head photo Wikipeda
normal mapped random stuff dogebuilt on truckmodshop
refrence materials http://www.rigsofrods.com/wiki/pages/Bump_map_shader accessed On 07/01/2016 11:40 AM
https://en.wikipedia.org/wiki/Normal_mapping accessed On 07/01/2016 11:32Am
https://en.wikipedia.org/wiki/Normal_mapping
http://truckmodshop.proboards.com/thread/162/3d-models?page=125 accessed On 07/01/2016 AT 11:10AM