Game Development Community

How to get mounted image glow in MS3

by Playware · in Torque Game Engine Advanced · 04/08/2006 (10:49 pm) · 4 replies

Hi all,

I read a suggestion somewhere to add SceneRenderImages with glow flagged for each mounted image.
ShapeBase::prepRenderImage() and ShapeBase::renderObject() contain some guide to what to do but
I do not know where to add the flag to.

Do I add it within the ShapeBaseImageData?
I do not know which part of it to add to.
I hope someone could give me some guidelines.

Thanks in advance.

#1
04/09/2006 (4:29 pm)
Yes, that's the way to do it. You need to look in ShapeBase::prepRenderImage(). Hopefully that will give you a good enough start.
#2
04/09/2006 (7:22 pm)
Help ; ;

www.pwsgames.com/screenshots/glow.jpgIt seems to render the image after the glow.

I added this in prepRenderImage under the mountimage
rimage->glow = true;
rimage->sortType = SceneRenderImage::Glow;

Is it normal for the glow effect to look different on mounted image and static object
or did I do something wrong?
#3
04/11/2006 (8:45 am)
I think you need to add an extra render image thing rather than just flagging glow on the current one.
#4
05/03/2006 (6:23 pm)
I finally got it working thanks to Brian and Ben.

In the prepRenderImage for shapebase, replace
if (mCloakLevel == 0.0f && image.shapeInstance->hasSolid() && mFadeVal == 1.0f)
            {
               ShapeImageRenderImage* rimage = new ShapeImageRenderImage;
               rimage->obj = this;
               rimage->mSBase = this;
               rimage->mIndex = i;
               rimage->isTranslucent = false;
               rimage->textureSortKey = (U32)(dsize_t)(image.dataBlock);
               state->insertRenderImage(rimage);
            }

with
if (mCloakLevel == 0.0f && image.shapeInstance->hasSolid() && mFadeVal == 1.0f)
	{
	   ShapeImageRenderImage* rimage = new ShapeImageRenderImage;
	   rimage->obj = this;
	   rimage->mSBase = this;
	   rimage->mIndex = i;
                   rimage->glow = false;
                   rimage->isTranslucent = false;
	   rimage->sortType = SceneRenderImage::Normal;
	   rimage->textureSortKey = (U32)(dsize_t)(image.dataBlock);
                   state->insertRenderImage(rimage);

                   rimage = new ShapeImageRenderImage;
	   rimage->obj = this;
	   rimage->mSBase = this;
	   rimage->mIndex = i;
	   rimage->glow = true;		
	   rimage->isTranslucent = false;
	   rimage->sortType = SceneRenderImage::Glow;
	   rimage->textureSortKey = (U32)(dsize_t)(image.dataBlock);
	   state->insertRenderImage(rimage);
	}

-Mickey