Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
What is Webgl and How to make something in it ?
I have given an assignment to make rotating globe in Webgl but I donot know that what it is and how to work on it, I only know how to code this in HTML. What should I do ? please help.
WebGL is a branch of OpenGL based on OpenGL Embedded Systems (ES). It is run in browsers through a <canvas> element after getting a context from said element. All calls are done through JavaScript. You can find a ton of tutorials through google. One that I used a lot when I was starting can be found here: Mozilla WebGL Tutorial
Additionally, WebGL is still growing and while most modern browsers support it, you may need to enable it. There are also some features or caveats between implimentations. For example, Internet Explorer 11 supports WebGL but I found that you cannot use structs in your GLSL yet, a feature that Chrome and Firefox both support. To find out if you can run WebGL, either go to a demo page such as the one found here: Chrome Experiments or just go here: Get WebGL
WebGL is a JavaScript library for drawing 3D graphics (based on the OpenGL ES 2.0 API) in a web browser inside of an HTML5 canvas element. Using it will require some knowledge of writing OpenGL vertex and fragment shaders, and computer graphics in general.
There are many sites on the internet that contain samples (very likely for precisely what you've been asked to do). However, if you want to learn, there are some simple examples at Ed Angel's web site.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 24 days ago.
Improve this question
I'm confused about the technologies listed above.
I understand that WebGPU is somehow faster than WebGL. Why is that, I couldn't find...
WebGL, WebGPU and OpenGL (C++) all need WebAssembly to run in the browser.
OpenGL with WASM will be always faster than WebGPU / WebGL.
Am I correct?
I understand that WebGPU is somehow faster than WebGL. Why is that, I couldn't find...
WebGPU is a standardized interface to graphics hardware, WebGL is a different one. Both have different approaches, capabilities and hence slightly different target audiences, I'd say.
So, you can't find reasons because your statement is not generally true.
WebGL, WebGPU and OpenGL (C++) all need WebAssembly to run in the browser.
Definitely not true.
At least WebGPU works directly from JavaScript.
WebGL is a javascript API to begin with
OpenGL (C++): For one, OpenGL is a C API, not C++, but you can use it from C++. Since the only way to do OpenGL on something that doesn't support OpenGL directly is an emulation, and the only feasible OpenGL emulator for browser platforms is a WASM library, that's true.
OpenGL with WASM will be always faster than WebGPU / WebGL.
Definitely not right. Much of OpenGL needs to be emulated on basis of the techniques actually supported by the browser. So, should you choose for some reason to use the OpenGL emulation instead of writing WebGL with the supported subset of OpenGL ES (not the same as OpenGL), you're likely to be slower, but your mileage might vary, depending on how bad (or good) your code is.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm an Objective-C / Swift software developer (in training) currently with an application in the App Store. But I have recently really been interested in Metal, Apple's new alternative to OpenGL. But I'm not exactly sure how to begin... Apple's documentation is handy, but only if you really know what you are doing in the first place. Are there any good tips to beginning? I really haven't explored the area of 3D game programming so would you recommend I learn another language first? And if so which?
I'm just looking for good tutorial books or sites that get in depth with the how and why. I like to understand what exactly I'm doing instead of just typing in code, but there are so many languages and beginner's books that I really don't know where to start... Can anyone help me with this?
Metal is a newer graphics API. So if you are new to graphics and 3D game programming you may want to start with OpenGL- specifically since there are many textbooks out there that teaches you fundamentals of graphics using OpenGL. As for a web page on OpenGL, one of my favorite ones is songho. Books on OpenGL ES2.0 and OpenGL ES3.0 includes sections on programming with OpenGLES for iOS.
If you would specifically like to explore Metal API itself, there are multiple videos from WWDC 2014 that details on the basics and has demos on how to do work with Metal in Xcode. An introductory article that details on what and why with respect to Metal is the objc.io one. And a more detailed one is metalbyexample.
To understand in depth as to how these graphics APIs work, you might need a grasp on GPU architecture. The Real-Time Rendering is probably the best book on the subject. These lecture videos from Prof. John Owens at UC Davis also describes the architecture in a clear and concise manner.
I would definitely recommend Marius Horga's blog as a starting point. It is how I started and Marius is always willing to help.
Another place to go is metalbyexample.com by Warren Moore and of course his book. However, it has a significant amount of code written in Objective-C, but it is fairly easy to translate to Swift.
Download the sample code from Apple at: https://developer.apple.com/metal/
Recently I created a GitHub repo how to translate Shadertoy shader code into Metal, which you can access it in here.
[Important Note] - Some of the sample code given is already incompatible with Xcode 8 and Swift 3 and you will need to work out the changes needed to prevent the compiler from choking on them. If you need three great code samples by Apple showing how to use textures, multithreading at the CPU and GPU level, and how to draw primitives in Metal, being also Xcode 8 beta 6, Swift 3 compatible, just send me an email and I will send them to you.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have been looking around for a while now, trying to find some easier 3D framework for iOS. Cocos3D looks cool to work with in iOS, but I seems quite beta(?) and the documentation provided seems not enough to understand how to work with it.
So I have been searching the web for similar libs without any luck, even for something close to a tutorial. Does anyone know an easy library for creating some basic 3D demos?
I would like to create a demo simulating flying over some simple terrain/ground and somehow be using GL for this. Any directions are appreciated.
cocos3d is actively developed and supported, and is currently being used in dozens of apps and games. It now supports the iOS, OSX and Android platforms.
cocos3d 2.0 is recommended for new development. It is stable, actively supported, and is nearing its first formal release as a packaged distribution, which is planned for end Dec 2013/early Jan, 2014.
As for documentation, I agree that it is woefully deficient. We will be introducing a new website and Wiki around the time of the formal 2.0 release, which should help to remedy this moving forward.
Right now, your best bet for learning cocos3d is to review the implementation of the CC3DemoMashUp demo app, which demos almost all of the major features of cocos3d.
Relevant to your specific demo idea, the CC3DemoMashUp demo includes a dragon flying over a scene. The dragon also demonstrates blending between animation tracks.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Can anyone direct me to a free people tracking library? I would like to be able to use an input image (or video) and get the position of people in it. I have looked at the Reading People Tracker but cannot compile it! I am on Linux (Ubuntu) but windows would be okay (if anyone can tell me how, this would be great). Preferably, it would be for C/C++ but java, c#, ruby and python would be okay too. Thanks in advance, ell.
Not specifically a people tracking library, but as a general tracking approach "Predator" is very highly regarded: http://info.ee.surrey.ac.uk/Personal/Z.Kalal/tld.html - Authors site includes some very impressive demonstration of results on youtube
This article fully explains an algorithm used for tracking moving people, and the accompanying source code is here; it is pure Java. You can see it in action in this video.
(Disclaimer: I'm the author; but I do think this is very useful, and have successfully used the algorithm a lot myself.)
The algorithm tracks moving objects in general, finds their bounding rectangle (which the application draws), counts the number of pixels in each objects, and consistently assigns them the same integer ID throughout the video frames.
When it comes to commercial computer vision applications, OpenCV and the Point Cloud Library aka PCL are your best friends (C++, but there are Java and C# bindings). And articles like the one linked explains how to use tools like OpenCV to accomplish full stack motion tracking. (The pure Java implementation shows how it works down to the individual pixels.)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I have a legacy application that generates VRML 1.0 files. I'd like to build a WebGL-based web interface that can display these VRML files. Is there an easy way to do so?
Edit: Specified that they are VRML 1.0.
If you can get it to VRML 2.0 (VRML '97) using a tool like the above-referenced one from Parallelgraphics, you can use the Fraunhofer Institute's tools (see discussion and links to InstantReality at http://www.x3dom.org/?page_id=532) to go from VRML 2 to either X3DOM or X3D. With Firefox or Chrome and a current graphics card and driver, you've got the WebGL support needed to run X3DOM. X3DOM handles only a subset of X3D, but can be referenced straight from XHTML and CSS, or plug-ins required. It's at a much higher level and easier to deal with than dealing directly with WebGL.
As I understand it, X3D is a development from VRML, and there's a WebGL-based renderer for it called X3DOM. Converting over is unlikely to be zero-effort, but it might be easier than trying to make the jump all the way to a "native" WebGL format.
VRML can be pretty complex with lots of interactivity and it doesn't look like a ont-to-one converter is available. However, here is what you could try:
Convert your VRML file to a standard OBJ file using something like MeshConv
Import the converted file in CopperLicht (Free) or CopperCube (Not free)
You will then have some kind of conversion of your VRML file which you can fine-tune.