Explicit normals discussion
Moderators: winston, another_commander
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
i've just updated the oxp with a new version of the barrel that leaves the top and botom surfaces edges soft, this gets rid of the abrupt lighting change, i also sorted out the normal map so it mostly works ok, mostly because there does indeed seem to be something wrong with the map on the polygons that make up the bottom of the barrel - it's had to tell though, traders keep scooping up the pods whilst i'm sitting there watching them spin
- Captain Berf
- Competent
- Posts: 55
- Joined: Mon Nov 09, 2009 1:19 am
- Location: USA, 1.5 Miles Up
Perhaps I'm going blind, but sometimes my maps seemed inverted when rendered. Especially the 'metal sheeting' grids where the borders seem raised whether the source was inverted or not.Griff wrote:i think the normal map problem is my fault, i need to invert the tones in some sections of the original texture before sending it through the photoshop plugin -basically on some faces the 'bumps' are 'dips' and the 'dips' are 'bumps' - at least i think that's what the problem is.
Just an observation from when I was running a bunch of test maps (through the GIMP plugin) to figure out normalmaps.
__________
______
Captain Berf
______
Captain Berf
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
type in the console:Griff wrote:traders keep scooping up the pods whilst i'm sitting there watching them spin
Code: Select all
mission.runScreen({model: "your_role"})
I now converted also the asteroids. Half of them contains still missing triangles. Maybe it is because Charlie's meshes were a mess to begin with.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
No you're not going blind, this is indeed happening, to fix it you'll have to make a note of which surfaces on your model in oolite have their dips and bumps the wrong way around, then in GIMP go back to your source image you generate the bump map from, select the area in the image that has the wrong way around bumps & dips and invert its colours, then run it through the normal map plugin again, this should sort it out.Captain Berf wrote:Perhaps I'm going blind, but sometimes my maps seemed inverted when rendered. Especially the 'metal sheeting' grids where the borders seem raised whether the source was inverted or not.
Just an observation from when I was running a bunch of test maps (through the GIMP plugin) to figure out normalmaps.
I only realised this recently so a lot of my early normalm mapped ships have this error.
When i make normalmaps i usually select the 'invert y' option in the plugin options and then to invert the source image in the areas that will map onto the underside, the back and the 'Starboard' side i think - (the polygons with their normals facing in the X + direction) of the model
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
I've got a fantastic video I use in one of my lectures about "when normals go bad" - it's of a rotating Challenger 2 model which 50% of the time looks like it's been turned inside out - when I get back to work I'll host it somewhere and post a link here - it may help the uninitiated visually see the issue as it occurs.
Ahruman's explanation about back face culling was very good though!
Ahruman's explanation about back face culling was very good though!
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- Captain Berf
- Competent
- Posts: 55
- Joined: Mon Nov 09, 2009 1:19 am
- Location: USA, 1.5 Miles Up
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
For anybody who is trying to follow this discussion out of professional curiosity but isn't quite sure what's going on, then perhaps this video will help. This CR2 model was converted from one modelling system to another and, as you can see, the winding on the polygons went horribly wrong...
http://www.box.net/shared/cs0qydpd3k
It's rotating clockwise BTW, not that your brain will accept this after the first 10s or so!
http://www.box.net/shared/cs0qydpd3k
It's rotating clockwise BTW, not that your brain will accept this after the first 10s or so!
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
I had still problems with missing faces with half of my asteroids. When looking at the python script I noticed Ahruman added a selection in the script:
After changing the winding_mode to '0', all my asteroids ended up correct without missing faces. All my obj files were generated by wingz.
Code: Select all
# Specify winding mode. Winding determines which side of a triangle is out.
# If a model appears "inside-out" or has missing faces, you need to adjust this.
# 0: maintain original winding.
# 1: reverse winding.
# 2: select winding automatically for each face.
# 3: select winding automatically for each face, but buggily (the same
# behaviour as Oolite for old-style model files). You probably don't want
# this.
winding_mode = 2
UPS-Courier & DeepSpacePirates & others at the box and some older versions
Sounds like the same problem I'm having.Eric Walch wrote:I had still problems with missing faces with half of my asteroids. When looking at the python script I noticed Ahruman added a selection in the script:After changing the winding_mode to '0', all my asteroids ended up correct without missing faces. All my obj files were generated by wingz.Code: Select all
# Specify winding mode. Winding determines which side of a triangle is out. # If a model appears "inside-out" or has missing faces, you need to adjust this. # 0: maintain original winding. # 1: reverse winding. # 2: select winding automatically for each face. # 3: select winding automatically for each face, but buggily (the same # behaviour as Oolite for old-style model files). You probably don't want # this. winding_mode = 2
<Edit> Nevermind, changing it to 0 still hasn't fixed it for me
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Came across this again today. After almost two whole seconds of thinking, I realised what the problem was: the basic concept of generating one tangent per vertex for a model with explicit normals does not make sense. The way the mesh code is organised, there is no easy fix for this.Ahruman wrote:There seems to be a problem with tangent generation, which primarily affects normal-mapping shaders.
This will probably not be fixed before MNSR.
So basically, you can’t usefully use normal mapping with a model that has explicit normals but no explicit tangents. There is currently no tool to generate correct explicit tangents.
E-mail: [email protected]