Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Pages: 1 [2] 3 4

Author Topic: 3D characters discussion  (Read 43942 times)

0 Members and 1 Guest are viewing this topic.

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re: 3D characters discussion
« Reply #15 on: December 06, 2004, 01:59:26 AM »

Hi Mnemonic, hi everybody,

after my first test on exporting a Blender mesh to Milkshape, animating it and use it in WME worked fine, I wanted to write a little tutorial about how to use Blender for WME's new 3d support. The major problem is the geometry file - I tried almost every way (Crossroads, etc.) and every Python script to export a scene with one "walk plane" and one "block cube". Some of those even resulted in a 3ds file with the correct object names (readable in the 3ds file), but I couldn't manage to export lights or cameras and every 3ds file simply crashed WME.

Now my wish ;) - I'd love to have a second alternative file format for the geometry files. Maybe some simple custom ASCII/XML/INI-file could make it a lot easier. We could either tweak those values by hand (...)  or after all write some simple exporter or converter (DXF uses something similiar) for programs like Blender. I don't think I'd be able to write my own full-featured exporter to 3ds format directly... (if someone here does, ignore the following. ;) ) but some ascii file exporter shouldn't be too hard IMHO, if WME could handle it after all.

I'm thinking of something like this (I'm using an example in XML format simply because I love XML ;) !)

Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<wme_geometry>
    <plane name="wlk_floor1">
        <vertex x_value="20" y_value="0" z_value="0" />
        <vertex x_value="20" y_value="0" z_value="200" />
        <vertex x_value="230" y_value="0" z_value="200" />
        <vertex x_value="230" y_value="0" z_value="0" />
    </plane>
    <cube name="blk_big_evil_hole_to_hell">
        ...
    </cube>
    <camera name="cam_actioooon">
        <source>...</source>
        <direction>...</direction>
        <fov>...</fov>
    </camera>
    <lamp name="lamp_mysun" type="spotlight">
        <source>...</source>
        <direction>...</direction>
        <intensity>...</intensity>
    </lamp>
</wme_geometry>

Just an idea of it. But absolutely free. ;)
Logged
Mooh!

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: 3D characters discussion
« Reply #16 on: December 06, 2004, 09:03:40 AM »

Ok, Jerrot, I can see your point :) If someone (ahem) makes the export script for Blender, I will make a loader for WME. I'd love to support Blender, but unfortunately I'm unable to write the script myself. Actually, writing plugins for various 3D programs is exactly what I was trying to avoid when choosing the 3ds format, but I obviously overestimated Blender's 3ds exporter...
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re: 3D characters discussion
« Reply #17 on: December 06, 2004, 09:51:30 AM »

If someone (ahem) makes the export script for Blender, I will make a loader for WME.

:) Maybe *I* could have a try on this... ;) We can talk about the necessary values and their formats on IRC then...

Quote
writing plugins for various 3D programs is exactly what I was trying to avoid when choosing the 3ds format, but I obviously overestimated Blender's 3ds exporter...

Yes, me too, actually. But in general I guess your chosen way is the right one and hopefully there will be some better 3ds export script in Blender some day. Anyway - for now it would be great offering such a custom file format as secondary alternative.

Logged
Mooh!

Orange Brat

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 112
    • View Profile
    • Orange Brat Shenanigans™
Re: 3D characters discussion
« Reply #18 on: December 21, 2004, 07:52:00 AM »

In addition to stencil shadows, I'd like to request a "render to texture" feature. This way realtime mirrors and reflective surfaces can be achieved, as well as, other goodies that the technology allows. I was reading an interview about the game "Still Life" and this feature appears to be included(reflections from 3D objects on 2D surfaces were mentioned). I guess you'd have to utilize the hidden geometry in some way. If you wanted a reflective street surface, you'd have to set up your special camera and then render what it sees to the face of the street surface. Sounds like a pain to implement, but it would be a great feature for the eyecandy crowd.

Also, somewhere down the line, you might want to implement some kind of level of detail for the 3D objects. If you have a 5000 poly model, there's no reason to render all of them when the character is scaled down to a speck on the screen.
« Last Edit: December 21, 2004, 06:21:25 PM by Orange Brat »
Logged
The Disenfranchised™ - coming later

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: 3D characters discussion
« Reply #19 on: December 22, 2004, 12:17:21 PM »

In addition to stencil shadows, I'd like to request a "render to texture" feature. This way realtime mirrors and reflective surfaces can be achieved, as well as, other goodies that the technology allows. I was reading an interview about the game "Still Life" and this feature appears to be included(reflections from 3D objects on 2D surfaces were mentioned). I guess you'd have to utilize the hidden geometry in some way. If you wanted a reflective street surface, you'd have to set up your special camera and then render what it sees to the face of the street surface. Sounds like a pain to implement, but it would be a great feature for the eyecandy crowd.
True, it would be nice to have this feature and it should be possible to do by extending the "hidden geometry" definition somehow. I'll think about it.

Also, somewhere down the line, you might want to implement some kind of level of detail for the 3D objects. If you have a 5000 poly model, there's no reason to render all of them when the character is scaled down to a speck on the screen.
Also true, but in case of adventure game this isn't really critical, IMHO. Since you typically see the same character(s) all the time anyway..
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Orange Brat

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 112
    • View Profile
    • Orange Brat Shenanigans™
Re: 3D characters discussion
« Reply #20 on: December 22, 2004, 12:49:54 PM »

Quote
True, it would be nice to have this feature and it should be possible to do by extending the "hidden geometry" definition somehow. I'll think about it.

Keep us posted. ;)

Quote
Also true, but in case of adventure game this isn't really critical, IMHO. Since you typically see the same character(s) all the time anyway..

