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
Alex2016z
User Offline
Joined: 4th May 2019
Location:
Posted: 1st Jul 2019 09:04 Edited at: 2nd Jul 2019 13:37
Can I paint different faces with different shaders (maybe with different texture sets)? I can export different colors materials with x, and I think it will works with textures too, but there only one texture for material in x file, and I need full texture set for shader.
Raven
14
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 3rd Jul 2019 13:20
You can have up to 8 UV Maps and 16 Texture Maps per "Material"
While these can't strictly speaking use a different Shader, they can use different Shader Techniques per UV Set.

It's however not exactly "Easy" to accomplish, even in Native C++ w/DirectX 9.0c
What is an easier approach is to instead break down a Single Mesh into Multiple Mesh Objects (DBP calls these Limbs) that form the Main Object.

If you could be a little more specific about what you're trying to accomplish, then I can help further.
Alex2016z
User Offline
Joined: 4th May 2019
Location:
Posted: 3rd Jul 2019 13:58
I can break my object to limbs with same textures (good variant), but I afraid that speed will decreased after. Is there any speed difference between very hipoly object and object with much number of limbs without transformation?
Hotline
11
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 3rd Jul 2019 14:54
Afaik you can't have limbs without transforms. You will have exactly the same number of transformation /render state / texture change as many limbs you have. So it is not a good idea to have too many limbs per object. Hovewer as i see you don't have any other choice.
[href=forum.thegamecreators.com/?m=forum_view&t=191567&b=5]Spark Particle engine[/href]
[href=forum.thegamecreators.com/?m=forum_view&t=199163&b=5]Transform gizmo plugin[/href]
Alex2016z
User Offline
Joined: 4th May 2019
Location:
Posted: 3rd Jul 2019 15:05 Edited at: 3rd Jul 2019 15:06
Ok. Thanks. Anyway I`m thinking about make game without textures. I try to play some of them and they looks terrible, because not smoothed faces (and triangles). I think with smoothing I can make ultra cool thing.
Raven
14
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 3rd Jul 2019 16:20
Performance difference between Multiple Objects per Mesh and Large Vertex (Polygon) Counts., is subjective.
More Objects means more State Changes Per Frame (1 Per Object in Mesh)… but this is primarily CPU Performance Dependant, and as DBP doesn't use Multi-Core Processing; this will likely be offset by the Graphics Driver offloading to Unused Cores; where-as Higher Polygon (Vertex) Counts rely on Higher GPU ROP Counts., so will affect Framerate more directly (esp. AMD Hardware that tends to have Few Geometry Pipelines) but then this is only the case if we're talking about fairly extreme Polycounts on Modern GPUs.

With this said in both cases the cost is extremely low for either... so unless we're talking Hundreds of Thousands of instances (which you'll more likely run into a CPU Bottleneck with DBP For..Next Loops) chances are neither will have any real major effect on Performance.
You're still however not explaining WHAT exactly you're trying / want to do.
There could be a completely different approach that might be more useful.

Especially as strictly speaking while sure, each Object might have a State Change (assuming different inputs) if you're using an "Uber" Shader as it were., that's not particularly complex per se, but is quite large because it has multiple techniques; or you want to simply have different Colour Variants (which could be done via Vertex Colours blended with the Texture Sample) then it would still be the same State and thus merely cost what an Instant would instead of another Draw Dispatch.
So, yeah; if you could explain what you want to do better it'd help.
Alex2016z
User Offline
Joined: 4th May 2019
Location:
Posted: 3rd Jul 2019 16:44
I just have several buildings with much number of parts painted with different texture sets (dif/spec/norm/ref). I was thinking to join them to one object to improve performance, but now I think that I just can attach them to several groups by materials. It looks like good solution.
Hotline
11
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 4th Jul 2019 10:30
In this case i would suggest use atlasing where ever it is possible to gain performance.
[href=forum.thegamecreators.com/?m=forum_view&t=191567&b=5]Spark Particle engine[/href]
[href=forum.thegamecreators.com/?m=forum_view&t=199163&b=5]Transform gizmo plugin[/href]
Alex2016z
User Offline
Joined: 4th May 2019
Location:
Posted: 4th Jul 2019 10:39
Yes. Great thanks, I can use it much times, when I don`t need tiled textures. Perfect for decals.
Kuper
11
Years of Service
Recently Online
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 5th Jul 2019 23:25
Quote: "You can have up to 8 UV Maps and 16 Texture Maps per "Material""

How you get such info? I've always think that limit is 8 textures.
Do you mean that I can texture an object with 16 individual textures?
Raven
14
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 6th Jul 2019 01:13
Shader Model 2.0 and above support 16 Texture Samples, and 8 UV Maps.
That is what the Hardware (and Specification) support., where-as DBP / AGK... I believe is limited to 8 (with 4 of these having Default Usage) via the Set Object Texture Command., but you can set the other 8 Samples manually via the Shader Commands.

Login to post a reply

Server time is: 2020-01-19 15:33:42
Your offset time is: 2020-01-19 15:33:42