FSIC Messageboard
  Tech Talk
  LOD Plugin for OPS

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   LOD Plugin for OPS
Bryan Russell
Pilot
posted 12-12- 06:03 AM     Click Here to See the Profile for Bryan Russell   Click Here to Email Bryan Russell     Edit/Delete Message   Reply w/Quote
I whipped up a LOD plugin for OPS.

For those that want it, it is at:

http://opstudio.webjump.com

or

http://people.smartchat.net.au/~bryan_rus/OPS
Please let me know if it has any problems


Bryan

IP: Logged

Spanky the Mad Dog
Pilot
posted 12-12- 10:19 AM     Click Here to See the Profile for Spanky the Mad Dog   Click Here to Email Spanky the Mad Dog     Edit/Delete Message   Reply w/Quote
Spanky here

I'm about to grab it and if this does in and out of OPS you are my GOD !! lol

thanks alot man

you keep this openplane stuff alive

------------------
-Seperated and independant halves of a genius super-organism who believe that no game will ever satisfy them completely.

IP: Logged

Michael
Pilot
posted 12-12- 04:13 PM     Click Here to See the Profile for Michael   Click Here to Email Michael     Edit/Delete Message   Reply w/Quote
And only last night I was gnashing my teeth and tearing my hair for want of this feature.

IP: Logged

Jaguar
Pilot
posted 12-12- 04:23 PM     Click Here to See the Profile for Jaguar   Click Here to Email Jaguar     Edit/Delete Message   Reply w/Quote
THANK YOU THANK YOU THANK YOU THANK YOU!!!! This will cut my development time down lots! thanks so much!

------------------
Cheers!
Jaguar
www.fshangar.com

IP: Logged

Spyder
Pilot
posted 12-12- 05:38 PM     Click Here to See the Profile for Spyder   Click Here to Email Spyder     Edit/Delete Message   Reply w/Quote
Hey Bryan, make a cool plugin for Multigen and you get your own copy free. Might be something to consider.

------------------


IP: Logged

Michael
Pilot
posted 12-12- 06:04 PM     Click Here to See the Profile for Michael   Click Here to Email Michael     Edit/Delete Message   Reply w/Quote
I'm a having a problem with this. It seems I can only add models by copying and pasting. Then I import a lod to replace the copied part. I always end up with the texture reference on the imported lod being replaced with the one of the pasted part.

How can I get around this?

IP: Logged

Bryan Russell
Pilot
posted 12-12- 06:23 PM     Click Here to See the Profile for Bryan Russell   Click Here to Email Bryan Russell     Edit/Delete Message   Reply w/Quote
Michael,

The way the OBJ plugin and the LOD plugin load texture ID's is a little different. Because the OBJ has support for a material library, the loaded SM file is scanned for a texture with the same name as the one assigned to a polygon in the imported mesh (or it creates a new one if it doesn't exist). This means that, if there is a material library, the LOD should always have the right texture on it, regardless of whether the texture even exists in the current file or not.

For LOD files, the only reference to the texture is a texture ID. So, if you export a LOD from a P51 that is using the main texture, and import it into a spit, the polygons in the LOD will probably use the main Spit texture (if it has the same ID).

The Imported mesh will only inherit the texture from the LOD it replaces when no texture can be derived from the imported File. In the LOD plugin it should always use the imported texture ID. The OBJ plugin will do generally this when there is no OBJ Material library present.

To checkout what’s happening, look at the LOD file you are importing and note the texture ID(s) assigned. Look at the textures for the loaded SM file, and see if the texture with the ID you noted in the LOD file is the one that is actually being applied or not.

How do you get around this? You will obviously need to add the texture you need into the SM file, and then change the LOD files texids to this new texture (mental note : add a "Add Texture" function )
How do you add a new texture? Either wait for me to get off my ass and add this feature or cut and paste a model that uses the texture you want (texture references are passed as texture file names for cut/copy/paste).

It is possible that I have done something wrong in there, so if you check all of this out and it still looks screwy then let me now and I'll have a closer look.


Bryan

IP: Logged

Michael
Pilot
posted 12-12- 06:49 PM     Click Here to See the Profile for Michael   Click Here to Email Michael     Edit/Delete Message   Reply w/Quote
I did add the texture file to the asc file before building the sm file and it appears in the OPS texture list as it should. Perhaps OPS doesn't like the flags assigned in the LOD (I really don't fully understand what the "flags" are). There are no other parts that use the texture - could that be the problem?

The root of my difficulty is that I have never been able to add a new model in AC3D; I just swap lods to create the new airplane bit by bit. The problem arise when I want to add something that was never there in any form. In AC3D I can't just merge the part with an existing one because it uses a unique texture.

IP: Logged

Bryan Russell
Pilot
posted 12-12- 07:22 PM     Click Here to See the Profile for Bryan Russell   Click Here to Email Bryan Russell     Edit/Delete Message   Reply w/Quote
OK, Check what TexID OPS thinks it is and use this for the LOD (double click on the texture to bring up the texture details). Note that if two textures have the same TexID, OPS will use the first texture in the list with the matching TexID.

