Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


lighting + shaders question


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 DmitryNik   Members   -  Reputation: 199

Like
0Likes
Like

Posted 09 November 2012 - 05:40 AM

Hello.

I've created a very small scene with almost my(I've used some tutorials online for syntax and some basic "game" rules) very first shader. The scene contains 3 meshes: 2 lanterns and one base(everything is loaded from fbx. Fbx created with Blender). Also XNA was used for the scene creating. OK. Here is the small problem: since the scene contains 3 different meshes they a drawn separately and because of that the light spot can go under the mesh, like this:
Posted Image

So, my question is: How can be done so that the light spot also goes onto the lantern and I still could keep three separate meshes? Something like on the picture below(I've drawn it in the paint):
Capture.JPG


Thank you for your answers beforehand.

Edited by DmitryNik, 09 November 2012 - 05:43 AM.


Sponsor:

#2 Rld_   Members   -  Reputation: 1498

Like
1Likes
Like

Posted 09 November 2012 - 05:57 AM

I'm not really sure what you're specifically going for, but if I understand right; you want the lighting to affect all 3 meshes even if it is inside one of the meshes?

If that's the case, you will need to replace the light if it's within a mesh so the shader can calculate it correctly. If the light is in front of the scene, kind of where the camera is now, the scene should already be lit properly unless your normals are incorrect or your shader code.

Perhaps you can render the light and/or where it should be so we know where you exactly where it should be with the effect you want to have.

#3 DmitryNik   Members   -  Reputation: 199

Like
0Likes
Like

Posted 09 November 2012 - 08:42 AM

Thank you for your answer. Good suggestion. I have to try it.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS