Wings 3D Development Forum
Normal colors of "Face normal shader" - Printable Version

+- Wings 3D Development Forum (https://www.wings3d.com/forum)
+-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1)
+--- Forum: Interface & Usage (https://www.wings3d.com/forum/forumdisplay.php?fid=3)
+--- Thread: Normal colors of "Face normal shader" (/showthread.php?tid=2190)

Pages: 1 2


Normal colors of "Face normal shader" - linkoboy - 10-19-2016

Hi,

For a personnal project I would like to make "normal" sprites for 2 sprites for a 2d rpg game.
I've found an interesting post (from 2012) :

https://love2d.org/forums/viewtopic.php?t=11076&start=40

I'would like to have same colors for the normals in wings 3d like in this picture :



but I've have "RGB" colors like in the attached image (sphere.png)

Is there a way to have the same colors in the viewport that in the post I've found (from 2012) ? (I use 1.5.4 version)

Regards


RE: Normal colors of "Face normal shader" - micheus - 10-19-2016

(10-19-2016, 10:26 AM)linkoboy Wrote: I'would like to have same colors for the normals in wings 3d like in this picture :
:
Is there a way to have the same colors in the viewport that in the post I've found (from 2012) ? (I use 1.5.4 version)
It seems like that was changed at some point.
By considering the post date, the guy should be used a version prior 1.5.
You can check all the versions here for download.


RE: Normal colors of "Face normal shader" - linkoboy - 10-19-2016

Thank for the advice.

I've tried with versions 1.5.4, 1.2, 1.0, 0.99.60, but I get the same results :-(


RE: Normal colors of "Face normal shader" - oort - 10-19-2016

linkoboy,
I looked at the thread you linked to. I am not sure but I think the key to getting those colors is a custom shader that was used.

Quote:I used photoshop for painting and wings3d for modeling.

The process to produce the art was this:
First, to create the normal maps you...
1. Model a basic shape of the object in wings3d.
2. Set the camera in Wings3d to look down at an angle twice as high as the distance along the ground. Focus in on the object you modeled.
3. Set the camera to orthographic (so there is no perspective distortion)
4. Squish the model along the X axis by

Code: Select all
math.sin(math.atan2(2, 1)) --> 0.89442719
(this has the effect of making a circle placed flat on the ground appear as a circle and not just an oval).
5. Set the shader to display normals (wings3d has a shader for this but it needs to be modified slightly).
6. Take a screenshot. Smile

Here is where I copied the above from... GLSL cel shaders thread

To use the Shaders that Wings3D comes with you go View > Shaders > Choose a shader. Wings3D comes with one called "Face Normals Color". Maybe that is the one that he modified to get those colors???

You will have to use a Wings3D version before version 2.0 since the Shaders are not yet available in version 2.0

You would also have to know how the Wings3D shader was modified. Sad

This is just a guess based on what I read in the thread.... Smile

oort


RE: Normal colors of "Face normal shader" - linkoboy - 10-19-2016

Thanks a lot !

It seems you're right, with 1.5.4 version, if I go on the shader directory (C:\Program Files\wings3d_1.5.4\lib\wings-1.5.4\shaders\), we can find the shaders files inside. I have just to take one and modify it to get the wanted result.

I'll get a try Smile


RE: Normal colors of "Face normal shader" - oort - 10-19-2016

If you are able to create a new shader, please share it with us.

I did some searching since I knew someone had done some work on creating shaders. I finally found it in the old forum. Can't believe it was that long ago.

It was scorpius that worked on them. Here is the thread... New Shaders

I finally found a page on github with his information, since his website was gone. Here is the page... Scorpius page

No info on writing shaders but an e-mail link at the bottom. Not sure if it works or not. Maybe he can help if you have trouble???

oort


RE: Normal colors of "Face normal shader" - micheus - 10-20-2016

(10-19-2016, 11:38 PM)oort Wrote: If you are able to create a new shader, please share it with us.
yeap, you can share in this thread AutoUV Shader


RE: Normal colors of "Face normal shader" - linkoboy - 10-20-2016

Thanks for you links,

No problem, I'll share you the modified shader when it will be ready.


RE: Normal colors of "Face normal shader" - oort - 10-20-2016

Micheus,

I finally got around to playing with the AutoUV Shaders. Very impressive. I guess these make the older environment shaders obsolete or will they still be added in the future?

Thanks,
oort


RE: Normal colors of "Face normal shader" - dgud - 10-20-2016

The older shaders will not come back in the form it was before.

I have some ideas and will ask for more input when I get there but so little time and much fun to do.