Forum Discussion
BalajiRam
11 years agoHonored Guest
OculusRoomTiny related query
Hello,
In the OculusRoomTiny sample, the AddSolidColorBox method includes this to determine the Vertex color:
float dist1 = (vvv.Pos - Vector3f(-2,4,-2)).Length();
float dist2 = (vvv.Pos - Vector3f(3,4,-3)).Length();
float dist3 = (vvv.Pos - Vector3f(-4,3,25)).Length();
int bri = rand() % 160;
float RRR = c.R * (bri + 192.0f*(0.65f + 8/dist1 + 1/dist2 + 4/dist3)) / 255.0f;
float GGG = c.G * (bri + 192.0f*(0.65f + 8/dist1 + 1/dist2 + 4/dist3)) / 255.0f;
float BBB = c.B * (bri + 192.0f*(0.65f + 8/dist1 + 1/dist2 + 4/dist3)) / 255.0f;
Any help on what this relation is about ?
I tried changing the "bri" to arbitrary value but did not see a perceivable difference in the output.
Sorry if i missed anything obvious.
Thank you.
Ram
In the OculusRoomTiny sample, the AddSolidColorBox method includes this to determine the Vertex color:
float dist1 = (vvv.Pos - Vector3f(-2,4,-2)).Length();
float dist2 = (vvv.Pos - Vector3f(3,4,-3)).Length();
float dist3 = (vvv.Pos - Vector3f(-4,3,25)).Length();
int bri = rand() % 160;
float RRR = c.R * (bri + 192.0f*(0.65f + 8/dist1 + 1/dist2 + 4/dist3)) / 255.0f;
float GGG = c.G * (bri + 192.0f*(0.65f + 8/dist1 + 1/dist2 + 4/dist3)) / 255.0f;
float BBB = c.B * (bri + 192.0f*(0.65f + 8/dist1 + 1/dist2 + 4/dist3)) / 255.0f;
Any help on what this relation is about ?
I tried changing the "bri" to arbitrary value but did not see a perceivable difference in the output.
Sorry if i missed anything obvious.
Thank you.
Ram
2 Replies
- mattnewportProtegeI was puzzled by what this is supposed to be doing too. I tried commenting it out and the whole scene looks a bit darker but it's not obvious what is supposed to achieve. If I figure it out I'll let you know!
- BalajiRamHonored GuestThanks Matt
I think i have figured out what it does although i still do not know how it does it :)
In the scene from that sample, there are a few railings at the end.
Those railings do not show their edges if the code is commented.
Regards,
Ram
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 9 months ago