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.

AppGameKit Classic Chat / How to apply a Light Map?

Author
Message
Tobias_Ripper
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: REPCONN inc.
Posted: 17th Nov 2015 22:15 Edited at: 17th Nov 2015 22:41
I would like to achieve an eliminating effect of a sprite on a 3D object. The "SetObjectMeshLightMap" is supposed to be used to achieve this effect, however I am having a hard time applying it over my mesh.

I am not using any shaders as per the commands instructions, here are the files.
I have included a project file with absolutely nothing but the essentials loaded in and positioned, everything commented out and organized.

The effect I am trying to achieve is the eliminating of some elements of a texture like lights, lamps, displays etc. This feature was fairly straight forward to set up in FPS Creator way back when. but with AppGameKit there seems to be some specific process to achieve this.
Eisenstadt Studio: Eisenstadtstudio.com
Composers Page: Milesthatch.net

Attachments

Login to view attachments
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 17th Nov 2015 23:50
The lightmap command requires the object to have a second set of UVs for the lightmap texture. I'll modify the next version to use the first set of UVs for the lightmap if a second set doesn't exist, but for now you'll have to use a custom shader to do this.
Tobias_Ripper
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: REPCONN inc.
Posted: 18th Nov 2015 00:04 Edited at: 18th Nov 2015 00:06
Does creating a second set of UVs in the 3D modeling program apply?

[Maya] I'm able to create a second UV set for the model, even copying the first one used to texture the object so that the uv coordinates matched. Or do you refer to some other process of creating a second uv set?

If this won't do for a solution (as I'm testing it right now) any idea when this next version feature might go live?

PS the command help documentation did say that the default shader utilized the light-maps. I am inexperienced in shader coding and can barely get existing ones to fly right so hopefully this 2nd uv set solution might work.


Thank you.
Eisenstadt Studio: Eisenstadtstudio.com
Composers Page: Milesthatch.net
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 18th Nov 2015 01:23
If you can create a second UV layer that will work, but unfortunately the .OBJ file format doesn't support multiple UV layers, try exporting as .X as see if that works.
Tobias_Ripper
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: REPCONN inc.
Posted: 18th Nov 2015 02:45 Edited at: 18th Nov 2015 04:09
Ah well unfortunately Maya does not natively support .X export and many plugins / resources/ scripts have been dropped by their creators years ago.

I got access to max 2012 with kW X Exporter. I've transferred my model to Max and confirmed that it did indeed contain 2 UV maps. I've attached it in here too.

After this as far as I understand, all that needs to be done is use SetObjectLightMap(object id,sprite id)

So far, nada. I will continue experimenting wit the options.
Eisenstadt Studio: Eisenstadtstudio.com
Composers Page: Milesthatch.net

Attachments

Login to view attachments
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 18th Nov 2015 08:24
You can export in collada (.dae) too. It work for model with 2 UVlayers. I'll do that for the model I have which use a lightmap.
http://www.dracaena-studio.com

Login to post a reply

Server time is: 2024-11-17 00:46:51
Your offset time is: 2024-11-17 00:46:51