Overgrwoth Custom Weapon Shading

Anything related to Wolfire Games and/or its products
Blendahead
Posts: 10
Joined: Fri Aug 12, 2016 7:45 pm

Overgrwoth Custom Weapon Shading

Post by Blendahead » Wed Nov 16, 2016 2:49 pm

Hi I am trying to make a spiked baseball bat, but the shading is always messed up, like this...
20161121143714_1.jpg
20161121143714_1.jpg (89.92 KiB) Viewed 12173 times
20161121143712_1.jpg
20161121143710_1.jpg
20161121143706_1.jpg
20161121143706_1.jpg (78.8 KiB) Viewed 12173 times
Last edited by Blendahead on Mon Nov 21, 2016 5:41 pm, edited 1 time in total.

User avatar
Silverfish
Posts: 1451
Joined: Sun Oct 26, 2008 8:24 pm
Location: Sweden
Contact:

Re: Overgrwoth Custom Weapon Shading

Post by Silverfish » Wed Nov 16, 2016 4:04 pm

What shader are you using and what does your normal map look like? I'm thinking it might be an issue with using a tangent space normal map with the object space normal map shader.

Blendahead
Posts: 10
Joined: Fri Aug 12, 2016 7:45 pm

Re: Overgrwoth Custom Weapon Shading

Post by Blendahead » Wed Nov 16, 2016 4:08 pm

I am using the typical one, cubemapobjitem
when I use tangent it has no shading at all
and this is my normal map...
Lucile_norm.png
Last edited by Blendahead on Mon Nov 21, 2016 3:41 pm, edited 1 time in total.

User avatar
Silverfish
Posts: 1451
Joined: Sun Oct 26, 2008 8:24 pm
Location: Sweden
Contact:

Re: Overgrwoth Custom Weapon Shading

Post by Silverfish » Wed Nov 16, 2016 4:40 pm

Ok, that looks good. I would guess that you'll need to swap and/or flip one or two of the channels in your normal map for it to work like it should. Unfortunately I don't know which ones or how and I don't have time to test it out right now myself.

Please let us know if you figure it out!

Blendahead
Posts: 10
Joined: Fri Aug 12, 2016 7:45 pm

Re: Overgrwoth Custom Weapon Shading

Post by Blendahead » Wed Nov 16, 2016 4:44 pm

Okay will do, thanks for your help

Blendahead
Posts: 10
Joined: Fri Aug 12, 2016 7:45 pm

Re: Overgrwoth Custom Weapon Shading

Post by Blendahead » Wed Nov 16, 2016 5:37 pm

Does anyone know if there is a way to make it use tangent normals without making it a flat object?

User avatar
Silverfish
Posts: 1451
Joined: Sun Oct 26, 2008 8:24 pm
Location: Sweden
Contact:

Re: Overgrwoth Custom Weapon Shading

Post by Silverfish » Thu Nov 17, 2016 6:47 pm

It doesn't need to be a flat object to use tangent space normals. Tangent space normals just use the normal map in a way that modifies the underlying normal instead of overriding it entirely.

There are some comparison images and more information on the subject here: http://wiki.polycount.com/wiki/Normal_M ... al_Details

To tell the game that you're trying to use a tangent space normal map, use the version of the shader without "obj" in it. So in your case you should use "cubemapitem" instead of "cubemapobjitem".

Blendahead
Posts: 10
Joined: Fri Aug 12, 2016 7:45 pm

Re: Overgrwoth Custom Weapon Shading

Post by Blendahead » Fri Nov 18, 2016 12:57 pm

When I use a tangent normal map it makes the object look flat even with cubemapitem,
and nothing ever changes when I change the shader name line

User avatar
Silverfish
Posts: 1451
Joined: Sun Oct 26, 2008 8:24 pm
Location: Sweden
Contact:

Re: Overgrwoth Custom Weapon Shading

Post by Silverfish » Fri Nov 18, 2016 3:54 pm

Hh, weird. Would you like to zip up the object.xml file as well as the textures and the model so I can take a look and hopefully figure it out?

Blendahead
Posts: 10
Joined: Fri Aug 12, 2016 7:45 pm

Re: Overgrwoth Custom Weapon Shading

Post by Blendahead » Mon Nov 21, 2016 3:31 pm

Sorry I just got back to my computer, (I was gone for the weekend), but sure I will be happy to zip it up and send it to you

Blendahead
Posts: 10
Joined: Fri Aug 12, 2016 7:45 pm

Re: Overgrwoth Custom Weapon Shading

Post by Blendahead » Mon Nov 21, 2016 3:36 pm

Here it is
Lucille.zip
(805.38 KiB) Downloaded 402 times

User avatar
Silverfish
Posts: 1451
Joined: Sun Oct 26, 2008 8:24 pm
Location: Sweden
Contact:

Re: Overgrwoth Custom Weapon Shading

Post by Silverfish » Tue Nov 22, 2016 5:23 pm

I tested some things with it and had to ask the rest of the team because I couldn't get it to work either. Apparently it's no longer the "cubemapitem" shader you should use if you want to use a tangent space normal map on an item, but simply the "cubemap" shader.

EDIT1:
I updated the wiki with this information.

Blendahead
Posts: 10
Joined: Fri Aug 12, 2016 7:45 pm

Re: Overgrwoth Custom Weapon Shading

Post by Blendahead » Tue Nov 22, 2016 6:07 pm

Okay thanks! I'll try that

Blendahead
Posts: 10
Joined: Fri Aug 12, 2016 7:45 pm

Re: Overgrwoth Custom Weapon Shading

Post by Blendahead » Tue Nov 22, 2016 6:17 pm

So I did that and now there is definitely shading but it has this strange thing where the whole model lights up and darkens depending on the angle of view...
20161122151309_1.jpg
20161122151309_1.jpg (41.22 KiB) Viewed 12144 times
20161122151308_1.jpg
20161122151308_1.jpg (63.46 KiB) Viewed 12144 times
20161122151305_1.jpg
20161122151305_1.jpg (61.56 KiB) Viewed 12144 times
20161122151303_1.jpg
20161122151303_1.jpg (61.72 KiB) Viewed 12144 times

User avatar
Silverfish
Posts: 1451
Joined: Sun Oct 26, 2008 8:24 pm
Location: Sweden
Contact:

Re: Overgrwoth Custom Weapon Shading

Post by Silverfish » Wed Nov 23, 2016 5:16 pm

So you changed it to use the cubemap shader, right? Did you also replace your object space normal map with a tangent space normal map?

If you just want to test the shader with a flat normal map, there is a flat normal map called "blank_TS_white_n.tga" right in the ../Overgrowth/Data/Textures/ folder.

Post Reply