You're right and I kind of threw that one in later. You might run into trouble when you have more than one character on the screen and on older hardware, though. The 3D engine I use has a four step LOD system and you can define the percentage from the camera to the player for each one to kick in. It is definitely a framerate saver when you get into "deep" levels and lots of models. Again, that's a realtime engine, so it's more important with them.
Logged
The Disenfranchised™ - coming later

Orange Brat

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 112
    • View Profile
    • Orange Brat Shenanigans™
Re: 3D characters discussion
« Reply #21 on: December 28, 2004, 05:38:49 PM »

Thanks for the character relative direct control scripts. This can be scripted by the user, but a possible future update would be to provide a camera relative version. If you've played Grim Fandango, you'll notice it gives a choice of either character or camera relative..I don't know if Monkey Island 4 has that or not.

The only other thing is that Trinity seems to get stuck on the crates. I'm not sure how to deal with that, though.  She also can walk off the screen, so you might want to add some extra hidden geometry for the next version of the 3D demo.

Anyway, thanks for the new toys. ;)
« Last Edit: December 28, 2004, 07:33:53 PM by Orange Brat »
Logged
The Disenfranchised™ - coming later

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re: 3D characters discussion
« Reply #22 on: December 29, 2004, 04:13:55 AM »

Thanks for the character relative direct control scripts. This can be scripted by the user, but a possible future update would be to provide a camera relative version. If you've played Grim Fandango, you'll notice it gives a choice of either character or camera relative..I don't know if Monkey Island 4 has that or not.

In case somebody wants to implement this in his/her game - it's simply done by switching the keys VK_RIGHT and VK_LEFT in the direct_control.script (or better: use some variables for the keys there, so you can switch between them).
Logged
Mooh!

Jeroen

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 51
  • I'm a llama!
    • View Profile
Re: 3D characters discussion
« Reply #23 on: June 18, 2005, 09:38:05 AM »

Hey there Jan,

What also could be an option is to support B3D which is the 3D animation+mesh format for BlitzBasic. An open format specification is available on the website (I can look it up for you if you like). There are several third party tools that support exporting/importing to this format. What is cool is that it supports "weighted bones" animation (3ds does not. darn I wish I could explain this better). B3D generally keeps more information inside the format than e.g 3ds files. For example, you can say "the head must be shiny and the limbs musn't".

If WME wants to support 3d characters, I guess 3ds won't cut it (and maybe B3D too). Perhaps WME could have its own format where for example the technical focus is on facial expressions and such? 

Also, it would be cool to be able to do this (pseudo code):

Code: [Select]
var gun = loadMesh("gun");
var arm = actor.getBone("arm"); // find the bone called "arm"
gun.parentEntity(arm); // attach the gun to the arm limb. NULL = detach.
gun.turnEntity(40,0,0); // turn the gun so that it positions the right way.

Now, the actor is walking with the gun!

I must admit I never fiddled with 3d characters in WME (Project Joe only has some pre-rendered characters as you know) but 3d is a very important
feature for WME I think.
Logged

Nihil

  • Supporter
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 528
  • Fear me! I'm evil!
    • View Profile
    • Order of Dagon
Re: 3D characters discussion
« Reply #24 on: June 18, 2005, 01:54:37 PM »

The characters use the Milkshape-format (Ms3d), 3ds is only for the invisible scene geometry. I don't know if it supports weighted bones (actually, I don't even know what that is :-) ), but your example with the weapon can already be done. Something like this is implemented in the 3d-actor demo, you can pick up the teapot and Trinity holds it in her hand then.

An own format for WME is in my opinion not the best idea unless someone has the time and patience to write converters for all the other formats out there :-)

Orange Brat

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 112
    • View Profile
    • Orange Brat Shenanigans™
Re: 3D characters discussion
« Reply #25 on: June 19, 2005, 08:22:58 AM »

The MS format doesn't supported weighted bones. This fact came up over at the Gamestudio forum recently, although I can't remember how Milkshape got into it. I think it would be nice if one day WME did support a format that supports every major feature under the sun. It might even be nice to have it's own format and offer the source so others can develop plugins for 3rd party modeling apps. That way, you get a format that does everything the users want(from beginners to advanced). However, that's probably a very tall order, and unlikely to happen any time soon.
Logged
The Disenfranchised™ - coming later

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: 3D characters discussion
« Reply #26 on: June 20, 2005, 07:40:24 AM »

Perhaps Cal3d might be such format. I don't suppose anyone has any experience with it..? But it supports weighted bones and provides a number of exporters for various 3D packages. It's released under LGPL, though, that would mean an external DLL.
« Last Edit: June 20, 2005, 08:04:00 AM by Mnemonic »
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Jeroen

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 51
  • I'm a llama!
    • View Profile
Re: 3D characters discussion
« Reply #27 on: June 20, 2005, 10:14:10 AM »

I don't have experience with cal3d. Strange that every game dev company kind of re-invents the wheel by developing their own format.
I think its important that good importers/exporters exist (e.g MAX and MAYA exporters to e.g Cal3d).
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: 3D characters discussion
« Reply #28 on: June 20, 2005, 11:05:09 AM »

Strange that every game dev company kind of re-invents the wheel by developing their own format.
Well because there isn't any generally adopted (and flexible enough) format available, I'm afraid. I was looking for one and MS3D turned out to be the most suitable, even though it has its flaws.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

alelink

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 31
    • View Profile
    • Overcast - Visual Art
Re: 3D characters discussion
« Reply #29 on: July 04, 2005, 11:58:43 PM »

Hello,
I've tryed the 3d character demo and
the actor, when walk through the screen seems to come "transparent",
more on lighten areas of the background.

it's a my problem or is know yet?
thanks
 
Logged
Pages: 1 [2] 3 4
 

Page created in 0.035 seconds with 20 queries.