Bump mapping

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
User avatar
PeterBitt
Posts: 144
Joined: 25 Mar 2013, 18:49
Location: Berlin
Contact:

Re: Bump mapping

Post by PeterBitt »

scrawl wrote:
With materials files, thats not just a drag and drop kind of thing though, you cant just spit out a mat file from something like paint.net like you can with a dds.
.mat files are just plain text files you can spit out with any editor of your choosing.

Code: Select all

material foo
{
   parent openmw_objects_base
   diffuseMap diffuse.jpg
   normalMap normal.jpg
}
material bar
{
   parent foo
   diffuseMap diffuse2.jpg
}
This gives you much more flexibility - what if you wanted to reuse the same normal map for several materials with a different diffuse texture? That would not be possible if simply appending "_n" to the diffuse texture and using that as normal map.
It even allows you to make a material completely from scratch with its own shader instead of inheriting from openmw_objects_base (although that isn't simple - if it's supposed to work on all of openmw's platforms, it needs to provide a shader based and an FFP path, and in the future possibly a deferred path as well)
Hey, I hope I didnt miss something obvious, but is the above actually possible with the current version?
If it is, could someone post a little tutorial on how to add those material txt files?
Last edited by PeterBitt on 19 Nov 2013, 11:23, edited 1 time in total.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Bump mapping

Post by scrawl »

Can terrain be bump mapped yet?
Not yet. I might do this soon, in addition to specular & parallax mapping. Feature ticket.
Should be relatively painless without extending the ESM format - for a terrain texture x.dds, we can try reading x_diffspec.dds for a diffuse+spec version, and x_nh.dds for a normal+height version.
Hey, I hope I didnt miss something obvious, but is the above actually possible with the current version?
Not yet. Watch out for an announcement for our alternate scene format (not using NIFs). Probably not happening pre-1.0 though.
User avatar
PeterBitt
Posts: 144
Joined: 25 Mar 2013, 18:49
Location: Berlin
Contact:

Re: Bump mapping

Post by PeterBitt »

scrawl wrote:
With materials files, thats not just a drag and drop kind of thing though, you cant just spit out a mat file from something like paint.net like you can with a dds.
.mat files are just plain text files you can spit out with any editor of your choosing.

Code: Select all

material foo
{
   parent openmw_objects_base
   diffuseMap diffuse.jpg
   normalMap normal.jpg
}
material bar
{
   parent foo
   diffuseMap diffuse2.jpg
}
This gives you much more flexibility - what if you wanted to reuse the same normal map for several materials with a different diffuse texture? That would not be possible if simply appending "_n" to the diffuse texture and using that as normal map.
It even allows you to make a material completely from scratch with its own shader instead of inheriting from openmw_objects_base (although that isn't simple - if it's supposed to work on all of openmw's platforms, it needs to provide a shader based and an FFP path, and in the future possibly a deferred path as well)
Thinking about this ... I cant actually think of a case where one would use the same normal map for different textures. So what about using these material text files only for exeptions, and use the suggested "_nrm" extension for everything else?
I am asking because I can generate normal maps easily and in no time for all textures plus add "_nrm" to the filename, but if I would need to write each of the 4.000+ textures into a text file the process would be much more annoying and lengthy.

Also I wanted to ask if its somehow possible to add shinyness to a material, like this http://www.abload.de/img/brdf_schlick02cdl3x.png?
When I set up my material like this in 3d max it kinda shows up in nifSkope too, but the effect is missing in OpenMW. Is this something I missed on the NifSkope side or are such things not possible in OMW yet?
Chris
Posts: 1626
Joined: 04 Sep 2011, 08:33

Re: Bump mapping

Post by Chris »

PeterBitt wrote:Also I wanted to ask if its somehow possible to add shinyness to a material, like this http://www.abload.de/img/brdf_schlick02cdl3x.png?
When I set up my material like this in 3d max it kinda shows up in nifSkope too, but the effect is missing in OpenMW. Is this something I missed on the NifSkope side or are such things not possible in OMW yet?
Make sure to include a NiSpecularProperty for the material. It's supposed to be on by default, but Bloodmoon's meshes become too shiny because of bad specular/shininess values, that for some reason don't bother NifSkope.
User avatar
PeterBitt
Posts: 144
Joined: 25 Mar 2013, 18:49
Location: Berlin
Contact:

Re: Bump mapping

Post by PeterBitt »

Chris wrote:
PeterBitt wrote:Also I wanted to ask if its somehow possible to add shinyness to a material, like this http://www.abload.de/img/brdf_schlick02cdl3x.png?
When I set up my material like this in 3d max it kinda shows up in nifSkope too, but the effect is missing in OpenMW. Is this something I missed on the NifSkope side or are such things not possible in OMW yet?
Make sure to include a NiSpecularProperty for the material. It's supposed to be on by default, but Bloodmoon's meshes become too shiny because of bad specular/shininess values, that for some reason don't bother NifSkope.
Sorry for bothering you with that but how would I add that NiSpecularProperty properly? I did it like this http://i.imgur.com/OWLRtfi.jpg wich is showing slight shininess in nifskope but the material has no shininess at all in OpenMW. Do I have to add some reflection map or something? All I want is the material to reflect lights in a shiny/glossy way.

This is how vanilla textures look with normal maps: http://imgur.com/a/6u4ZV#0
I would love to have some shiny light reflections on some of those textures :)
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Bump mapping

Post by sirherrbatka »

Wow, normal maps makes it look GREAT!
Chris
Posts: 1626
Joined: 04 Sep 2011, 08:33

Re: Bump mapping

Post by Chris »

PeterBitt wrote:Sorry for bothering you with that but how would I add that NiSpecularProperty properly? I did it like this http://i.imgur.com/OWLRtfi.jpg
In the NiSpecularProperty, make sure the "flags" field is set to "1".
User avatar
PeterBitt
Posts: 144
Joined: 25 Mar 2013, 18:49
Location: Berlin
Contact:

Re: Bump mapping

Post by PeterBitt »

Chris wrote:In the NiSpecularProperty, make sure the "flags" field is set to "1".
Hhmm I guess this is the wrong place for my Nifskope problems as you guys have better stuff to do, but I just cant get speculars/dynamic highlights working in OpenMW ... they dont even really show up in nifskope :cry:
Its hard to find tutorials about this and when I find something they are all different for Skyrim, Oblivion, Fallout, etc.

Is it like in Oblivion so that one needs to add a alpha channel to the normal map, wich then defines wich parts are shiny and wich not? "APPLY_HILIGHT" doesnt do anything for me. I have the NiSpecularProperty flag on 1.
No matter what I tried, not even the slightest shinyness shows up in OpenMW.

Maybe someone is interested in having a quick look at a mesh? (i only altered "18 NiTriShape")
http://www.sendspace.com/file/iimh1i

sirherrbatka wrote:Wow, normal maps makes it look GREAT!
Now if only someone could make it so that OpenMW automaticly detects and uses normal maps ... I would have the whole game normal-mapped in a week!

It would be so awesome to have this before 1.0 release, it would make for some nice screenshots to advertise OpenMW to those who dont understand its benefits.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Bump mapping

Post by sirherrbatka »

I suggest to tune down the shading first. It is way to strong. ;-)
User avatar
PeterBitt
Posts: 144
Joined: 25 Mar 2013, 18:49
Location: Berlin
Contact:

Re: Bump mapping

Post by PeterBitt »

sirherrbatka wrote:I suggest to tune down the shading first. It is way to strong. ;-)
Sorry what do you mean? The normal maps have to much contrast (I increased it for testing)?
Post Reply