I ended up exporting the OSG model with the JSON exporter and read it into three.js, unfortunately.
Walt
On Wednesday, October 24, 2012 at 18:01 , Darrell Esau wrote:
On Thursday, October 25, 2012 at 21:21 , Darrell Esau wrote:
First, let me state: I don't think anything is boring with osgjs, I think it's an AMAZING piece of work. I've been looking at your code for the past 2 weeks and I'm blown away at what you've create, it's quite astounding.That said - here's my reason for the above question:I'm coming at this from the perspective of a Web UI engineer. I know Web UI (JavaScript, HTML5, canvas, CSS, HTML, DOM, etc) very well. I've been doing this work professionally for 15 years. However .. I don't know 3D technologies. I don't know OpenGL, I don't know WebGL, I don't know OpenSceneGraph.So .. I'm trying to integrate a WebGL globe into our existing Web product for analytical data visualization. After doing lots of research, I settled on ReadyMap because it appeared to fit our needs the best. ReadyMap uses osgjs, so I don't really have an option to use any other WebGL framework.
Now you can see my predicament. I'm very well versed in web UI technologies, but I don't have any background in 3D rendering technologies, thus I'm running into hurdles that are probably very simple to overcome if I understood the fundamentals of OpenSceneGraph. Simple things like:- How do I scale a node that's in my tree?
- Why do 1000 quads render with poor performance when they are rotated?
- How do I apply a texture to a quad, and how do I fix culling issues?
- How do I create simple particles, and animate moving / sizing / fading them?
I could ask many, many more questions like these, but I'm trying not to, because I know this is just a learning curve. I'm just going to have to learn all of these fundamental things.The biggest problem that I'm facing is that I cannot find any entry-level documentation.. specifically for OSGJS. That's the reason I was drawn to three.js -- it appears it was designed for people "like me" in mind: people who have a web UI background but not strong 3d experience. There's a number of good "getting started" tutorials, and there's a good set of reference docs.
this.m_oScaleNodes[ndx].setMatrix(osg.Matrix.makeScale(1.2,1.2,1.2,[]));
From the movie, you can see that when I do this, it appears all the quads are scaling out from the center of the globe. Since I attached the scale only to the quad node, I expected that only that node would be scaled.Which brings my to my second question:When the scale happens, it seems like the texture isn't scaled with the quad -- is there a way to tell osgjs to also scale the texture while scaling the quad?Finally - as you can see, I applied the disabled CullFace, but I don't see that it changed anything. Then again, perhaps I'm not communicating this correctly. Again, perhaps a picture is worth a thousand words:
When two quads are close together, there's this weird culling issue. I really just want one quad to lay on top of another .. I don't really care which. Now that I verbalize this, I guess I actually do want culling .. perhaps this just means that I need to have one of the quads slighter higher than the other?