More material woes
6 messages in this thread
OK, now that we've resolved the answer to my question about gfx_mtl_name(),
here's a deeper question. How do I tell 3DS that I've added faces that
reference a given material number? When I "put faces", those face definitions
include a material number. When I "put faces", does 3DS scan what I'm sending
it, and register those materials as being part of the scene?
In other words, how do I make materials appear in the "get from scene" list?
I'll double-check this, but when I create geometry in the 3D Editor from my
PXP, I do not believe that those materials appear in the "get from scene" list,
and that explains the "no materials at all" behavior I saw with my
gfx_mtl_name() test program.
All this points to my larger plea, as expressed in several wish lists and bug
reports… I want to create geometry with material definitions, and because of
the 255 material limit, it would make most sense for me to attempt to match the
existing materials. Right now, I can't even read the attributes of the
materials in 3DS, much less create materials with attributes.
John,
Sounds familiar. I'd love to know if there's a way around that.
We had to force people to import a copy of the source object to get all the
materials "legally" into the Studio scene.
woe,
Don
I'm tempted to do it that way, too. There's so many obstacles for creating
models within IPAS. Fortunately, I have my own source code for writing 3DS
files, so I could just as easily create a full-blown .3DS file instead.
Prompting the user to load the file is rather clumsy. Like that commercial:
"You're the computer, *you* tell me where the file is."
So it sounds like you've been down this path? Any other pitfalls you can tell
me about?
John,
Actually things got easier for us w/ SDK3. We let the user
create the "shape" object, then we move it around. We were
reading .asc files, _and_ making the user import the object
to the scene. Now we just read the object in the scene,
no asc files, very easy to change source object materials for
the user. (happy day)
As far as creating new materials – big black goose egg.
If I had more time (ha!) I was going to play around with
a pxp or axp that created an state file which was read by
a custom sxp. The sxp would key off the state file and
vary the output colors accordingly. Theoretically (grin)
it should be fairly simple…..
Don
I didn't understand the second half of your message, especially the part about
"state files." What's your application do? What's in the "states" that you
save?
John,
Sorry, we have to save the positions/velocities/etc. from one frame
to the next. We stuff all that in a "state_file". I hope to be using the new
EXP_DONT_UNLOAD to bypass that. This was for flock,vortex and bubbles.
Don