Glitchy lighting on custom models

Post Reply
User avatar
Dr. Whoop
Posts: 13
Joined: Mon Jun 27, 2011 10:19 am

Glitchy lighting on custom models

Post by Dr. Whoop » Sat Jan 28, 2012 2:23 pm

The difference is about 1 degree rotation of the camera & they just go really dark.

Image
Image

I don't know if this is a common problem, just wanted to see if anyone knows what's up.
Thanks.

User avatar
Korban3
Posts: 4146
Joined: Tue May 31, 2011 9:14 pm
Location: 42nd St E, Hell

Re: Glitchy lighting on custom models

Post by Korban3 » Sat Jan 28, 2012 3:35 pm

There have been some issues with lighting that I've experienced. I still haven't worked out all the little quirks. Maybe last knows what to do.
It might be an issue with the normal map, but I'm not entirely sure.

User avatar
last
Posts: 2154
Joined: Fri Jan 07, 2011 7:02 am
Location: Estonia

Re: Glitchy lighting on custom models

Post by last » Sat Jan 28, 2012 4:27 pm

Yeah it may be something with normals map but it also may be something else.
It may help alot when you upload all the files that you use to get that object into Overgrowth so someone can debug that for you.
You can upload your files into this server http://ogmods.antonriehl.com/

User avatar
Anton
pretty cool guy
Posts: 3328
Joined: Fri Oct 17, 2008 10:16 pm
Location: Los Angeles
Contact:

Re: Glitchy lighting on custom models

Post by Anton » Sat Jan 28, 2012 11:42 pm

I sometimes have that issue if I haven't calculated shadows... I'd try doing that, and see if it fixes the problem. (In the ribbon click "Edit" then "Calculate Shadows" on the top left)

User avatar
Endoperez
Posts: 5668
Joined: Sun Jan 11, 2009 7:41 am
Location: cold and dark and lovely Finland

Re: Glitchy lighting on custom models

Post by Endoperez » Sun Jan 29, 2012 2:13 am

I've had that problem too, and never quite figured what causes it.

It could be a problem with your normal maps. If you're using an Object-space normal map and one of the colors is inverted, the object might have one "light" angle reversed into a "dark" angle.

http://blog.wolfire.com/2009/10/character-normal-maps/
"The red represents the x-component (how much it is facing right), green represents the y-component (how much it is facing up), and blue represents the z-component (how much it is facing forwards)."

The orientation of the object depends on how it's rotated in your 3D software. IIRC, I had to first rotate the object so that it's facing in the right direction, then bake it, then rotate it so that it's facing towards positive Y axis, then export it to Overgrowth. I think I then had to adjust the normal map any way for some reason, inverting a channel or switching blue and green or something.

User avatar
Wobak
Posts: 43
Joined: Thu Jan 05, 2012 3:53 pm

Re: Glitchy lighting on custom models

Post by Wobak » Sun Jan 29, 2012 5:13 am

If it depends on the camera rotation its not normalmap related, if it was the street would be dark all the time. i guess its some kind rendering bug.

User avatar
Endoperez
Posts: 5668
Joined: Sun Jan 11, 2009 7:41 am
Location: cold and dark and lovely Finland

Re: Glitchy lighting on custom models

Post by Endoperez » Sun Jan 29, 2012 7:02 am

Wobak wrote:If it depends on the camera rotation its not normalmap related, if it was the street would be dark all the time. i guess its some kind rendering bug.
Err... I'm pretty sure it could be. There's several ways to screw up a normal map. Including several that are unique to object-space normal maps.

Any way, in my case it was about viewing angle, which changes with camera rotation.

User avatar
Dr. Whoop
Posts: 13
Joined: Mon Jun 27, 2011 10:19 am

Re: Glitchy lighting on custom models

Post by Dr. Whoop » Sun Jan 29, 2012 11:42 am

I've tried using some normal maps of official assets & get the same problem
Anton wrote:I sometimes have that issue if I haven't calculated shadows... I'd try doing that, and see if it fixes the problem. (In the ribbon click "Edit" then "Calculate Shadows" on the top left)
Nope.

User avatar
Endoperez
Posts: 5668
Joined: Sun Jan 11, 2009 7:41 am
Location: cold and dark and lovely Finland

Re: Glitchy lighting on custom models

Post by Endoperez » Sun Jan 29, 2012 1:25 pm

That could still be caused by object-spaced normal maps.

Let's say you have a sword with its edge towards X-axis, and have a perfect normal map for it. You import it to Overgrowth, and the normal map works, but the sword is held with the sharp edge pointing sideways.

To fix this, you rotate it 90 degrees in the 3D program and re-import. Now the sword is held the right way, but the normals have broken. The normal map is still "rotated" 90 degrees, because it wasn't re-baked.

Using the object-space normal maps of existing objects wouldn't help there.

Post Reply