fun with .pso

More
18 years 5 months ago #14234 by Jasper
Replied by Jasper on topic fun with .pso

Originally posted by GrandpaTrout

If I understand this quote, then you are saying that the Flux engine itself uses "standard" UV mapping? It is just that the PS model team created the models in Lightwave 5.6 and so the converter was designed around the 5.6 texture mapping.


yes, DirectX uses per vertex uv co-ords to do texture mapping, since lightwave 5.6 can't generate them, PS wrote converter.exe to generate them.

Would this mean that a new converter could be written to take UV mapped models directly? Bypassing the need to work around or "patch" the textures back in? My reason for asking is that Lightwave 5.6 is hard for people to get. And lightwave itself is very expensive. But there are many lightwave format compatable tools in existance.


Yes, very much so :)

which is why i was asking for a LWO2 format .lwo with uv maped textures, firstly to check that my pso -> LWO2 converter was converting the uv maps properly, and 2ndly to start on a lwo2 -> pso converter.

---
If there is hope it lies with the demo scene.
PSO and FTEX tools: pointless.net/eoc/

Please Log in or Create an account to join the conversation.

More
18 years 5 months ago #14235 by Jasper
Replied by Jasper on topic fun with .pso

Originally posted by Second Chance

If that's the case, I'll do you one better.

Jasper, do you understand the pso file format well enough to write a converter that can take a .3ds model with UV mapping and convert it? That would eliminate the need for Lightwave altogether and allow people to make models with vitually any 3D package, even free ones.

mailto:second_chance@cox.net


There is a nice looking 3ds library for python called dice3ds:

www.aerojockey.com/software/dice3ds/

Which i've been looking at, but I want to sort out pso -> lwo2 first and double check the last few bits i don't understand in .pso files.

---
If there is hope it lies with the demo scene.
PSO and FTEX tools: pointless.net/eoc/

Please Log in or Create an account to join the conversation.

More
18 years 5 months ago #14238 by Second Chance
Replied by Second Chance on topic fun with .pso

If that's the case, I'll do you one better.

Jasper, do you understand the pso file format well enough to write a converter that can take a .3ds model with UV mapping and convert it? That would eliminate the need for Lightwave altogether and allow people to make models with vitually any 3D package, even free ones.

Duh, I is smart! I just realized that rather than doing GT one better, I just basically repeated exactly what he already said.

1. Open mouth.
2. Insert foot.

Anyway. I say 3ds because it's the most commonly used 3d model format on the planet. Virtually every 3d package made has a native exporter for 3ds files, so I thought it would be a good candidate.

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos
.

Please Log in or Create an account to join the conversation.

More
18 years 5 months ago #14247 by Jasper
Replied by Jasper on topic fun with .pso
Ok, new version up:

pointless.net/eoc/psotools.zip


psotextool.exe - same as before

lwo-info.exe - prints info about "LWOB" format .lwo files

lwo2-info.exe - prints loads of info about "LWO2" format .lwo files may misbehave on complicated .lwo files, examples sought

pso2lwo.exe - converts a .pso to a "LWOB" format .lwo, only mesh and basic surface info is converted

pso2lwo2.exe - converts a .pso to a "LWO2" format .lwo, uv co-ords for the diffuse texture are converted, textures file names are the same, but the extention is changed to .iff, (it dosn't do any texture conversion, you'll have to do it yourself). The output has been tested in Blender (which is the best LWO2 format reader i can find, wings3d & bcview ignore textures, anima8or dosn't like LWO2 files), however:

The first (?) few poly of each surface have the texture co-ords mangled, dunno if thats me or the Blender .lwo importer (i didn't have this problem with OpenGL).

Texture colours came out very wierd, i'm not sure if this is cos Blender is mixing the surface colours with the texture, or that somewhere in the texture conversion something read a texture as BGR instead of RGB or visa-versa

It's possible that any text in textures will appear mirrored, DirectX has the v co-ord flipped compared to lightwave & OpenGL so i flip it back.

Feedback activly solicited!

---
If there is hope it lies with the demo scene.
PSO and FTEX tools: pointless.net/eoc/

Please Log in or Create an account to join the conversation.

More
18 years 5 months ago #14251 by Second Chance
Replied by Second Chance on topic fun with .pso
Cool, I'd like to give these a try.

Could you elaborate on what's included in "basic surface info"? And what's missing.

I had a thought about the colors. An interesting thing about LW is that the color initially applied to the polygons in Modeler is chosen outside of the surface editor. In later versions of LW it does represent the diffuse color in the surface editor, but I don't know if this is the case in earlier versions. Since in the early LW versions you could not edit surface properties in Modeler (apparently), although that is where you determined and named the surface. You'll have to ask Shane or someone with 5.6. Maybe this has something to do with the trouble?

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos
.

Please Log in or Create an account to join the conversation.

More
18 years 5 months ago #14256 by Jasper
Replied by Jasper on topic fun with .pso

Originally posted by Second Chance

Cool, I'd like to give these a try.

Could you elaborate on what's included in "basic surface info"? And what's missing.


Surface colour, transparancy (if present), specular (shinyness). thats about it i think.

Missing would be:

luminosity value (i.e. how much the glow map uses (I'm not sure if it's actually in the .pso's)).

the texture for the diffuse texture map, and the uv co-ords for it (if present).
same for the spec map.
same for the glow map.

Each of the possible 3 texture slots in the SHDR chunk of each surface in a .pso has a 16 bit value associated with it.

I think it may just be a straight copy of the LWOB FLAG chunk


I had a thought about the colors. An interesting thing about LW is that the color initially applied to the polygons in Modeler is chosen outside of the surface editor. In later versions of LW it does represent the diffuse color in the surface editor, but I don't know if this is the case in earlier versions. Since in the early LW versions you could not edit surface properties in Modeler (apparently), although that is where you determined and named the surface. You'll have to ask Shane or someone with 5.6. Maybe this has something to do with the trouble?

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos

.


---
If there is hope it lies with the demo scene.
PSO and FTEX tools: pointless.net/eoc/

Please Log in or Create an account to join the conversation.