2 Replies - 326 Views - Last Post: 02 September 2013 - 06:12 PM

#1 Wolfride  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 30-August 13

What language(s) can I use for this dynamic 3D image geneartion?

Posted 30 August 2013 - 03:40 PM

I would post in a language specific forum, but I honestly do not know which programming language to use. That is my problem, and main question.

What I have: A web based pet breeding sim using PHP/MySQL. Each 'pet' has set colors for hair, body, eyes, ect.
What I need: I want to be able to click a button on the pet's profile and generate a 3D scene of that pet with a panning camera. The colors need to match the ones the pet already has.

Obviously it would be the same graphic/animation sets every time, just different colors for each pet. My main concern is not the 3D modeling, texturing, or related topics. My concern is what programs or coding languages could I use to add this to my site?

I've been trying to research the answer to this question for quite some dedicated time, and am not getting any solid answers. Any help explaining which programs/languages and a brief overview of why would be an AMAZING contribution! Then I'll just research and figure the rest out from there. =)

Thank you all so much, this is my first post in what appears to be a wonderful community I hope to equally contribute to in field's more to my expertise.

Is This A Good Question/Topic? 0
  • +

Replies To: What language(s) can I use for this dynamic 3D image geneartion?

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3730
  • View blog
  • Posts: 6,017
  • Joined: 08-June 10

Re: What language(s) can I use for this dynamic 3D image geneartion?

Posted 30 August 2013 - 04:32 PM

Hey. Welcome to DIC!

My suggestion, if your aim is to go for as widely supported solution as possible, is Flash. It's wide-spread and supported in pretty much all browsers. The only people you risk losing with Flash are those using ancient browsers and/or ancient versions of Flash (and for some reason refuse to upgrade it.) Even if the Flash version doesn't support 3D, you could always write in a version checker that defaults to some 2D version that isn't as demanding. - We do have a beginner tutorial on Flash 3D in our Game Programming tutorial section: Beginning Stage3D - Part 1

Another popular choice for in-browser 3D scenes is Unity. It's a 3D game engine that is aimed at creating complex 3D applications that run on multiple platforms, including as an in-browser extension. I've had little experience with using it, so I'm afraid I can't comment much on it's use, but I've seen some fairly impressive projects based on Unity. - It's not entirely free, though, so if you choose to use the free version, your web app will have a Unity watermark on it.

The last suggestion I would make, if you would like to go for the cutting-edge stuff regardless of fuzzy browser support, would be the WebGL standard. It is built right into the browsers that support it, and doesn't require any sort of 3rd party plugin to work. It's used through normal in-browser Javascript that renders scenes onto a HTML5 canvas element. - You can find all sorts of useful resources, including a browser support table, in the Mozilla docs.


I would personally opt for the WebGL approach where possible, since I really dislike having to use 3rd party extensions like Flash or Unity. I wrote a model viewer similar to the one you are describing, based on online tutorials (which I can't find now), that I used in a demo project. It worked pretty well, and was less of a nuisance to write than I expected. That was mostly thanks to the GLGE WebGL library, which did most of the heavy lifting for me. I'll share the code below, if you want to see an example of this kind of code. (It was only really half finished, but it worked well enough for my purposes.)

Spoiler

Was This Post Helpful? 2
  • +
  • -

#3 Wolfride  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 30-August 13

Re: What language(s) can I use for this dynamic 3D image geneartion?

Posted 02 September 2013 - 06:12 PM

Thank you SO much. That helped tremendously. I'm currently working on a 3D model in Blender (which exports to Unity and many other programs) and then will tackle coding to allow dynamic colors. It's improbable but not impossible to do apparently. Java is designed to show and present an object, not change it, but I've found a few work arounds that would allow me to recolor individual parts of a model.

I've been a graphic designer for years, so it didn't take long to pick up Blender and Maya to train on a new medium. But it was your post that allowed me to connect all the dots together and make my goal a reality in progress.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1