Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Pages: [1] 2

Author Topic: VRML  (Read 24301 times)

Paulo

  • Jr. Member
  • **
  • Posts: 59
  • Love 3D !
    • View Profile
    • Paulo's web site : 3D art with Anim8or
VRML
« on: July 30, 2009, 05:34:46 pm »

Does exist a VRML exporter plug-in?
Logged
Paulo, French 3D Maker




My VRML exporter for anim8or : http://www.anim8or.com/smf/index.php?topic=3168.0

Claude

  • Sr. Member
  • ****
  • Posts: 285
    • View Profile
Re: VRML
« Reply #1 on: July 30, 2009, 11:48:04 pm »

Nope.
Logged

3Dgeek11

  • Sr. Member
  • ****
  • Posts: 541
  • Roll Tide.
    • View Profile
    • My DeviantART
Re: VRML
« Reply #2 on: August 02, 2009, 12:10:43 am »

Would it be that hard?

It'd be nice to have one.

Although, I'd want a VRML importer.
Logged

AnimalCrosser5

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: VRML
« Reply #3 on: December 16, 2009, 08:26:22 pm »

Blender has a VRML import/export option. So, you import with blender and export to an anim8or compatible format. It would be awesom if there was an importer for anim8or though.
Logged

Paulo

  • Jr. Member
  • **
  • Posts: 59
  • Love 3D !
    • View Profile
    • Paulo's web site : 3D art with Anim8or
Re: VRML
« Reply #4 on: January 19, 2010, 05:04:41 pm »

I'm going to make myself this exporter, but I'm thoroughly a noob !
How to format a string like this :
"hello world" -> "hello_world" in ASL ?

Thank you !
Logged
Paulo, French 3D Maker




My VRML exporter for anim8or : http://www.anim8or.com/smf/index.php?topic=3168.0

Paulo

  • Jr. Member
  • **
  • Posts: 59
  • Love 3D !
    • View Profile
    • Paulo's web site : 3D art with Anim8or
Re: VRML
« Reply #5 on: January 21, 2010, 03:48:36 pm »

nobody could help me ? :(
Logged
Paulo, French 3D Maker




My VRML exporter for anim8or : http://www.anim8or.com/smf/index.php?topic=3168.0

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: VRML
« Reply #6 on: January 21, 2010, 05:33:58 pm »

Have you bothered looking at the ASL tutorial list in this board? Technically a "hello world" tutorial isn't useful at all in this setting, just follow one of the tutorials out there step by step and read the references until you get results. If you have no prior experience with scripting, start small!
Logged

Paulo

  • Jr. Member
  • **
  • Posts: 59
  • Love 3D !
    • View Profile
    • Paulo's web site : 3D art with Anim8or
Re: VRML
« Reply #7 on: January 22, 2010, 03:12:31 pm »

I read ASL specifications and the two tutorials. But I didn't find how to create my own function ! Then I think I'll be able to format the string as I want. My exporter is nearly ready to be released ;)
Logged
Paulo, French 3D Maker




My VRML exporter for anim8or : http://www.anim8or.com/smf/index.php?topic=3168.0

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: VRML
« Reply #8 on: January 22, 2010, 05:04:45 pm »

I don't think you can make your own functions. You'll have to be creative with for and while loops. I'm sure you can do it! I worked on my own export script a while back and it wasn't that hard to work around the limitations! (reminds me that I should go back to it sometime...)
Logged

Paulo

  • Jr. Member
  • **
  • Posts: 59
  • Love 3D !
    • View Profile
    • Paulo's web site : 3D art with Anim8or
Re: VRML
« Reply #9 on: January 23, 2010, 03:40:35 pm »

That is ok, this is the code I made (it's simple, but it can be useful for a beginner) :

Code: [Select]
$s=$shape.name;
for $ii = 0 to ($s.length() - 1) do {
if ($s.GetChar($ii) == 32)     {
$s=$s.SetChar(95, $ii);
}
}
My exporter works fine, but I'm going to improve it a litle bit :)
Logged
Paulo, French 3D Maker




My VRML exporter for anim8or : http://www.anim8or.com/smf/index.php?topic=3168.0

Paulo

  • Jr. Member
  • **
  • Posts: 59
  • Love 3D !
    • View Profile
    • Paulo's web site : 3D art with Anim8or
Re: VRML
« Reply #10 on: January 24, 2010, 11:36:53 am »

I use this code :

if ($attribute.GetType() == 6) {

But Anim8or console says : undefined member reference 'GetType'
Strange... what is wrong ?
Logged
Paulo, French 3D Maker




My VRML exporter for anim8or : http://www.anim8or.com/smf/index.php?topic=3168.0

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: VRML
« Reply #11 on: January 24, 2010, 12:13:39 pm »

Sorry but I don't remember ever getting that one to work. You'll just have to assume an attribute is the right type before you work with it. You can use GetStringValue() to make sure you're capturing a string. If it returns 0 then that means it's not a string. Or at least that's how it's supposed to work...
Logged

Paulo

  • Jr. Member
  • **
  • Posts: 59
  • Love 3D !
    • View Profile
    • Paulo's web site : 3D art with Anim8or
Re: VRML
« Reply #12 on: January 25, 2010, 01:48:03 pm »

It bothers me but I removed this verification step... GetType function doesn't seem working, maybe it's a bug !

I have a big question :

How to separate (cut) an object with several materials into several objects with only one material ?

And a small question :

Is it possible to make some alert dialog box ?

(after that, my exporter will be perfect !! ;D)
« Last Edit: January 25, 2010, 04:10:02 pm by Paulo »
Logged
Paulo, French 3D Maker




My VRML exporter for anim8or : http://www.anim8or.com/smf/index.php?topic=3168.0

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: VRML
« Reply #13 on: January 25, 2010, 11:16:27 pm »

I don't think there's an alert function.

As for separating meshes by materials, you could try looping through the GetFaceMaterialIndex() per face to differentiate between faces that have different materials, and then export accordingly. Just look through the scripting reference to see what you can do.
Logged

Paulo

  • Jr. Member
  • **
  • Posts: 59
  • Love 3D !
    • View Profile
    • Paulo's web site : 3D art with Anim8or
Re: VRML
« Reply #14 on: January 27, 2010, 02:22:03 pm »

I succeeded in making a kind of alert like this :
Code: [Select]
file $alert;

if ($ext=="bmp"){
            $alert.open("$console", "w");
            $alert.print("\n\nWARNING :\n---------\nSome bitmap textures are used in : %s \nVRML doesn't support this file format for textures.\n\n",$s);
            $alert.close();
          }

Now I'm coding the separation of meshes by materials. The end is near :)
Logged
Paulo, French 3D Maker




My VRML exporter for anim8or : http://www.anim8or.com/smf/index.php?topic=3168.0
Pages: [1] 2