IP: Logged

Michael
Pilot
posted 12-12- 07:40 PM     Click Here to See the Profile for Michael   Click Here to Email Michael     Edit/Delete Message   Reply w/Quote
The cause you suggest isn't the problem as I added the texture by changing the name of an existing one to the new one.

Anyway, I have now solved the problem by combining two struts to a single object and thus freeing one up for the wire I've been trying to add. The part now arrives in OPS and I just export it, change the texture references by hand in the lod file and import the LOD back into OPS. (I have a suspicion the problem is arising from adding a texture index number in AC3D that doesn't yet exist in the ASC file - what I ought to do is check the lod file out before using builder.) So I've got around the problem which may have nothing to do with your program.

Sorry, I seem to have wasted your time a bit with this.

IP: Logged

FarmerJoe
Pilot
posted 12-13- 04:34 AM     Click Here to See the Profile for FarmerJoe   Click Here to Email FarmerJoe     Edit/Delete Message   Reply w/Quote
Bryan...I tried to get your new plugin, but something is wrong with your site. I am gonna love this plugin.


yall take'd easy now
FarmerJoe

IP: Logged

Sv
Pilot
posted 12-13- 05:38 AM     Click Here to See the Profile for Sv   Click Here to Email Sv     Edit/Delete Message   Reply w/Quote
Bryan,

I am having problems with your LOD plug-in as well relating to textures:

If I import a LOD with a new texture ID, this ID is overwriten. I had a LOD with a texture ID of 4 open in OPS. I imported a LOD that was just like this LOD but had texture IDs of 4 on some polys and 26 on others. Both were valid texture IDs and showed up in the texture list. After I imported the new LOD all of the texture IDs were 4.

I am not sure what is happening. - Maybe the texture IDs of the LOD I am replacing are over-riding the new LOD's texture IDs.

I will send you more info as I test... Any ideas?

This plug-in will speed up dev much!!!

Also thanks for fixing the rotate key!!! So far very stable at Version 1!

------------------
-Sv =FC=

WWI in SDOE!


IP: Logged

Michael
Pilot
posted 12-13- 02:06 PM     Click Here to See the Profile for Michael   Click Here to Email Michael     Edit/Delete Message   Reply w/Quote
Sv:

I understood it was impossible to have more than one texture on a single lod. I don't why, but someone posted something to that effect some time ago.

I have now successfully imported another lod without anything screwing up with its texture, so generally I find the feature is working as advertised.

IP: Logged

FarmerJoe
Pilot
posted 12-13- 04:49 PM     Click Here to See the Profile for FarmerJoe   Click Here to Email FarmerJoe     Edit/Delete Message   Reply w/Quote
I haven't gotten to use the lod plugin yet, I really don't need it "yet". From using fsd2lod though, I noticed that is makes all the texindex numbers the same, i looked at hippie's code and sure enough it just takes one texindex# and puts it to all of them, I believe that it is the same way for the lod.ffp. Correct me if I am wrong Bryan =)

yall take'd easy now
FarmerJoe http://members.xoom.com/sdoesbeauts

IP: Logged

Bryan Russell
Pilot
posted 12-13- 06:06 PM     Click Here to See the Profile for Bryan Russell   Click Here to Email Bryan Russell     Edit/Delete Message   Reply w/Quote
Michael : You can define a texture per polygon, and I believe that this works OK.

SV : The way the plugins work (when importing) with textures is that if a valid texture ID (>0) for a LOD polygon is passed up to OPS then it will be used, other wise the texture ID of the first Polygon of the existing LOD is used. This also applys to flags and material.

The LOD plugin always sets the texture id to the one it reads from the file, so in theory it should always pass the right texture ID. Of course not every thing happens according to the theory so I'll have a peek at it tonight.

FarmerJoe : The export part of the LOD plugin (lod.ffp) should write out whatever texture ID was assigned in the LOD polygons loaded in OPS. This should be the same as that loaded from the SM file. Import is as above.

IP: Logged

Sv
Pilot
posted 12-13- 08:01 PM     Click Here to See the Profile for Sv   Click Here to Email Sv     Edit/Delete Message   Reply w/Quote
Thanks Bryan, I'll fool with it more too

Michael,

You can indeed have multiple textures per LOD. Just select the surface in question in AC3D and set the surface type (colored box). Then edit this surface and set the "shinniness" value to be the texture index you need. This will put this texture number next to this polygon in the LOD file. Works great!

What used to be hard to understand was mapping single textures across multiple polygons - even different parts of single textures to various polygons within a LOD - usualy in the name of "skinning." This is all easy to do now if you follow:
http://www.schoolmusic.com/chickencoop/se5a/v6/index.htm

This is info on how to texture map.

------------------
-Sv =FC=

WWI in SDOE!

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | Fighter Squadron Information Center

(This site Copyright (c) 1999 Inertia LLC)

Powered by Infopop www.infopop.com © 2000
Ultimate Bulletin Board 5.45c