Jim Adams .X loader - exporting binary from 3ds max

Started by
3 comments, last by darkm00n 18 years, 11 months ago
Hey all, I'm exporting .X file format meshes from 3DS Max, using the directx plugin. I'm using the 'binary' mode, so I assume that the textures are packaged into the actual .X file. (If i'm wrong, please feel free to tell me :) Anyhow, I'm trying to load them using the ParseXFile loader functions from Jim Adam's 'RPG Programming for DirectX'. Anyhow, it's not showing the textures. I've tried putting the textures in the texture path that i've indicated to the .X functions, but this isn't working. Maybe the texture names are too long? Or is because the binary format need sto be handled differently? Thanks muchly, Rob
"Cause I''m a creep.. I''m a wierdo.."- Radiohead
Advertisement
Ok, I've found my problem - I'm outputing the filename's that are
coming from the skinned mesh - they're all absolute pathnames,
not relative ones.

i.e.
F:\Hellsing\alucard88.jpg

Is there any way I could make them relative pathnames when exporting
them from Max? I could just scan for the last \ in the pathname and
crop from there to the end, but it'd be easier if I could specify it in MAX.

Thanks muchly,
Rob
From the MaxScript Reference

getFilenameFile <filename_string>
Returns the file name part of a full file name.

filenameFromPath <filename_string>
Returns the file name and extension of a full file name, useful for labeling file buttons in rollout panels.

getFilenamePath <filename_string>
Returns the directory path part of a full file name.


[EDIT] now that I re-read your question I'm not sure if those will actually help you...I thought you were writing your own maxscript .X exporter. You are probably better off just searching for the last '\\' character like you said.
moe.ron
Yep, am using PathStripPath to do it (might try and use c functions later,
but this windows-based function seeems to work fine).

One other question for anyone looking at this thread - i've currently set:
d3dpp.FullScreen_PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT
I've also tried with D3DPRESENT_INTERVAL_ONE.

These are supposed to make sure V-Sync is enabled, yes? I'm still getting
tearing in my program, whenever I turn around (even though the frame rate
is up around 800 or so (just a demo program with few meshes for now)).

Am I missing something?


I'm also getting some gaps in my mesh, even though I've wrapped a texture
around it. When I say 'gaps', what I mean is that I can see gray pixels
through the underside of the mesh. Could this mean that my texture has
some pixels missing or is it a problem with the mesh?

Pictures can be provided upon request :)

Oh.. and also.. what do you all use to take screenshots in a game?
I've tried print screen but i often get lower-colour resolution pictures.
It used to work.. back in 95 :)

Thanks a bunch,
ROb

Additional: I tried to viewing the mesh with MView, but couldn't see the
pixelation that has manifested itself in the program.. hmm
"Cause I''m a creep.. I''m a wierdo.."- Radiohead

This topic is closed to new replies.

Advertisement