LensFlareSceneNode with occlusion query

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: LensFlareSceneNode with occlusion query

Post by Granyte »

Alright i fixed the issue i had with 3d positioning of the lensflare

I only needed to change this

Code: Select all

 
const core::vector2d<s32> lightPos = SceneManager->getSceneCollisionManager()->getScreenCoordinatesFrom3DPosition(Following->getAbsolutePosition(), camera);
to this

Code: Select all

const core::vector2d<s32> lightPos = SceneManager->getSceneCollisionManager()->getScreenCoordinatesFrom3DPosition(Following->getAbsolutePosition(), camera,true);

and now it's giving proper result http://granyte.blogspot.ca/2012/07/plan ... point.html

Image
fmx

Re: LensFlareSceneNode with occlusion query

Post by fmx »

offtopic
those tile seams ruin the overall effect of the renders, you really need to try correct them ASAP
Looks like tile vertices are mismatched at the boundaries due to LOD?
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: LensFlareSceneNode with occlusion query

Post by Granyte »

yes they are lod boundary and quite honestly i have no idea how to fix themi tryed everything but what ever i do there is seams from far but non from close up they are a sort of rendering artifact ill try to fix them
but until now i had a much much worst issue with floating point math that caused some patches to have only artifact as heightmap and that took all my atention
fmx

Re: LensFlareSceneNode with occlusion query

Post by fmx »

check your PM, best to keep the discussion out of this topic
Erelas
Competition winner
Posts: 20
Joined: Mon Apr 18, 2011 8:40 am

Re: LensFlareSceneNode with occlusion query

Post by Erelas »

I'm having difficulties getting this to work with the latest Irrlicht release. It seems the occlusion query is working fine as it provides a valid Strength with a value between 0 and 1. Perhaps the materials are messed up?
It only renders the basic sun sprite.

Anyone know of any significant changes which could be the cause of the problem?
Erelas
Competition winner
Posts: 20
Joined: Mon Apr 18, 2011 8:40 am

Re: LensFlareSceneNode with occlusion query

Post by Erelas »

Never mind, I fixed it by changing line 42 in LensFlareSceneNode.cpp from:

Code: Select all

Material.ZBuffer = video::ECFN_NEVER;
to

Code: Select all

Material.ZBuffer = video::ECFN_DISABLED;
Thanks for the contribution tbw! :D
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

Re: LensFlareSceneNode with occlusion query

Post by robmar »

Any updates on this?
Post Reply