Skip to main content
Up and Coming
March 1, 2014

[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

    Up and Coming
    March 1, 2014
    Why 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.
    rupyAuthor
    Up and Coming
    March 1, 2014
    Yes, 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...
    "It's like Homeworld in first person." Disable Aero and vSync for a completely simulator sickness free experience with 2xHz FPS. Keep the config utility open for tracking to work.
    Up and Coming
    March 1, 2014
    You 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.
    rupyAuthor
    Up and Coming
    March 1, 2014
    Solved 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!
    "It's like Homeworld in first person." Disable Aero and vSync for a completely simulator sickness free experience with 2xHz FPS. Keep the config utility open for tracking to work.
    Up and Coming
    March 1, 2014
    If your task is finishing the engine then what graphical effects look like is none of your concern, just leave it alone.
    rupyAuthor
    Up and Coming
    March 1, 2014
    Well 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...
    "It's like Homeworld in first person." Disable Aero and vSync for a completely simulator sickness free experience with 2xHz FPS. Keep the config utility open for tracking to work.