question about Train_Light_map _with_Diffuse. Fx

Fire up your 3D modelling tool and start building some rolling stock, or find out what others are previewing here. If you have questions about how to make the blueprints work or what names mean what in models, here's the place to find out your answers.

Moderator: Moderators

Locked
dogmouse
Getting the hang of things now
Posts: 73
Joined: Tue Jun 08, 2010 12:43 am
Contact:

question about Train_Light_map _with_Diffuse. Fx

Post by dogmouse »

I followed Derek's wonderful tutorial on his blog, using the Train_Light_map_with_diffuse shader, and it worked great!

My question is: What happens if I have more than one texture sheet for the same object?

Im just a little confused how the light map would work with more than one texture sheet?

...anybody?

Thank you,
Rich
User avatar
Irishrailguy
Very Active Forum Member
Posts: 1338
Joined: Sun Mar 21, 2010 8:58 pm
Location: Dublin, Ireland

Re: question about Train_Light_map _with_Diffuse. Fx

Post by Irishrailguy »

Are you saying that one object has multiple textures? If so, you can use material ID's and assign individual meshes or polygons within your object to different materials. Then you can make the necessary materials TrainLightMapWithDiffuse.fx materials without a problem. What software are you using? This is done differently in each program so it's necessary to say which one.

Kev
dogmouse
Getting the hang of things now
Posts: 73
Joined: Tue Jun 08, 2010 12:43 am
Contact:

Re: question about Train_Light_map _with_Diffuse. Fx

Post by dogmouse »

Oh! Sorry, Kev. I should have mentioned that Im using 3ds Max.

Let me try to clarify what Im asking.

Scenerio 1:
Let's say i've modeled a building structure. The building has one texture sheet (1024x1024) assigned to all of the polys to it. All good.
Now, let's say that i have a car modeled and parked next to the building. The car has its own separate texture sheet that is assigned to it, as well.
This "scene" with the building and car are all attached as one object before exporting to .igs

QUESTION 1: How do I go about getting the overall shadowing effect for the whole object using the Train light map shader?

Scenerio 2:
Let's say I've modeled a building that has two or more texture sheets assigned to it.
QUESTION 2: How do i go about getting the overall shadowing effect using the Train light map shader, when there are multiple textures assigned to the same object?

Any comments are greatly appreciated!

Thank you
Rich
User avatar
Irishrailguy
Very Active Forum Member
Posts: 1338
Joined: Sun Mar 21, 2010 8:58 pm
Location: Dublin, Ireland

Re: question about Train_Light_map _with_Diffuse. Fx

Post by Irishrailguy »

dogmouse wrote:Oh! Sorry, Kev. I should have mentioned that Im using 3ds Max.

Let me try to clarify what Im asking.

Scenerio 1:
Let's say i've modeled a building structure. The building has one texture sheet (1024x1024) assigned to all of the polys to it. All good.
Now, let's say that i have a car modeled and parked next to the building. The car has its own separate texture sheet that is assigned to it, as well.
This "scene" with the building and car are all attached as one object before exporting to .igs

QUESTION 1: How do I go about getting the overall shadowing effect for the whole object using the Train light map shader?

Scenerio 2:
Let's say I've modeled a building that has two or more texture sheets assigned to it.
QUESTION 2: How do i go about getting the overall shadowing effect using the Train light map shader, when there are multiple textures assigned to the same object?

Any comments are greatly appreciated!

Thank you
Rich
Ok, both scenarios can be solved using Material ID's and a Multi/Sub object material. A Multi/Sub object material is essentially a placeholder for as many materials you want to use in one set. This type of material has numbered slots for individual materials, you can remove/add as many as you want, and each slot can have a kuju shader in it, so if you want to have multiple shaders assigned to one object, use this. So if you want to use 2 materials in one object, you'll use 2 slots with a TrainLightMapWithDiffuse.fx shader in each. Then, go to your object and select the polygons that you want to use the material in the 1st slot you created. Scroll down the edit poly window on the right of the screen in poly sub object mode and find the section called Material ID's (above the smoothing groups section). Here there are 2 options, 'Select Material ID' and 'Set Material ID'.

So if you want a particular set of polygons to use the material in the 1st slot, you'll put '1' into the 'Set Material ID' box in the right hand window. But remember that all polys by default are set to 1, so select the polys that aren't going to use the 1st material slot and set them to the appropriate slot number. Then you need to go back to base object selection mode (not in a sub object selection mode) and assign your Multi/Sub object material to the entire object.

Now, the object you assigned the Multi/Sub object material to will apply the material in slot 1 to all polys with a Material ID of 1,slot 2 to a Material ID of 2 etc. If you assign the material to your object when your'e in a sub object (vertex/poly/edge etc.) selection mode, I find that the Material ID's are all reset to 0, so make sure your'e not in a sub object selection mode to save all the work you did.

If you're confused by all of this, please ask, I'll try to explain or provide a video.

Kev
dogmouse
Getting the hang of things now
Posts: 73
Joined: Tue Jun 08, 2010 12:43 am
Contact:

Re: question about Train_Light_map _with_Diffuse. Fx

Post by dogmouse »

Wow! Fantastic explanation, Kev. Thank you so much for taking the time to write that all out :) Im trying to wrap my head around it ...im gonna need to read it a few times, but i think i get the jist of it. Oddly enough...for as long as I have been using Max, i rarely multi/sub object materials....i know of them...and I'll see if I can be successful using your advice about it.

Thanks a million!
Appreciatively,

Rich
User avatar
Irishrailguy
Very Active Forum Member
Posts: 1338
Joined: Sun Mar 21, 2010 8:58 pm
Location: Dublin, Ireland

Re: question about Train_Light_map _with_Diffuse. Fx

Post by Irishrailguy »

dogmouse wrote:Wow! Fantastic explanation, Kev. Thank you so much for taking the time to write that all out :) Im trying to wrap my head around it ...im gonna need to read it a few times, but i think i get the jist of it. Oddly enough...for as long as I have been using Max, i rarely multi/sub object materials....i know of them...and I'll see if I can be successful using your advice about it.

Thanks a million!
Appreciatively,

Rich
No problem, I myself can't go without them, it mostly does good for scenes which have many materials, so I can group them together in one set instead of having each taking up a 'sphere' in the material editor. It's also great to use them on locos or other detailed objects, as you can then map multiple uv sets and create a texture for individual portions of one mesh or object. Allowing for more detailed textures on one object, instead of having to squash all faces into 1 uv space or detach individual meshes into different objects.

Kev
Kariban
Very Active Forum Member
Posts: 4478
Joined: Sun Nov 07, 2010 4:10 am

Re: question about Train_Light_map _with_Diffuse. Fx

Post by Kariban »

You can do all the texturing with them as seperate objects and attach them at the end, but then Max just makes a multi-sub in the process anyway.

Multi-sub materials are literally just a list of other materials, with an ID number for each. Set the number for each poly, it'll use the numbered material.
My posts are my opinion, and should be read as such.
Locked

Return to “[RW] Building Rolling Stock”