PapaXpress wrote:What is it you are trying to do?
PapaXpress wrote:I have an idea about how to do this 3DC, but I am not sure if it would work.
The other way would be to make each visual element their own group and then turn them on/off in the LUA.
The first you would use an animated scenery blueprint, the second would be a scriptable scenery blueprint.
by DOM107 on Wed Mar 05, 2014 8:02 pm
Hello,
I see in the tutorial a specific part which is not processed by the exporter:
"Still in the material editor, scroll down to find the "UV Special Effects" area, and tick the "texture is animated" button. Also insert the correct number of frames for your animation in the area marked '#frames' (in our example this would be 4). Also choose a frame rate in the 'frames per second'. In our example we'll choose 2."
To upgrade the exporter, could you contact someone working with 3DSMax so that he creates a simple face with your animated texture and export it.
Then I would look at the created igs file.
-- set globals
-- assumes the first frame is named Frame_0
gNextFrame = 0;
-- the maximum number of frames, remember we are 0 based
-- so if there are ten frames then the last frame
-- would be Frame_9
MAX_FRAMES = 10;
-- number of seconds to wait till showing the next frame
INTERVAL_SEC = 10
-- initialize, always needed
function Initialise()
SetFrame( 0 );
end
-- update, always needed
function Update( time )
SetFrame( time );
end
-- this is where all the heavy lifting is done
function SetFrame( currTime )
-- loop through each frame every ten seconds
-- if the current time is 0 then we are initializing the model
if (math.mod(math.floor(currTime), INTERVAL_SEC) == 0 or currTime == 0) then
local index = 0;
while (index < MAX_FRAMES) do
-- if the frame is equal to the index then turn it on
if (index == gNextFrame) then
Call( "*:ActivateNode", "Frame_" .. index, 1 );
else -- turn the frame off
Call( "*:ActivateNode", "Frame_" .. index, 0 );
end
index = index + 1;
end
-- if we cycled through all the frames then reset to the first frame
if (gNextFrame < MAX_FRAMES) then
gNextFrame = gNextFrame + 1;
else
gNextFrame = 0;
end
end
end
Users browsing this forum: No registered users and 0 guests