LightWave 2 ShockWave Tutorials


#1

1 - Scripting (basic Lingo scripting)
2 - Modeling and setup for bones animation
2.2 - Character bone setup for ShockWave3D
3 - Animating by code (rotate, move and scale things by keyboard input)
4 - Camera orbiting centerpoint
5 - Architectural walkthrough / collision script
6 - How to avoid Z-buffer fighting (geometry fighting for who is on top)
7 - Creating transparent textures in Photoshop for use in ShockWave3D
7b - Avoiding ghosted edges on transparent textures
8 - Using transparent textures to create trees and effects
9 - Additive glow effects
10 - Shader scripting (How to apply toon shader++)
11 - Multitexturing and lightmapping
12 - Communication between Flash and Director
13 - Realtime Havok physics
14 - Realtime particle effects

        - ... your suggestions are welcome! ...
   
        And ofcourse, example files in all formats.
   
        So, what do you want to learn first? [b]EDIT:[/b] Still send suggestions if you are not happy with the current order of the tutorials.

Anyway, this will be the thread I announce new tutorials and for you guys to submit suggestions and questions regarding them.

       Stuff you guys will be able to do in ShockWave3D after these tutorials:
   
   [img]http://petter.ms/forum/reflection-test3.jpg[/img]

#2

Thanks for your reply in my PM box, its great you are helping people like this. I cant wait to see what you got cooking and all, thanks allot, im eagerly waiting for the tutorials !

edit : My first question would be how to make it so you can walk around in a 3D environment, and if it can be a bit interactive as well with buttons , so that the 3D world servers as kind of a website thingy…


#3

Thanks for the request. I bumped the walkthrough-tutorial up as the 4th to be done. I believe bones animations and architectural walkthroughs are the most wanted ones, but a few others needs to be done first, such as basic scripting.

Any day now…


#4

Do you have any insights to workarounds for the HORRIBLE bone export(or import) of the w3d files?

No one talks about this much, but the bones do not play in Director anywhere close to what you export from Lightwave. Rotation turns into translation and other weirdness occurs, making all but useless for most people’s needs, especially character animators.

Mike


#5

Yes Mike, part 2 of the tutorials will feature a walking bi-ped, animated with bones. It is very simple really, most realtime engines have limitations / rules to bones animation, and especially ShockWave3D. If you follow these rules you will be fine:

  • Only one weightmap pr vertex
  • Only one bone pr weightmap
  • And a bone has to be assigned to a weightmap to affect the model

It does actually work, just dont use subpatched models or any advanced rigging and you will be fine. Btw, what version of LightWave have you been trying to do this in?

A full explanation will be given in tutorial 2, but first up is some basic knowledge of Director and scripting in Lingo… hopefully within a day or two


#6

This really has nothing to do with weightmaps. I know the rules you mentioned…

The problem lies with the animation of the bones. If something is rotated in LW and exported to w3d, it plays back in Director in a very weird way — instead of rotating, the bones will slide up and down. So in effect, rotation has turned into translation. I haven’t tried it recently, but I don’t believe a new plugin has been issued in a couple of years.

I’m looking forward to any wisdom your tutorials may shed on these problems – if they really do exist for anyone else but me.

Can someone please try this? Make a simple boned object in Layout and rotate a bone on its pitch or heading. Export a w3d. Import into Director. Play it. Does it do what I said or does, or does it play properly?

As I’ve stated before, this a problem I’ve known about for years, which has made me abandon Shock3d, but no one else has EVER said they have the problem…or even confirmed that it works for them. Can somebody out there please try this?

Mike


#7

It works and I will show you soon, with a downloadable lwo, lws, w3d, and dir file.


#8

Here you go people, the first tutorial is ready. I am waiting for LW [8] to arrive, and will create the bones tutorial as soon as I get it.

http://petter.ms/lw2sw/basics/


#9

Good news people. I just managed to control the transformation of a bone through code in Director (havent gotten into it before). What this means is ragdoll physics for seamless models animated with bones. Well that is the plan atleast, so dont shoot me if it does not work out at all, but so far very promising.

Usage: Create a walkcycle for a character, shoot it by throwing a box at it (or a force-vector) and the transparent rigid body proxies will take over the animation and apply the transformation of themselves, onto the bones :slight_smile:

This is going to be fun (well atleast for me :D) and a full tutorial with examples will be made ofcourse.


#10

Wow!! Thanks for the tutorials! I’m sure if everything goes to plan these are going to be refferred to for a long time to come by anyone planning on exporting to shockwave. :buttrock:


#11

:bounce:

By default, 3D applications export to ShockWave3D format with only 1 UV pr model. This is a problem when baking lights, and you dont want to use the same UV coords for both texture and lighting. I thought this was a limitation in the W3D format, but it turns out to be a limitation of the exporters. This means with a few lines of code, all models in a W3D scene can have lightmap uv coordinates applied in a blink, which again means very easy to setup architectural walkthroughs with baked radiosity.

Export one W3D containing all the models textured and ready for use, and export another W3D containing all the models but with the UV coordinates for the lightmap. A script such as this one, will then be able to apply the lightmap to the textured models.

Full tutorial will come ofcourse, I just had to post it straight away, since I just figured it out. It’s 1:50 in the morning, time to go to bed :slight_smile:

[img]http://petter.ms/forum/default-uv.png[/img]

[img]http://petter.ms/forum/modified-uv.png[/img]

Lingo code:

global scene, model1, model2
    
    on startMovie
      scene = member("uvtest")
      scene.resetWorld()
      scene.texture("texture1").renderFormat = #rgba8880
      scene.texture("texture1").quality = #high
      scene.texture("texture2").renderFormat = #rgba8880
      scene.texture("texture2").quality = #high
      scene.shader("material1").textureList[2] = \
    member("uvtest").shader("material2").textureList[1]
      scene.shader("material1").textureModeList[2] = #none
      scene.shader("material1").blendFunctionList[2] = #multiply
      model1 = scene.model("uvtest:Layer1")
      model2 = scene.model("uvtest:Layer2")
      model1.addModifier(#meshDeform)
      model2.addModifier(#meshDeform)
      model1.meshdeform.mesh[1].texturelayer.add()
      model2.meshdeform.mesh[1].texturelayer.add()
      model1.meshdeform.mesh[1].texturelayer[2].texturecoordinatelist = \
    model2.meshdeform.mesh[1].texturelayer[1].texturecoordinatelist
    end
    
    on exitFrame
      go the frame
    end

#12

sorry people, you are hereby allowed to slap me… it turned out to work because the 2 meshes was exported to have the same face and vertex index since they only have 2 polys each. For some reason, W3D files seems to get different vertex lists on exports, for some compression reason (same as JPEG files get artifacts).

I will have to look into this more, but I still have several other ways of doing this, and perhaps I will make a custom OBJ importer, to make sure the face and vertex list is the same for both models…


#13

Good news. I have managed to make an OBJ reader inside of Director, so now I have full controll over vertecies and uv-maps.

Also, my new computer and LightWave[8] is supposed to be here tomorrow :bounce:

The bones tutorials will be available soon…


#14

Here you go folks, my first video tutorial ever: Basic bone animation for ShockWave 3D

http://petter.ms/lw2sw/basic_bones/

Direct download of Flash file, 5.9 MB:
http://petter.ms/lw2sw/basic_bones/basic_bones.swf

Duration: 4 min. 16 sec.

Merry x-mas


#15

Part 2: Character bone animation for ShockWave 3D

  [img]http://petter.ms/lw2sw/character_anim/screenshot.gif[/img]

http://petter.ms/lw2sw/character_anim/

Direct download of Flash file, 10.9 MB:

http://petter.ms/lw2sw/character_anim/character_anim.swf

 Duration: 5 min. 38 sec.

Model and scene file:
http://petter.ms/lw2sw/character_anim/bones_anim.zip


#16

[b]The server where my domain is hosted is a bit unstable at the moment, but if you give it a few minutes, it will most likely work again.

[/b]1 - Scripting (basic Lingo scripting)
2 - Modeling and setup for bones animation
2.2 - Character bone setup for ShockWave3D


#17

I almost forgot to tell you guys… there is a set of predefined scripts you can drag and drop onto a W3D scene inside Director, and set parameters for it inside a GUI instead of going into the script.

Its only 29$ but also a free older version is available, check it out on:
http://www.chromelib.com/

Also, was the video tutorials with my croaky voice of any help? Not the voice that is, but the tutorials themselves?


#18

Hey Petter:

These tuts are great! Very helpfull!

And yes the voice ads alot :slight_smile:

Please keep them coming.

Cheers,


#19

Great vids…can’t wait to see the rest!


#20

petterms–

I just watched your “Modeling and setup for bones animation” tutorial. I found it very helpful. It was just the right material for me.

As usual when watching a tutorial, I stopped every so often and followed along in LightWave. Unless I am missing something, it is a little hard to stop, rewind a little, restart, in Flash. I often like to navigate a little forward and a little back to see something I missed or didn’t understand. Since it looks like you plan to put a lot of work into these tutorials (which I appreciate), you might consider using a different format than Flash.

Thanks again.

–Whit