Welcome Guest [Log In] [Register]
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:

Username:   Password:
Add Reply
No light point or shaders
Topic Started: Jul 31 2014, 05:03 PM (633 Views)
svenotje1
Advanced Member
[ *  *  * ]
Help, My game won't load a bloom shader and when I place a Light Point in my game you can't see it.

I can't find the problem will someone look at my game and search for the problem?

Download

Thanks,

Sven
Offline Profile Quote Post Goto Top
 
luenardi
Member Avatar
Cofee Machines Rock
[ *  *  *  *  *  * ]
svenotje1
Jul 31 2014, 05:03 PM
Help, My game won't load a bloom shader and when I place a Light Point in my game you can't see it.

I can't find the problem will someone look at my game and search for the problem?

Download

Thanks,

Sven
i can fix this i just don't have GM..
You need to create a bloom point
flat texture at lights location.. the light itself does not interact with the bloom shader.
however there is a method to it.
Edited by luenardi, Aug 1 2014, 12:05 PM.
Posted Image

For your perception no.
But my universe has no such limits.


www.recall.co.nr
Offline Profile Quote Post Goto Top
 
svenotje1
Advanced Member
[ *  *  * ]
No sorry, Those are seperate questions. My game, Doesn't create light by placing a light point. And by Game startup he says it wont load the shaders and after that I get this error (screenshot is attached)
Attached to this post:
Attachments: Schermafdruk_2014_07_31_16.56.03.png (12.49 KB)
Edited by svenotje1, Aug 1 2014, 02:56 PM.
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
Your path to the shader is wrong. According to your game folder, the shader is located in the FX folder. You should read the error messages carefully.
Offline Profile Quote Post Goto Top
 
svenotje1
Advanced Member
[ *  *  * ]
sorry, but changing the path won't work
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
svenotje1
Aug 3 2014, 12:34 AM
sorry, but changing the path won't work
You get the same error? It worked for me. Make sure you change the path to FX/ on all your shaders.
Edited by Despellanion, Aug 3 2014, 11:11 AM.
Offline Profile Quote Post Goto Top
 
svenotje1
Advanced Member
[ *  *  * ]
Yes, this is my code:

Quote:
 
// Create the motion blur effect
vertex_shader="FX/Bloom.vsh";
pixel_shader="FX/Bloom.psh";
CreatePostScreenShader();
// The scene texture has to be set up for the first five stages
SetPSSTexture(1,-1);
SetPSSTexture(2,-1);
SetPSSTexture(3,-1);
SetPSSTexture(4,-1);

// This parameter can be changed to change the intensity of the effect. At 0 it won't
// effect the screen at all.
bloom_strength=0.12;
// Every pixel that's brighter than that will effect it's neighboring pixels.
minimum_r=0.6;
minimum_g=0.6;
minimum_b=0.6;
// This parameter defines the distance at which pixels can be effected by neighboring
// bright pixels. It is given in texture coordinates, so 1 would mean that a pixel
// anywhere on the screen can effect any other pixel. This value should be set up as
// high as possible, to get an intense effect, but too high values will make the trick
// that's being used to implement it obvious.
tex_offset=0.004;

// Set up the vertex shader constants based upon the texture offset
SetPSSVSConstant(1,tex_offset,0,0,1);
SetPSSVSConstant(2,-tex_offset,0,0,1);
SetPSSVSConstant(3,0,tex_offset,0,1);
SetPSSVSConstant(4,0,-tex_offset,0,1);
// Pixel shader constant 0 gets the strength factor
SetPSSPSConstant(0,bloom_strength,bloom_strength,bloom_strength,1);
// Pixel shader constant 1 gets the squared minimum color values
SetPSSPSConstant(1,-sqr(minimum_r),-sqr(minimum_g),-sqr(minimum_b),1);


But still won't work
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
You need to have a light source for there to be any bloom to affect. I didn't see any active light sources in your project.
Offline Profile Quote Post Goto Top
 
svenotje1
Advanced Member
[ *  *  * ]
No, because when i create a light point it won't work. And it still gives an error when trying to include the bloom shader. Can you post me the game, because you said you solved it?

Sorry for reaction so late, Had 3 busy days.
Edited by svenotje1, Aug 6 2014, 02:07 PM.
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
svenotje1
Aug 6 2014, 02:07 PM
No, because when i create a light point it won't work. And it still gives an error when trying to include the bloom shader. Can you post me the game, because you said you solved it?

Sorry for reaction so late, Had 3 busy days.
I didn't try to fix the lightsources, but I didn't get any errors about the shaders after I fixed the paths.
Are you sure the light sources are at the correct positions? Maybe they are outside of the level so that you cannot see them. Try adding a directional light that will light up the whole scene.
Offline Profile Quote Post Goto Top
 
luenardi
Member Avatar
Cofee Machines Rock
[ *  *  *  *  *  * ]
Despellanion
Aug 6 2014, 04:25 PM
svenotje1
Aug 6 2014, 02:07 PM
No, because when i create a light point it won't work. And it still gives an error when trying to include the bloom shader. Can you post me the game, because you said you solved it?

Sorry for reaction so late, Had 3 busy days.
I didn't try to fix the lightsources, but I didn't get any errors about the shaders after I fixed the paths.
Are you sure the light sources are at the correct positions? Maybe they are outside of the level so that you cannot see them. Try adding a directional light that will light up the whole scene.
perhaps make sure the light is created first.
Posted Image

For your perception no.
But my universe has no such limits.


www.recall.co.nr
Offline Profile Quote Post Goto Top
 
svenotje1
Advanced Member
[ *  *  * ]
Sorry was on vacation but even a light directional won't work
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
Then perhaps the normals of your level model are wrong. Try using RecalculateNormals() after LoadMesh()
Offline Profile Quote Post Goto Top
 
svenotje1
Advanced Member
[ *  *  * ]
Tried, but with no succes :(
But I go on another vancation.
Thanks for helping, I will be back soon.
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
Your problem must be 1 of the following:


  • Incorrect light source creation code
  • Incorrect model normals
  • Objects are set to be unaffected by any light (different U3D room)
Offline Profile Quote Post Goto Top
 
Go to Next Page
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply