Jump to content
Daspex

WIP Videos

Recommended Posts

2 hours ago, Jo 12 said:

unfortunately the doors cant be opened. 😣

BTW. You could create a car which includes opened doors/door and open/close  the door/doors with two different active mod variants like its be done with the Fury car.

Thanks to Vascosnts for the information.

Link to post

Texture Animation (WIP)

 

simulates movement by manipulating the UV map that defines how an object is "wrapped" by a texture.

It is remarkably easy to setup - the game engine takes care of all the hard work - and results in a nice smooth animation.  

 

 

Of course this is just a very basic "proof of concept" animation but you can do some very cool things with this technique.

Advertising billboards, computer screens, digital clocks, speedometers (talking to you Daspex!)...

 

As far as i know, Room293 "Bar Bee's" by Berger is the only add-on room that uses texture animation. A lot of it, in various ways and to great effect!

Another example is the Backstage room where it is used to display a number of images on the monitor screens.

But i never got around to try it myself until today. So many ideas, so little time... ;)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Link to post
2 hours ago, Daspex said:

Finaly! Thats a great finding.Have to check that out at once.... :)

to be clear: i didnt invent or discover it. I only figured out how to use it myself by looking at the code used in other rooms. So the credit goes to the company that shall remain nameless ;)

 

But as you know, animation code is usually very room-specific, quite complicated and hard to just copy & paste. I just never got around to do an experiment but now i needed to find out for something i'm working on.

 

 

 

 

 

 

Link to post
11 minutes ago, Marburg said:

to be clear: i didnt invent or discover it. I only figured out how to use it myself by looking at the code used in other rooms. So the credit to the company that shall remain nameless ;)

 

But as you know, animation code is usually very room-specific, quite complicated and hard to just copy & paste. I just never got around to do an experiment but now i needed to find out for something i'm working on.

 

 

 

 

 

 

Respect man! This is really complicated stuff,except berger idk anyone who did something like this before. :)

Link to post

Alarm Clock Demo

 

A short clip to demonstrate the possibilities of texture animation.

 

Please note that the hour digits are running MUCH faster so I didnt have to wait 24 hours to test the algorithm!

Also note that the texture used for the digits is a bit rough... not every digit is properly centred.

 

Link to post
24 minutes ago, Marburg said:

Alarm Clock Demo

 

A short clip to demonstrate the possibilities of texture animation.

 

Please note that the hour digits are running MUCH faster so I didnt have to wait 24 hours to test the algorithm!

Also note that the texture used for the digits is a bit rough... not every digit is properly centred.

 

 

clock_demo.mpg 4.98 MB · 0 downloads

 

Planning to do os.time()?

Link to post
23 minutes ago, EJAX said:

 

Planning to do os.time()?

not now... I still got a headache from figuring this one out ;)

 

Actually i have already been thinking about that of course.

But the problem is that this is no real clock; what you see are six independent animations that just keep rolling forever according to a pre-programmed pattern.

The digits are not aware of each other and do not use a variable to hold their current value.

That also means there's no mechanism to forward the clock or set a particular start time.

The game engine timer takes care of the animations and if you feed it the right parameters, the digits look to be in sync. But they're not.

 

Of course you could (re) write all the animation code "on the fly" in an update.lua scenario but that would not be a trivial task.

And by the time the update is done, your clock is off by a couple of seconds LOL

 

Damn you! Now i feel challenged :)

 

 

 

 

 

 

Link to post
8 minutes ago, Marburg said:

Damn you! Now i feel challenged :)

 

You just need to assign the mip coordinates to the HH:MM:SS values. I'm sure it's doable in lua, but it would take me a month of google searches. :)

Link to post
27 minutes ago, Marburg said:

...what you see are six independent animations that just keep rolling forever according to a pre-programmed pattern.

 

 

Is there a way to attach this to character meshes? I'm thinking blowing hair, clothes, etc....

Link to post
On 4/28/2021 at 9:44 PM, EJAX said:

You just need to assign the mip coordinates to the HH:MM:SS values. I'm sure it's doable in lua, but it would take me a month of google searches. :)

yep, that's right. i came to the same conclusion... all the KeyTime values etc can remain exactly the same.

 

already started working on it and i figured out how to do it.

I got it working for one digit, the rest is just copy & paste ;)

it's not that hard or a lot of code, i misjudged the complexity.

 

Quote

Is there a way to attach this to character meshes? I'm thinking blowing hair, clothes, etc....

I know you can use animation in toys but clothes are a different kettle of fish.

I suppose you could shoehorn some animation code into a cloth scene script but i'm not sure if there's an equivalent framework for the animation objects you declare in AcRoom and AvRoom.

 

UPDATE

ran into a small problem... unfortunately, all update.lua scripts are executed when the game starts up; long before the room gets loaded. So you can never get the exact time on the clock. But... you can get close enough and hours & minutes will probably be correct. solution: dont display the seconds and Bob's your uncle.

 

UPDATE 2

The update.lua script is indeed evaluated at start-up, but it doesn't come into action until the room scene file is loaded. Which makes sense if you think about it. Update.lua gets loaded and evaluated, the scene file gets "tagged" and when it is loaded, the updating occurs. Havent been able to determine yet if the  update script runs the rest of the code prior to the room scene loading and caches the output until it does OR if it runs everything as the room is loaded.

 

UPDATE 3

Bad news. Because update.lua runs in "sandbox mode", the os.date() function is not available. I can get the epoch timestamp with os.time() but there is no reliable way to convert that to a valid HH:MM:SS value without the os.date() function. os.date() automatically adjusts for local timezone and Daylight Savings Time. But you can't get the local timezone or DST setting without calling the os.date() function.

 

My clock setting code relies on getting the correct local time of course. So i'm stuck between a rock and a hard place. Use UTC time - now off by 2 hours from "my" time - or abandon the project.

 

Minor Update: i've decided to go ahead and add TimeZone and Daylight Savings Time variables the end user can easily change if needed. This way i can do my own UTC to localtime conversion without using the missing os.date() function. Problem partially solved ;)

 

FINAL WORD

After all that trouble, i've run into a real massive concrete roadblock.

 

Imagine the current time is 00:15

I can set the digits to the correct position and let them roll as before.

However after 5 minutes, when the last digit rolls over to 0 you expect the next digit to change from 1 to 2.

But that will take 10 minutes instead because that is the update frequency of the minutes decade counter animation.

The timing of the animation frames has to corrected ( new time = old time - ( previous digit value * previous digit step length ) )

 

Problem is that I can adjust the timing of all animation frames EXCEPT the first frame which always starts at time 0 (you can't have a negative start time).

See the problem? The roll-over of the digits will be out of sync unless they all start from 0.

So i can either set the correct time and screw up the roll-overs of all the digits OR i can set the clock to 00:00 and have it run correctly.

 

Conclusion: the ultimate goal - a realtime clock synced to local system time - has not been reached.

But I've learned a few new tricks and had some fun so it was time well spent

 

Homework Assignment: determine the time of day and change around other things in a room.

Like use a nighttime skydome and close the curtains after 20:00  or update a wall calendar to show the correct month and date.

 

 

Link to post

The old amusement arcade! A magnet for spotty young boys like myself. Full of the latest amazing games and a cesspool of sin, crime and other teenage kicks ;)

 

 

The PacMan animated screen uses a 4096 x 4096 pixel texture with 16 by 16 cells of 256x256 pixels each.

A 256x256 viewport is moved along the texture, one cell at a time in flip-book style without scrolling

 

Full credit to MarkNimrod2 for the image in the middle screen. 

 

Link to post

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...