Ambiera Forum

Discussions, Help and Support.

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

hadoken
Guest
Quote
2021-11-09 22:43:57

Does anyone know if there's a way to import & handle 3D meshes with two different materials carrying individual uv maps into CopperCube so that each material can have its own texture scale factor?

Thanks for any thoughts on this in advance :-)

(Thought I read some vague hints about this in the forum possibly with the .b3d format, but unfortunately can't find the entry anymore...)


Robo
Guest
Quote
2021-11-10 06:59:46

If its only texture scaling difference then you can do this in CC but have to separate out ploygons, attach back as child at 0,0,0 then rescale and then combine back into original mesh.

Another method probably easier is just export into CC in sections with its own scaling and then combine together in CC...havent tried this myself but might work..


VP
Guest
Quote
2021-11-10 07:47:21

Not 100% sure what you mean exactly, but did you know that if you go to the polygon editor in coppercbube, you can select separate polygons (multiple points or faces) for static objects (doesn't work for animated objects), and once selected, you can then scale the uv/textures for the selected polygons (by clicking left and right mouse buttons together and then dragging the mouse) - it will scale only those parts of the UV that are selected, separate to the rest of the material. You can also stretch and rotate individual parts of UV maps.

So, for example, you could scale, stretch, rotate the UV for just one single triangle of a model, if you wanted to - and leave the rest untouched.


hadoken
Guest
Quote
2021-11-10 09:26:17

Thanks @Robo & @Pete for the tips which I'm aware of, thus trying to explain my plan a bit better :-)

Having one mesh object to be imported and used in CopperCube with:

1.)
one overlying texture for ambient occlusion (light-mapping or contour shading,..) directly baked in blender with an unaltered texture map and 1:1 UV scale in CopperCube with bigger texture size 2k/4k (not seamless)

2.)
one underlying small seamless stone texture for detail and color with adjustable texture scale ("Set planar texture coords for mesh...") in CopperCube for making stone sizes smaller or bigger as I wish

Here's an image about it:
🔎︎


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


hadoken
Guest
Quote
2021-11-10 09:31:44

I forgot to mention, in Gimp I get rid of the white color of the AO texture with: "Add Alpha Channel to image", then "Colors -> Color to Alpha" for keeping only the dark shading plus transparency without the white color which would cover my stone texture otherwise


hadoken
Guest
Quote
2021-11-10 09:44:29

I also know that my plan can already be achieved with mesh duplicates (but with higher poly-count issue) or with a vertex color approach. But I was just wondering if we could have multiple individual scaled and layered uv maps on one object in Coppercube.

¯\_(ツ)_/¯


Aiming_bullets
Guest
Quote
2021-11-11 05:46:45

you can try using blend texture shader thing by @Just-in_case that might help you to have more then one texture applied to single mesh. and there are also differnt material type like 2 texture blend, detail map, sphere map and others, try using them too. but I think JIC can provide more info as he write the shaders thinga that deals with roughness, details metals and other stuff but its been quite a time he posted something.


VP
Guest
Quote
2021-11-19 08:31:32

If the second UV map is for ambient occlusion, can you not just apply it as a normal map instead of a solid UV map?


hadoken
Guest
Quote
2021-11-19 11:46:17

Sounds like a good idea @Pete, thanks, but only if you can have separate uv scaling of normal uv map vs diffuse uv map. Does CC offer this? Have to check ...


hadoken
Guest
Quote
2021-11-19 11:56:38

Sorry @Pete,

your approach does not work in CopperCube to achieve the desired result. Found out, that uv normal map & uv diffuse map share the same amount of texture scaling :-(


just_in_case
Moderator
Quote
2021-11-20 03:53:35

I think it's possible, You can simply use the method proposed by @Robo by using multiple models with different texture scaling and then combining them into one that will surely increase some extra polygons. You can also create HLSL or GLSL shaders do the stuff, without acutally using multiple models. you can use upto 4 different textures.

use one for diffuse and do your maths with the other texture and then multiply it with the diffuse in the end. you will get your desired result.

All the material types in CC including the normal and parallel map and all the post-processing effects are just shaders. However, there are some limitations for the end-users like they can't apply the shaders to the whole screen and can't use passes for the shaders etc.


coppernoob
Registered User
Quote
2022-01-15 05:30:30

Since it can do light mapping pretty sure there has to be 2 uv sets?
B3d's from 3dws load fine with the light maps on uv channel 0 and textures on uv channel 1 (according to blitz3d)

copper cube uses lightmap_m4 for this if that means anything to anyone.

How you would directly access the uv sets I don't know.

b3d/fbx/dae im pretty sure support multi uv sets per model.
X and 3ds do not far as I'm Aware.


Sam


just_in_case
Moderator
Quote
2022-01-15 13:07:42

As, I have already mentioned in my comment above Coppercube does support upto 4 UV's.


csp-games
Guest
Quote
2022-01-15 13:25:56

I can only speak for the WebL target, there every mesh clearly has a 2nd UV set and the ability to assign a different texture to that 2nd set. 2 textures seems to be the max, and there is also only a limited set of blending modes that involves 2 textures.
example:

(here I originally posted some code)

Wow, the forum said this post appears to be spam, wtf.


csp-games
Guest
Quote
2022-01-15 13:28:15

See here:
https://www.ambiera.com/copperlicht/documentation/symbols/CL3D.Material.html


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internationa?" (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