| We hope you enjoy your visit. You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you are already a member please log in to your account to access all of our features: |
| specular shader; issues | |
|---|---|
| Tweet Topic Started: Mar 31 2009, 04:46 AM (517 Views) | |
| ashrat3000 | Mar 31 2009, 04:46 AM Post #1 |
|
u3d raytracer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
So its time to use this shader. Per pixel of course. But I keep getting some crazy (and wrong) lighting when I use it. The map has highlights all over the place and they are bloody huge. No idea what I'm doing wrong, but it could be hard for you guys to help, as I dont want to give away my model or normal map. Taken from the tech demo:
Does anyone know what might cause a problem? |
|
그대를 사랑해 | |
![]() |
|
| skarik | Mar 31 2009, 05:07 AM Post #2 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
lol Spoiler: click to toggle You never know. It may be your last line that's causing it. Edited by skarik, Mar 31 2009, 05:08 AM.
|
| Blog|EHS | |
![]() |
|
| ashrat3000 | Mar 31 2009, 08:00 AM Post #3 |
|
u3d raytracer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
![]() LOL I tried. ![]() The left is without the shader, right side is with. The little thingy on the wall is a light. Yes the light is there, I checked. (this is inside a box btw) As you can clearly see, because this picture is that clear, the secular highlights are in strange places. And I added the code in your spoiler, it didn't help. |
|
그대를 사랑해 | |
![]() |
|
| ashrat3000 | Mar 31 2009, 08:49 AM Post #4 |
|
u3d raytracer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Woah. What the. fail. I was loading the wrong normal map. LOL I got it now. |
|
그대를 사랑해 | |
![]() |
|
| Gandalf20000 | Mar 31 2009, 11:02 PM Post #5 |
![]()
Geek
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Gimme a 'D'! Gimme a 'U'! Gimme a 'H'! What's that spell? DUH! We've all had our share of "duh" moments, I guess this is yours.
|
![]() |
|
| ashrat3000 | Apr 1 2009, 03:43 AM Post #6 |
|
u3d raytracer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Hmm. If my texture is wrapped on my model, so it repeats like 20 times, can I use a normal map of the texture and repeat that as well? Or do I have to unwrap it. Because I'm not getting the correct results. I tried unwrapping it as well, and I think the nomals are facing the wrong way. Like 90o off or something. Tried to change it in photoshop, and it kinda worked. Has anyone actually gotten a proper normal map from 3ds max into u3d? Oh, and how do I change the color/lower the intensity of the highlight? |
|
그대를 사랑해 | |
![]() |
|
| skarik | Apr 1 2009, 04:04 AM Post #7 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
No. Unwrap it. Also, realize that normal mapping does have a limit on some PC's for some reason. Try to keep UV's in the range of -8 to 8, and make sure THEY DO NOT OVERLAP ANYWHERE. Those texture coordinates MUST BE UNIQUE FOR EVERY TRIANGLE TO BE DRAWN.
Edit the shader. It's pretty obvious what part to change. Well, I think it is. |
| Blog|EHS | |
![]() |
|
| ashrat3000 | Apr 1 2009, 04:18 AM Post #8 |
|
u3d raytracer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Uh, how do I check the uv coordinates? Yes, for you maybe .But not me. |
|
그대를 사랑해 | |
![]() |
|
| skarik | Apr 1 2009, 04:33 AM Post #9 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Check the UV coordinates in 3dsmax UV editor, of course. It displays the coordinates under the cursor. If you want, you can even go into W coordinates, for only 399.99! Okay, just stay in UV. I don't think U3D ever will look at W unless a shader says so. Oh, and I think it's pretty obvious.
|
| Blog|EHS | |
![]() |
|
| ashrat3000 | Apr 1 2009, 06:19 AM Post #10 |
|
u3d raytracer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
See, thats what I was looking at, but comment out one of those mul lines makes the highlight bigger. For some reason. oh. If I unwrap it, I need an image 4096x4096 to show just a little bit of detail. Not good. Oh, and why is the highlight such bad quality? Looks like a very poorly compressed jpg image. |
|
그대를 사랑해 | |
![]() |
|
| skarik | Apr 1 2009, 06:36 AM Post #11 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
To fix the highlight, either blur your normal map a tiny bit or change the filtering of the stages U3D uses. Don't comment out anything. Just change this line to change the strength:
|
| Blog|EHS | |
![]() |
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |





![]](http://z1.ifrm.com/static/1/pip_r.png)






4:40 PM Jul 11