Forum Discussion
rupy
11 years agoHonored Guest
[SOLVED] GL_LINES & normal
My lasers are just lines with a certain line width, but they end up orienting their normals different in each eye becuase of the stereoscopic rendering (- and | for the same beam) which is bad, stomach churning even. How do I tell OpenGL which way I want these oriented?
6 Replies
- raidho36ExplorerWhy do you use a line strip to begin with? It isn't exactly the best way to visualise beams, let alone laser beams that are completely invisible. Either way, you can use actual 3d models for beams. The most common approach is a "snowflake" beam - it looks great yet being really simple. Unless you have, like, tens of hundreds of beams simultaneously, you won't have problems with that.
- rupyHonored GuestYes, it's star wars beams and it's a MMO so alot of them... how would you draw a snowflake beam with OpenGL, google retuned nothing...
- raidho36ExplorerYou just render a bunch of two-sided billboards shaped as a snowflake, and that's it. You can create a corresponding 3d model.
I don't beleive you'd have to draw all these beams from all around your MMO map simultaneously though. Culling and such. Even then, e.g. War Thunder can handle thousands of tracing bullets flying around. - rupyHonored GuestSolved it with glEnable(GL_LINE_SMOOTH);
Draws them like this \ * / where * = ship center, at least it's constant between view ports, so all left are \ and all right are all /...
Setting the normal does not seem to work.
Wouldn't billboards be more expensive?
Yes culling for sure, but for now I need to finish the engine as fast as possible to start tweaking gameplay...
Thanks for feedback! - raidho36ExplorerIf your task is finishing the engine then what graphical effects look like is none of your concern, just leave it alone.
- rupyHonored GuestWell I want to be able to play in the rift without throwing up... a good game is all about attention to the little things, but you are right...
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device