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.

Re: LensFlareSceneNode with occlusion query

Postby Granyte » Thu Jul 19, 2012 12:10 pm

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

I only needed to change this
cpp Code: Select all
 
const core::vector2d<s32> lightPos = SceneManager->getSceneCollisionManager()->getScreenCoordinatesFrom3DPosition(Following->getAbsolutePosition(), camera);


to this

cpp 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
Granyte
 
Posts: 846
Joined: Tue Jan 25, 2011 11:07 pm

Re: LensFlareSceneNode with occlusion query

Postby fmx » Thu Jul 19, 2012 7:09 pm

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?
User avatar
fmx
 
Posts: 559
Joined: Wed Dec 06, 2006 9:28 am
Location: UK

Re: LensFlareSceneNode with occlusion query

Postby Granyte » Thu Jul 19, 2012 7:30 pm

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
Granyte
 
Posts: 846
Joined: Tue Jan 25, 2011 11:07 pm

Re: LensFlareSceneNode with occlusion query

Postby fmx » Fri Jul 20, 2012 7:09 pm

check your PM, best to keep the discussion out of this topic
User avatar
fmx
 
Posts: 559
Joined: Wed Dec 06, 2006 9:28 am
Location: UK

Re: LensFlareSceneNode with occlusion query

Postby Erelas » Tue Feb 19, 2013 6:52 pm

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?
User avatar
Erelas
Competition winner
 
Posts: 20
Joined: Mon Apr 18, 2011 8:40 am

Re: LensFlareSceneNode with occlusion query

Postby Erelas » Tue Feb 19, 2013 7:09 pm

Never mind, I fixed it by changing line 42 in LensFlareSceneNode.cpp from:
cpp Code: Select all
Material.ZBuffer = video::ECFN_NEVER;

to

cpp Code: Select all
Material.ZBuffer = video::ECFN_DISABLED;


Thanks for the contribution tbw! :D
User avatar
Erelas
Competition winner
 
Posts: 20
Joined: Mon Apr 18, 2011 8:40 am

Re: LensFlareSceneNode with occlusion query

Postby robmar » Mon Aug 14, 2017 10:25 am

Any updates on this?
robmar
 
Posts: 997
Joined: Sun Aug 14, 2011 11:30 pm

Previous

Return to Code Snippets

Who is online

Users browsing this forum: No registered users and 1 guest