environment maps dont work on animated models?
by Dr. John Nobody · in Torque Game Engine · 06/16/2003 (6:51 pm) · 42 replies
hey, I've made a number of animated models that lose their environment mapping once animated, whats the deal?
#2
Models can have env mapping and be animated at the same time, so your problem is something else.
06/16/2003 (8:34 pm)
So you expect to get an answer in 1 hour?Models can have env mapping and be animated at the same time, so your problem is something else.
#3
thanks for responding Xavier
EDIT: sorry if I offended anyone with my shameless bumping
06/16/2003 (8:41 pm)
no I dont expect to get an answer in one hour, but I've come to realise that if I bump the hell outa my posts they usualy get answered faster, and I have several models that have animations attached to and scripts made to allow the animations to play. When I put the object in my mission as a static shape it has environment mapping, when I put it in as a shape (animated) its environment map does not work. This has happened with every model which I have both animations and environment maps for, are you sure its something else? Is there something special I have to do with environment mappings to get them to display on animated models?thanks for responding Xavier
EDIT: sorry if I offended anyone with my shameless bumping
#4
06/16/2003 (8:56 pm)
Not very sure, but look at the player model in torque. It has environment mapping and .. of course.. it animates.
#5
06/16/2003 (8:57 pm)
oh yeah, I've got environment mapping working on animated characters, I'm talking about regular models
#6

EDIT: just so things are clear, this is the same .dts file being displayed on the right as a static shape and on the left having a script to run its animation
06/16/2003 (9:04 pm)
a little visal aid never hurt :)
EDIT: just so things are clear, this is the same .dts file being displayed on the right as a static shape and on the left having a script to run its animation
#7
I decided to see if I could see anything for ya.
and what I found is ShapeBase uses only a few determining factors, to decide whether or not to apply the map.
1.) Cloak Level , Must be 0 for the Map to show.
2.) the Environment Map Exists.
3.) Datablock must have value in emap member.
4.) Global Env Maps are Enabled.
so .. sorry not to help but as far as I can tell there should be no problem animating
a model with this map applied.
the code looks like this:
Pass afore mentioned tests.
Apply Map based on test's
Setup State to render model (fog, transforms)
Animate
Render
Disable Environment map.
*shrug*
I've been wrong before.
there could be some underlying factors I missed.
But I dont think there should be.
Maybe somehow emap member gets turned off and you need to re-enable it for this obj.
Edit:
added bold, changed last sentence
06/16/2003 (11:01 pm)
Such a Nice Clock :)I decided to see if I could see anything for ya.
and what I found is ShapeBase uses only a few determining factors, to decide whether or not to apply the map.
1.) Cloak Level , Must be 0 for the Map to show.
2.) the Environment Map Exists.
3.) Datablock must have value in emap member.
4.) Global Env Maps are Enabled.
so .. sorry not to help but as far as I can tell there should be no problem animating
a model with this map applied.
the code looks like this:
Pass afore mentioned tests.
Apply Map based on test's
Setup State to render model (fog, transforms)
Animate
Render
Disable Environment map.
*shrug*
I've been wrong before.
there could be some underlying factors I missed.
But I dont think there should be.
Maybe somehow emap member gets turned off and you need to re-enable it for this obj.
Edit:
added bold, changed last sentence
#8
thanks for all your help badguy
06/16/2003 (11:08 pm)
your gonna have to change your name to Niceguy, thanks for checking things out for me. Thats weird that it should be working... luckily the only thing that moves is that spinny thing on the bottom, so I guess I'll just make two separate objects, the clock and that spinny thing and just animate the spinny thing, its kinda sloppy but it should get the job done :) thanks for all your help badguy
#10
looks like I spoke to soon, apparantly I dont know how to do that... I thought you could just write the objects name in the console with the .dump() function call on it... but nope
a little help?
06/16/2003 (11:12 pm)
hmmm I didnt even think to, i'll check that right nowlooks like I spoke to soon, apparantly I dont know how to do that... I thought you could just write the objects name in the console with the .dump() function call on it... but nope
a little help?
#11
so press F11 and either select the obj to read right lower pane info (F3?)
or just look at it and get the id,
type:
idval.dump();
right there in console.
:)
06/16/2003 (11:22 pm)
sure get the obj id by using the editor,so press F11 and either select the obj to read right lower pane info (F3?)
or just look at it and get the id,
type:
idval.dump();
right there in console.
:)
#12
06/16/2003 (11:30 pm)
oh man, after a few semesters of comp sci you'd think I'd learn my lesson about forgetting to put commas at the end of things (thats why I couldnt get dump to work) but anyway, I couldnt find any variables or functions for environment mapping, but I did find a cool function called setinvincible or something... oh boy, looks like Isotope X's got a new power up!
#13
ok so without running the app and working from memory here.
this is a Datablock value,
so you need to get the datablock from the obj,
which according to my thought should be of type ShapeBaseData
there Is a emap variable exported (referencing the code)
when you dump the obj you should be able to find the datablock
..
or wait no there is %obj.getDataBlock().dump();
Edit:
double checked it yup.
06/16/2003 (11:35 pm)
:)ok so without running the app and working from memory here.
this is a Datablock value,
so you need to get the datablock from the obj,
which according to my thought should be of type ShapeBaseData
there Is a emap variable exported (referencing the code)
when you dump the obj you should be able to find the datablock
..
or wait no there is %obj.getDataBlock().dump();
Edit:
double checked it yup.
#14
06/16/2003 (11:38 pm)
ah there we go, ya, I got the datablock, looks like emap = "0"... that bad?
#18
06/17/2003 (4:11 pm)
*sigh*
#19
06/17/2003 (4:13 pm)
why the sigh big X?
#20
I must remark that badguy did mention the emap thing the first time... and i thought emap was kinda obvious.. was just my thought
06/17/2003 (7:36 pm)
Because small lookovers are the worse bugs.I must remark that badguy did mention the emap thing the first time... and i thought emap was kinda obvious.. was just my thought
Torque Owner Dr. John Nobody