Page 2 of 2

Re: Rendering mesh for UI purposes

Posted: Thu Mar 01, 2018 6:04 pm
by fury22uk
Yes, I know that flag, and yes - I used it, and it did not change anything AT ALL. Well I tested it on the pure FirstPersonShooter template (c++) on the Example map. No changes at all. Just spawned entity on button press, and assigned this flag to it. It still intersects with those cubes in there. I tried assigning this flag prior to load geometry and after, none of these make any difference

Re: Rendering mesh for UI purposes

Posted: Thu Mar 01, 2018 6:52 pm
by craftycry
Yep - I made the other topic about render nearest. I could not get it to work no matter what I tried. Seems safe to assume it is bugged at this point.

Re: Rendering mesh for UI purposes

Posted: Fri Mar 02, 2018 4:30 pm
by Cry-Flare
Interesting, I just tested using the FPS template and it appears to work for me (Whole character set to Render Nearest).
This is what I did:

First, I moved the ResetCharacter() method from the Revive() method into the end of the Initialize() method, before the Revive() call.
Then I set the render flags for the character slot to render nearest after.

So the end of the Initialize() method now looks like this:

Code: Select all

m_pSensorComponent->SetName("SensorComponent");

// Moved here to prevent adding slots on every revive
m_pAnimationComponent->ResetCharacter();

int slotId = m_pEntity->GetSlotCount() -1; // Character slot will now always be first free slot - refer to ResetCharacter()
m_pEntity->SetSlotFlags(slotId,
m_pEntity->GetSlotFlags(slotId) | ENTITY_SLOT_RENDER_NEAREST &~ENTITY_SLOT_RENDER); // Remove standard render flag to prevent rendering twice.

// To prevent object clipping on cameras near plane
m_pCameraComponent->SetNearPlane(0.01f);

Revive();
}
Hope this helps.

Re: Rendering mesh for UI purposes

Posted: Fri Mar 02, 2018 10:50 pm
by fury22uk
I actually needed this for entities with simple cgf meshes, not for characters. And it does not work for them. I will record video next week on clear project, and post it here, so you can see that this flag doesn't work

Re: Rendering mesh for UI purposes

Posted: Sat Mar 03, 2018 8:02 am
by craftycry
I believe the flag for characters is implemented in the same way under the hood as it is for entities, if that helps. I couldn't get it to work for entities either though when I tried before.

Re: Rendering mesh for UI purposes

Posted: Wed Mar 07, 2018 11:21 am
by Cry-Flare
Indeed the issue has been noticed and it appears fixed in the stabilization branch, so should make it to 5.5.