Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 2nd Jan 2019 19:10
Hi there. Between project and project I have to take a break . In the meanwhile not to get bored I did this curious snippet .It could be fine for the telescope of a rifle or for the mirror of a car in a racing game . I hope you finde it useful .



Cheer.
I'm not a grumpy grandpa
puzzler2018
User Banned
Posted: 2nd Jan 2019 19:15
Oh my word --- Dammmm thats very clever indeed..

Thanks chafari - im sure it will definately come into some use for many of us..

Thanks

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 2nd Jan 2019 19:18
You are welcome... enjoy it !
I'm not a grumpy grandpa
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 2nd Jan 2019 19:37
Nice trickery Chafari
what clever code is all about
fubar
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 2nd Jan 2019 19:43
@fubarpk Thanks ...just now I'm writing an example with a mirror...I'm coming soon .
I'm not a grumpy grandpa
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 3rd Jan 2019 13:12
I think render to image fits better here:

Just use SetRenderToImage instead of GetImage and change the FOV accordingly to the RenderImage size, still pretty clever way you used SetObjectLightMap... I like that
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 3rd Jan 2019 15:19
@janbo Thanks. I'm still learning all Agk commands.
I'm not a grumpy grandpa
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 10th Jan 2019 01:02 Edited at: 10th Jan 2019 18:25
Wow, good stuff chafari.

Was already impressed by the mirror stuff and took me a little while to understand what was going on here, for didn't know the commands, but it's really making clever usage of the lightmap command to introduce multi-texturing / filtering. It really works nicely for the car indeed, so put it on there:


[EDIT: added code]

main.agc (from: Very simple kart physics)
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 10th Jan 2019 14:07
@Rick Nasher Thanks for testing . I'm glad you find it useful .
I'm not a grumpy grandpa
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 10th Jan 2019 18:22
Absolutely, many thanks for sharing. I've added the code for those interested in above post.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 11th Jan 2019 09:23
Great Piece of Code Chafari
Nice Addition Rick Nasher
fubar

Login to post a reply

Server time is: 2024-11-23 09:02:37
Your offset time is: 2024-11-23 09:02:37