New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Managed Submesh #969

Merged
merged 2 commits into from May 26, 2016

Conversation

Projects
None yet
4 participants
@derbymutt
Contributor

derbymutt commented May 23, 2016

The user will use in their material file:

import * from "managed_submesh.material"

//for the body of the submesh truck
material body : material RoR/Submesh/Body
{
    //diffuse texture
    set_texture_alias diffuse       image.dds
    //toggles on with headlights
    set_texture_alias emissive      image.dds
    //reflective, based on type of material, can either be alpha based or grayscale
    set_texture_alias reflective    image.dds
    //prelighting or a/o, can be white to have none
    set_texture_alias Lighting      image.dds
}

//for the wheels of the truck
material wheel : material RoR/Submesh/Wheels/Alpha
{
    //diffuse texture
    set_texture_alias diffuse       image.dds
    //reflective, based on type of material, can either be alpha based or grayscale
    set_texture_alias reflective    image.dds
    //prelighting or a/o, can be white to have none
    set_texture_alias Lighting      image.dds
}

Adding/Alpha to the end of the referenced material will change the reflection from based on grayscale to based on alpha. The materials have been stripped down to the minimum number of passes and textures required for user friendliness.

This supports PSSM shadows, reflections, toggle-able light sources, and pre-lighting (a/o).

derbymutt added some commits May 23, 2016

Generic simplified version of managed materials.
The user will use in their material file:

import * from "managed_submesh.material"

//for the body of the submesh truck
material body : material RoR/Submesh/Body
{
	//diffuse texture
	set_texture_alias diffuse 		image.dds
	//toggles on with headlights
	set_texture_alias emissive	 	image.dds
	//reflective, based on type of material, can either be alpha based or grayscale
	set_texture_alias reflective	image.dds
	//prelighting or a/o, can be white to have none
	set_texture_alias Lighting		image.dds
}

//for the wheels of the truck
material wheel : material RoR/Submesh/Wheels/Alpha
{
	//diffuse texture
	set_texture_alias diffuse 		image.dds
	//reflective, based on type of material, can either be alpha based or grayscale
	set_texture_alias reflective	image.dds
	//prelighting or a/o, can be white to have none
	set_texture_alias Lighting		image.dds
}

Adding /Alpha to the end of the referenced material will change the reflection based on
@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur May 23, 2016

Contributor

👍

Contributor

Hiradur commented May 23, 2016

👍

@only-a-ptr

This comment has been minimized.

Show comment
Hide comment
@only-a-ptr

only-a-ptr May 25, 2016

Member

👍

Member

only-a-ptr commented May 25, 2016

👍

@ulteq ulteq merged commit 4b09e07 into RigsOfRods:master May 26, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@derbymutt derbymutt changed the title from Derbymutt managed submesh 1 to Managed Submesh May 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment