Forum: Poser - OFFICIAL


Subject: OT Which Programming Language is 3D Apps wrote in ?

RorrKonn opened this issue on Feb 03, 2009 ยท 58 posts


svdl posted Sat, 07 February 2009 at 7:19 AM

Quote - What language would you write a polygon reduction app in?

Since the goal is exporting Poser characters at lower polygon counts, I'd write it in Python and run it from within Poser itself (something like an "reduce scene" Python script).
Why PoserPython? First of all, it's easy to access all the meshes and vertices from within PoserPython. Second, once you've performed the math on the geometry, it's fairly easy to create the actual meshes from the arrays of vertices and polygons that are the result of your caclulations, and exporting the resulting geometry as .OBJ is also quite easy.

A good polygon reduction algorithm, well, that's the rub. I haven't encountered a good one yet. I've tried the ones in 3D Studio Max, and they make a real mess of the mesh.

But when it comes to animation, there's probably a better solution than polygon reduction. What do you want when animating? You want a responsive user interface, so that you can easily change keyframes, even when the scene is already pretty loaded. You don't need sub-millimeter precision, Fast collision detection would be a major plus. And you want to be able to render the animation before you die of old age.

If your goal is being able to make animations, it might be a good idea to make a list of what's preventing you from making them using the applications and tools you already have. Then tackle the items on that list one by one.
You'll find that some of the issues on that list require programming of some sort, but not all of them. Some utilities could be implemented as Python scripts within Poser, others would require an external application.

As for fast rendering, you might want to look up Gelato on the nVidia site. Gelato is a render engine that uses the graphics card for the actual rendering (only nVidia 8xxx or higher though), which is a VERY good idea. Graphics chips are specialized in rendering, and can do it far, far faster than any CPU.

I'd think that a utility that could read in a complete Poser .pz3, including animation, and render it using Gelato, would be a great tool. I see two major challenges in writing that tool: 1) using the information in a .pz3 file to deform the mesh as needed (how are bones and magnets and falloff zones implementend in Poser? You'll need to recreate those algorithms for that utility) and 2) recreating the shaders and lights (easier, since Poser uses Cg for the shaders, and Gelato will accept Cg defined shaders).
If I were to write this utilty, I'd probably use PoserPython to read the current state of the geometry from within Poser itself - that way I wouldn't have to worry about how magnets and bones influence deformations. I'd use a mix of Python and standalone C++ to write an API around Gelato that can be called from PoserPython.
I could do the same using OGRE instead of Gelato.

Another great utility: Poser has animation tools, but they're fairly primitive. If you can use PoserPython to write a better set of animation tools that work within Poser itself.... quite a lot of animators would be highly interested in such a utility.

And a simple utility, but of great use to animators and still scene creators alike: a "drop to underlying surface" script. Relatively simple, can be made entirely within PoserPython, and it would be a good first real project to get a feel for 3D math and algorithms.

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff