PDA

View Full Version : Layout: points positions from generic lscript?



Tommi
06-21-2004, 03:51 AM
Hi there, I'm currently trying to write my own MD2 exporter script.
As I see for now, it got to be handled by two different scripts, one for the object's displacement, because that way you can gather the vertices information over time - and one generic script, that automatically "scrubs" the time line and creates the final output.

I want it to be more simple and elegant. Is there any way to gather the changing (animated) points positions of a selected object of a scene, from a generic lscript - just click "export MD2" and happy I am... :confused:

I hope you can help me, because I'm facing a very tough deadline...


thanks in advance!

Karmacop
06-21-2004, 10:04 PM
Just start up a preview in layout, that'll scrub the timeline for you.

Tommi
06-22-2004, 03:27 AM
Hmm.. that would solve one issue.. but I was more asking for a way to fetch the displaced points and poly infos from a generic lscript.


Or better: is there a way to send variables and data from one lscript to another, without dumping files?

GregMalick
07-06-2004, 05:50 PM
Originally posted by Tommi
is there a way to send variables and data from one lscript to another, without dumping files?
I'm only aware of using the registry to share data... but that's not too practical for thousands of points.

fortress
07-07-2004, 02:56 AM
tommi let me guess hl2 exporter
:)
i was working on something very similar for a bit
stop for a while now was having to much trouble exporting bones and animations correctly for hl2

anyway yes you can get point an poly info from a genric in layout with out the displacement plug in and you can share some data between scripts as well.

i havent done any data share yet but all the docs say it is possable and now in lw8 with the new ring thing should be easier.

one little problem is getting the normals in layout
i used a modified ver of normal baker to bake the normals to a custom vmap.
then in layout read tehm back out to export.

as far as getting point and poly info should just be

mypoly = myobject.polygon[];

then mypoly will contain a polygon id
make a simple for loop to go threw all the polys you can store them or get whatever info is needed from the mypoly object then including point id's for that polygon.

der_ton
07-22-2004, 08:19 AM
I'm planning on writing an exporter for a skeletal character animation format, too, but I'm not sure if a LScript is the right way to do it. Can you tell me the problems you encountered?
I'm still in the planning phase, and am concerned that there may be some things not possible in LScript that are "showstoppers". Like multiple uv coordinates for one vertex (discontinuous texturing), or getting the weights if they are not stored in VMaps. Please share some info and help me make a decision. :)

fortress
08-09-2004, 02:58 PM
the biggest thing i ran into was getting the point normal info
from layout

i never did figure out a way to do it from a gen script so instead i modified the normal baker script just a tad and did my exports in 2 parts bake the normals in modeler and look for the custom vmap in layout.

i started working on the animations exporting and ran into some issuse with the game engine and lw coord system so i stopped there for now.

but so far other then speed lscript seems to be able to do exports very well.