Is it possible to programatically create a simple 3d object on Unreal? - unreal-development-kit

Is there a way to create and use a simple 3d model on the Unreal Engine?

Your best bet would be to create the initial 3D asset in a third party tool and import it into the IDE. From there you can change the texture map, and manipulate the aesthetics in one way or another, but the initial 3D model should be in an external 3D format, and then placed as a prefab into your world.
Creating an object dynamically in UDK is cumbersome and requires lots of tweaking, and won't save much in terms of cost of resources. Especially if you want it to look good and more than just 3D meshes thrown together rudimentarily. It is possible, but almost not worth it, especially if you have 3DSMax, Maya, Cinema4D, MotionBuilder, or one of the other hundred tools available to do the grunt work for you.
Most 3D Engines (IE Unity, UDK, Torque, Cry and now Havok) support many formats, and especially the unversal FBX. You could even use google sketchup and export to DAE or FBX format to get it into your Engine. Grant it you lose a lot of the elements, but the basic 3D mesh stays relatively in tact.

Related

widgets for a sketching/drawing application

I'm trying to build a small application for a specific problem in cartography. The workflow is like this:
in the field, use a compass and tape measure to obtain terrain data.
also in the field, sketch the plot being surveyed
using inkscape, create a vector drawing of that sketch
crunch the data to obtain the relevant information (implemented already)
put the vector and the data together (mostly warping and scaling the drawing - implemented already)
Now, I'd like to do the vectorizing, which I'm doing in inkscape now, directly in my custom application - this helps me characterize the sketch faster.
I had a look at the Inkscape and Karbon codebases, but the code responsible for the widgets that draw curves and paths, along with the whole user interaction parts, is quite involved. I'd like to stick to number crunching and make sure that works properly.
In short, I'm looking for something like Qwt (whichs provides plotting utilities), but directed to adding vector drawing/sketching functionality to an application. Then it'd be a matter of putting the GUI pieces together, and i'd be free to worry about the number crunching. So far I couldn't find anything like this - Inkscape, Karbon, Libreoffice, Printdesign, Gimp, they all implement their own path, curve widgets, using the graphics primitives of their frameworks and adding all the code that shows the curve moving with the mouse, the control points, etc.
Does anyone have an idea if such a pre-made framework for higher-level graphics - that lets me forget about the GUI code - exists?
Thanks!
QGraphicsScene and QGraphicsView provide enough for you to fairly simply implement the rest of it. Do note that Qt has a rather rich set of graphics primitives that you can trivially reuse, like bezier curves, paths, etc. You need to implement the application-specific bits, but the basics are done.

Neo4j graph visualizing libraries

Recently I explored some libraries where I can visualize graphs from Neo4j, but didn't get a clear view wich one to choose, so I have a couple thought I'd like to share.
My requirements and wishes - after search throught REST API with cypher query visualize graphs with all relationships, nodes. And result make interactive - able to drag/drop... opportunity to reveal other nodes/rels on click. Import nodes throught json data and be able to show quickly up to at least 400 elements.
So I more or less explored further libraries:
Three.js - mostly for 3D. (If I don't need 3D then better not to choose this one)
Arbor.js - drawing leaves up to you, mostly layout library
VivaGraphJS - easy to use, but almost no documentation :(
D3.js - Looks fine, but uses SVG
Cytoscape.js - looks fine, but I read that I can't use it with Neo4j. Is D3.js the right choice for real-time visualization of Neo4j Graph DB data why?
Processing.js - have it's own language similar to Java. I'm not so much in Java-like language (yet).
And I have a couple questions:
1) Whats your experience - benefits, weakneses of libraries?
2) I suppose I want to use canvas insted of SVG? (a lot of small elements on the screen).
3) Arbor is special library for layout, but others don't have layout algorithms or what?
I'll appreciate any opinion! :-)
I pondered a similar situation. I chose sigma.js.
1) Whats your experience - benefits, weakneses of libraries?
sigma.js is specific to graph rendering. d3 is a full on toolbox for visualization. Since I only want to draw graphs, the concise sigma.js interface was easier to work with. I think this is the video where the creator talks about how sigma.js is able to do incremental rendering and thus perform better and handle more vertices/edges smoothly.
2) I suppose I want to use canvas insted of SVG? (a lot of small
elements on the screen).
sigma.js renders to the canvas.
Here are the sigma.js examples. The "hide nodes" example shows mouse interactions. Additionaly, here is a blog post showing how one can easily integrate neo4j w/ sigma using a very minimal amount of data massaging code written in node.js. It would be easy to port this to any server language.
I don't see sigma.js in that list which you might want to take a look at as it is very useful (example)
You will have to somehow handle the rendering of the received data (i.e. go from a data structure to its visual representation) and this depends on what are you trying to show / say with that visualisation, how you want to do it and how you want it to look like.
As a starting point, i would go with D3 and Sigma.
I note that Gephi is not on your list. As a standalone visualiser/editor, its the best that I have used (you just get the neo4j plugin, and it will import the source files of the database and let you view it). Its also Open Source, so you can include it as part of a project.
Also missing from your list is the yFiles family of graph visualization libraries.
The JavaScript variant of if uses both Canvas, WebGL, and SVG. This can give very good performance and high-quality visualizations at the same time. For hair-ball-like graphs (thousands of dots and lines, but probably no text) you can use WebGL and Canvas and when you zoom in to actually make sense of the data, you can use SVG to get detailed high-quality visualizations with labels, icons, data-bound visualizations, etc. You can use both techniques in the same visualization, even at the same time, benefiting from the best of both worlds (demo).
Connecting yFiles to Neo4j is easy using the JavaScript Bolt driver.
Aiming at 400 elements in the view is a good idea. While larger graphs tend to look really nice, most of the time you won't gain a lot of insights by looking at "hair-balls". These almost artistic visualizations all look very similar and as such carry little to no information. Often you could just as well display a static image showing the first google image search hit for a "hairball graph" query :-)
In order to better support the user during exploration, filtering, grouping, nesting, and dynamic interaction should be added to the viewer application. How this can be implemented, very much depends on the business domain in the visualization, though and there are only very few generic approaches that work for generic graphs.
Disclaimer: I work for the company that creates the above mentioned visualization library. I do not represent it on SO, though.

Efficiency in drawing arbitrary meshes with OpenGL (Qt)

I am in the process of coding a level design tool in Qt with OpenGL (for a relevant example see Valve's Hammer, as Source games are what I'm primarily designing this for) and have currently written a few classes to represent 3D objects (vertices, edges, faces). I plan to implement an "object" class which ties the three together, keeps track of its own vertices, etc.
After having read up on rendering polygons on http://open.gl, I have a couple of questions regarding the most efficient way to render the content. Bear in mind that this is a level editor, so I am anticipating needing to render a large number of objects with arbitrary shapes and numbers of vertices/faces.
Edit: Updated to be less broad.
At what point would be the best point to create the VBO? The Qt OpenGL example creates a VBO when a viewport is initialized, but I'd expect it to be inefficient to create a close for each viewport.
Regarding the submitted answer, would it be a sensible idea to create one VBO for geometry, another for mesh models, etc? What happens if/when a VBO overflows?
VBOs should be re-/initialized whenever there's a need for it. Consider VBOs as memory pools. So you'd not allocate one VBO per object, but group similar objects into a single VBO. When you run out of space in one VBO you allocate a another one.
Today's GPUs are optimized for rendering indexed triangles. So GL_TRIANGLES will suffice in 90% of all cases.
Frankly modern OpenGL implementations completely ignore the buffer object access mode. So many programs did made ill use of that parameter, that it became more efficient to profile the usage pattern and adjust driver behavior toward that. However it's still a good idea to use the right mode. And in your case it's GL_STATIC_DRAW.

Dynamic 3D Map Visualization Toolkit?

I'm seeking a dynamically updatable, "real-time" map visualization toolkit that would support the following concept:
A user-controlled pilot's eye view flying above a landscape where the topography is
dynamically changing (hills rising and falling, slip/sliding around, valleys opening and
filling) in real-time. (Currently just a color-coded landscape surface would be acceptable, although the eventual goal is to overlay terrain/map imagery.)
Another process is dynamically updating the landscape topography data
as our fearless flyer passes over it.
There's lots of 3D visualization "explorers" out there, but they all seem to either be limited to a static data set, or require that the dynamic evolution of the data visualizations all be calculated in advance and then strung together as an animation. And flight simulators of course all pretty much assume that the topography doesn't change while in flight.
Technical wishlist:
Linux
C API preferred, but open to C++ or Java (or Ada :-)
Free/Open source preferred, but will consider proprietary
Performance: Well, I'll try to work with whatever it's got
If C++ is ok, and you don't require something too high level, I'd HIGHLY recommend OpenSceneGraph for a project like this. I used it on a project several years ago to display various forms of geospatial data on a globe (vector coastline data, sat imagery, etc).
Do keep in mind you're not limited to writing your entire solution in C++ :)
Our 3D visualization app combined our C++/OSG 3D library for graphics, a Java front-end for the GUI, and some old fortran code for the serious number crunching :O

Is there a matrix math library that is good to use alongside OpenGL to keep track of primitive co-ordinates for collision detection

Matrix math library that is good to use alongside OpenGL to keep track of primitive co-ordinates.
Does such a thing exist? Is this the best way to track my objects for use in collision detection?
You don't describe your situation very much but I'm assuming that you are making some game or simulation application?
I would suggest you use a physics engine, like Bullet or ODE, from the start. This way you will get a properly optimized matrix library plus well tested collision detection and handling. Using some other general-purpose matrix math library may seem easier at first glance. However it will probably be less adapted to your needs and will surely be a mess to replace with a physics engine if you decide to use one later on.
You don't have to use all the fancy features of the physics engine right away. In fact you could very well just use the matrix and vector implementation and skip the rest until later.
OpenGL is simply for rendering the objects from your data store, your physics/collision library will already have matrices for all the objects within it.
I dont think there is such thing. Maybe this helps to clarify a few things:
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=30

Resources