Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Feature requests and bug reports
Two independent Material UV maps?

just_in_case
Moderator
Quote
2022-01-15 15:31:43

I don't know much about GLSL shaders so can't say much but for windows platform with HLSL you can use upto 4 UV.
 tex0, tex1, tex2, and tex3
If you have seen my shader examples then some of them use multiple UV's. even some inbuilt materials uses multiple UV's like lightmaps, normal maps, solid 2 layer and many other.


hadoken
Guest
Quote
2022-01-15 16:17:53

Hey @just_in_case could you maybe help with you action_blend_texture.js Action:

I'm trying to blend some decal/sticker kind of texture with alpha channel background via some OVERLAY blend mode on top of a stone texture.

As your action only gives four options to ADD, MULTIPLY, SUBTRACT and DIVIDE would my idea even still be possible with this?

If yes, could you give me perhaps please some hint how to do so, I guess there might be a chance in connection with the right Material_Type setting?

Thanks for any help.
:-)


serge
Registered User
Quote
2022-01-16 12:23:03

You trying to create the effects of a real Castle. My opinion rock textures I adjusted in Photoshop. Instead of modeling the castle it can be easily design in Room Map for the perfect castle you are looking for.


just_in_case
Moderator
Quote
2022-01-17 13:41:12

@Hadoken, yes, my action can put the images as overlay, simply supply the sticker overlay as a second texture for your stone. You can do that by going in irredit/irrlicht tools. Then add my action to your stone node, maybe I should update it and add a parameter to select on which node we want to apply the shader. but for now shader will be applied to the current node on which the shader has been attached. In your case it seems Stone Node, and then tick mark the Multiply option and then put the material index that you want to change if your stone node has only 1 material then put "1" in there. then set the base material type according to your texture for the solid texture it is 0 and if your texture has alpha transparency then put 13 in there.

and you are done, now if you play the game and when the action gets triggered the overlay will be applied to your stone node.

hope that's what you wanted to do.


hadoken
Guest
Quote
2022-01-17 23:06:33

Thank you very much @just_in_case, sounds good, I will look into your solution asap, then post my results if it's working for me or not.


hadoken
Guest
Quote
2022-01-18 13:06:04

Hey, @just_in_case

seems like no easy task, unfortunately after following your help I still can't achieve the desired result of simply blending a "sticker" image with alpha transparency-BG over my stone textured wall with the texture_blend_action.

Maybe you could provide a .ccb file as working demo.
(preferably for CopperCube 6.3, but higher versions are fine, too)

The following image describes my goal:


🔎︎


https://www.dropbox.com/s/zfp32e...


just_in_case
Moderator
Quote
2022-01-18 19:18:09

@Hadoken, I checked the blend textures together shader action and found that you were right, it doesn't blend the transparency correctly.
As it was my very first shader that I have written for Coppercube while learning HLSL, so we can expect that it should have not worked properly.

So, just for your specific need, I have created a new shader that only adds an overlay to a texture with transparency.

Attached is the ccb demo file, Press "F" to apply the shader effect and the results will be the same as the picture you have posted above. When you open the ccb file, the shader will automatically be installed in your Coppercube extension.

Here is the link to the ccb file:-
https://drive.google.com/file/d/...

Hope this helps


hadoken
Guest
Quote
2022-01-18 22:07:46

Thank you very much @Just_in_case! This one is working like a charm as expected. :-) I think with its simplicity in what it does it's still a super useful contribution to enhance CopperCube possibilities. Plus you also added "Affecting_node" option as bonus, really nice!

This one definitely has to be published at neophyte.cf !!!


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internati?nal" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact