News:

When replying to a specific statement be sure to quote the previous post.

Main Menu
TurboCAD 2026 Platinum box
Now available

TurboCAD 2026.2

The latest update for TurboCAD 2026. It installs over any 2026 build and keeps your activation, drawings and settings. Get it from the Start Page or Help > Check for Update.

RedSdk material shift

Started by Andy H, May 03, 2016, 01:32:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy H

IF when using a texture, you applying the scale u/v and offset u/v, you render - looks ok, you then open texture space (wrapping), even without altering anything the texture may shift slightly, so is rendering off centre, try this calculation to re-centre the image (specifically affects planer space).
Tested on a number of different sizes but can't guarantee success (worked for me)

New offset u = Offset u - (scale u / 2)
New offset v = Offset v - (scale v / 2)

example 2 tiles wide, offset = 0, scale u = 0.173961, New offset = 0 - ( 0.0173961 / 2 ) = -0.00869805



Torfinn

Darrel have made a calculator for this use, it is at the foum some place, but i dont remember the tread anymore.

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

Dean

Quote from: Andy H on May 03, 2016, 01:32:56 AM
IF when using a texture, you applying the scale u/v and offset u/v, you render - looks ok, you then open texture space (wrapping), even without altering anything the texture may shift slightly, so is rendering off centre, try this calculation to re-centre the image (specifically affects planer space).
Tested on a number of different sizes but can't guarantee success (worked for me)

New offset u = Offset u - (scale u / 2)
New offset v = Offset v - (scale v / 2)

example 2 tiles wide, offset = 0, scale u = 0.173961, New offset = 0 - ( 0.0173961 / 2 ) = -0.00869805
Andy, it works BUT stick with what works! Redstuff enjoys playing tricks, don't waste your time trying to figure it out and "always" switch between modelspace and paperspace back to modelspace after making any changes to materials,environments, luminances etc... before rendering.
"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0

Andy H

Quote from: Torfinn on May 03, 2016, 04:30:07 AM
Darrel have made a calculator for this use, it is at the foum some place, but i dont remember the tread anymore.

Torfinn

HI Torfinn,

Different situation, Darrel's calculator is for the correct scale u, v, the above is correcting an unwanted 'feature'

Quote from: Dean on May 03, 2016, 04:39:33 AM
Quote from: Andy H on May 03, 2016, 01:32:56 AM
IF when using a texture, you applying the scale u/v and offset u/v, you render - looks ok, you then open texture space (wrapping), even without altering anything the texture may shift slightly, so is rendering off centre, try this calculation to re-centre the image (specifically affects planer space).
Tested on a number of different sizes but can't guarantee success (worked for me)

New offset u = Offset u - (scale u / 2)
New offset v = Offset v - (scale v / 2)

example 2 tiles wide, offset = 0, scale u = 0.173961, New offset = 0 - ( 0.0173961 / 2 ) = -0.00869805
don't waste your time trying to figure it out and "always" switch between modelspace and paperspace back to modelspace after making any changes to materials,environments, luminances etc... before rendering.

Your correct of course Dean, however - the problem I have is that I'm writing some stuff for the wiki, and I need to ensure what I'm putting up there is accurate, including the flaws - well, not all,  only the flaws that affect the material palette.

Darrel Durose

Andy

I think if we use the Texture space fully then the centres are easier to workout. When I say fully I mean the scales in that section to the world measurement scale in our drawings.

The parameters in the UV scales when using images in texture, reflections, transparency, bump and displacement can then be all left at 1 for the above.

I still use the old method also though so your calculation sounds right...

It goes out the window I find when the object becomes a surface which is the case for Lightworks as well...

Daz...
V2020 & V2022 Plat 64bit, Lenovo P72 Laptop, Window 10 Pro for Workstations, Intel Xeon E-2186 CPU @ 2.90 Ghz (6 cores/12 threads), 64GB RAM, Nvidia P5200 c/w Max=Q Design GPU, Display UHD 3840x2160 pixels
TurboCAD user since V3 and Turbocad 3D V1.

Andy H

HI Darrel.

Did you ever figure out what the numbers for x axes etc. exactly correspond to, I mean I know they rotate the texture, but seem to have a weird way of doing it, 0.5 = about 26.5 degrees,  1 = 45 degrees, 100 = 90 degrees, seems strange to me.. 

Darrel Durose

#6
Yeah...

They come into play when we select "User" in the Transformation Mode dropdown. This gives us the option to scale the texture further like "0.5" makes the texture repeat twice for the given scale dimension and we can have different values across the different axes. It's not really for rotating I don't think.

Hmmm
Just some further testing it looks like it works in scope so if we have the default "1" in the x axis and "1" in the y column the this rotates the texture 45 degrees... and if we have say 90 and 90 it does the same... RedSDK.... Looney bin stuff... this is with the transformation mode set to Orthogonal...

So even x = 0.000001 and 1 in the y column turns the texture 90 degrees...... not sure if this is mean't for rotating it. Maybe it needs more refinement if it is...
Daz...
V2020 & V2022 Plat 64bit, Lenovo P72 Laptop, Window 10 Pro for Workstations, Intel Xeon E-2186 CPU @ 2.90 Ghz (6 cores/12 threads), 64GB RAM, Nvidia P5200 c/w Max=Q Design GPU, Display UHD 3840x2160 pixels
TurboCAD user since V3 and Turbocad 3D V1.

Dean

I would keep it simple and use what works,Andy. Combining all the options is advanced wrapping. Maybe it's best to post a file and texture and describe how you want the material wrapped.  ;D We can talk about  "numbers" that should or would work till we turn blue.
"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0

Andy H

Quote from: Darrel Durose on May 03, 2016, 07:53:55 AM
Maybe it needs more refinement if it is...

Thank Darrel, for the info, I hadn't got round to trying the 'user' setting yet,  yep I think it could do with just a tiny bit of refinement,  ;D

Quote from: Dean on May 03, 2016, 08:29:14 AM
I would keep it simple and use what works,Andy. Combining all the options is advanced wrapping.

Too Late, I've already typed up 16 pages with 125 pictures

Dean

Quote from: Andy H on May 03, 2016, 08:38:38 AM
Quote from: Darrel Durose on May 03, 2016, 07:53:55 AM
Maybe it needs more refinement if it is...

Thank Darrel, for the info, I hadn't got round to trying the 'user' setting yet,  yep I think it could do with just a tiny bit of refinement,  ;D

Quote from: Dean on May 03, 2016, 08:29:14 AM
I would keep it simple and use what works,Andy. Combining all the options is advanced wrapping.

Too Late, I've already typed up 16 pages with 125 pictures

Oh well, I will have a look.
The "user setting" is similar to "UV mapping" the axis and scales give you direct 3D dimensional (object) mapping.
"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0

John R

Quote from: Torfinn on May 03, 2016, 04:30:07 AM
Darrel have made a calculator for this use, it is at the forum some place, but I don't remember the thread anymore.

Torfinn

RedSDK - Texture Size Calculator

Pinned at the beginning of the "Tips and Tricks" board.
John R.

V17—V21, 2015—2025
Designer, Deluxe, (Basic, Expert, Professional), Platinum
RedSDK enabled
Windows 11 Pro (25H2), 64-bit

Andy H

Quote from: Dean on May 03, 2016, 08:50:05 AM
Oh well, I will have a look.
The "user setting" is similar to "UV mapping" the axis and scales give you direct 3D dimensional (object) mapping.

Thanks Dean, sounds like that setting could be fun.

The stuff for the wiki is nothing special,  all the stuff I do on there (which is virtually nothing compared to the work John puts in) is aimed at the new user, but if there is a button / setting I like to write what it does - or possibly doesn't do  ;)

Dean

#12
Quote from: Andy H on May 03, 2016, 11:00:40 AM
Quote from: Dean on May 03, 2016, 08:50:05 AM
Oh well, I will have a look.
The "user setting" is similar to "UV mapping" the axis and scales give you direct 3D dimensional (object) mapping.

Thanks Dean, sounds like that setting could be fun.

The stuff for the wiki is nothing special,  all the stuff I do on there (which is virtually nothing compared to the work John puts in) is aimed at the new user, but if there is a button / setting I like to write what it does - or possibly doesn't do  ;)

Yeah, it's fun, Andy.
Attached is displaying the box,planar,spherical and cylindrical options.
though, I'd  advise using "UV mapping" with redstuff, on cylinders and spheres (improved mapping)

"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0