Search found 303 matches

by Distorted Pixel
Wed Jul 02, 2025 6:41 pm
Forum: 3D Programming
Topic: AddMaterialLayer()
Replies: 17
Views: 1060

Re: AddMaterialLayer()


Don't mention it, your welcome. I'm glad if I was able to help a little. I'm learning also with these.


Just thought I'd post this short video I made last night. I recorded it with an old version of Movavi and my screen refresh rate is 144 fps lol. So it is crappy recording lol. I will learn a ...
by Distorted Pixel
Wed Jul 02, 2025 6:15 pm
Forum: 3D Programming
Topic: AddMaterialLayer()
Replies: 17
Views: 1060

Re: AddMaterialLayer()


There is no main mesh. A mesh is composed of submeshes, and it has at least 1. All the 31 item is a submesh in your model. Some of them are textured, some of them are not. (but they have color in their mesh data, and they are visible. Those just do not need a textured material.)

The material name ...
by Distorted Pixel
Wed Jul 02, 2025 5:39 pm
Forum: 3D Programming
Topic: AddMaterialLayer()
Replies: 17
Views: 1060

Re: AddMaterialLayer()


(why/how you chose the case numbers you did)

I think I can tell this in an easy way. If you open the material file, there will be 31 record in it. The first is the submesh number 0 (used in the cases), the second is the number 1 etc.
If the record contains texturename, I apply the submesh ...
by Distorted Pixel
Wed Jul 02, 2025 4:18 pm
Forum: 3D Programming
Topic: AddMaterialLayer()
Replies: 17
Views: 1060

Re: AddMaterialLayer()


I will try to explain. You said your model has 31 subentities, then posted the material file. The material file had the info how to texture the 31 submeshes in order. The numbering of submeshes/subentities starts with 0 (up to 30 with this model). I made an iteration. The case numbers are ...
by Distorted Pixel
Wed Jul 02, 2025 3:47 am
Forum: 3D Programming
Topic: AddMaterialLayer()
Replies: 17
Views: 1060

Re: AddMaterialLayer()

@miso

I'm trying to learn from the code you wrote. What is the purpose of the cases not being 1, 2, 3, 4 etc.. Instead you have 1, 4, 5, 9, 10, 11, 12 and default. How did you figure that it needed to be that way and what is it for? I do know why the For x = 0 To 30 is there, it is for the 1 main ...
by Distorted Pixel
Wed Jul 02, 2025 12:49 am
Forum: 3D Programming
Topic: AddMaterialLayer()
Replies: 17
Views: 1060

Re: AddMaterialLayer()


I don't see any problems with that code by looking at it. (besides the event handling, but that does not cause problems with the visuals)
For the record, I tested to texture submeshes with multiple textures, and it worked fine. I used threedsliders monkey model, as it has the eyes as a submesh ...
by Distorted Pixel
Tue Jul 01, 2025 6:45 pm
Forum: 3D Programming
Topic: AddMaterialLayer()
Replies: 17
Views: 1060

Re: AddMaterialLayer()


If you use the GetScriptMaterial() command, it should texture your model just right with that material file. If you want to manually add them, use the different materials for the submeshes. (As I said, I did not test this, but I assume that should also work.)


I am getting somewhere, but I don't ...
by Distorted Pixel
Tue Jul 01, 2025 4:07 pm
Forum: 3D Programming
Topic: AddMaterialLayer()
Replies: 17
Views: 1060

Re: AddMaterialLayer()


And what does pb say? (Just to be sure.)
Result = SubMeshCount(#Mesh)


Wow, is says: 31

[Edit:] This is what the material file has in it:
material StadiumNew_obj#0
{
technique
{
pass
{
ambient 1 1 1 1
diffuse 1 1 1 1
specular 1 1 1 1

texture_unit
{
texture Stadium_blue.png ...
by Distorted Pixel
Tue Jul 01, 2025 3:38 pm
Forum: 3D Programming
Topic: AddMaterialLayer()
Replies: 17
Views: 1060

Re: AddMaterialLayer()


I guess your model has 2 or more submeshes. That way not a new layer that you need, but two material for each texture. You can set it with SetEntityMaterial(#Entity,MateialID,SubEntity)

I did not try this, so if it does not work with submeshes, than this is a missing feature. Please tell me, what ...
by Distorted Pixel
Tue Jul 01, 2025 5:03 am
Forum: 3D Programming
Topic: AddMaterialLayer()
Replies: 17
Views: 1060

AddMaterialLayer()

Hi,

I am using PureBasic 6.21 LTS

I am trying to get two textures on my mesh. It came with both of them. One is the stadium seats and the other is the field.

Step one:
I loaded the object I got from turbosquid website into Blender and exported it out to .obj format

Step two:
I ran the object ...
by Distorted Pixel
Wed May 28, 2025 1:08 am
Forum: Coding Questions
Topic: [Solved]ListIconGadget() active
Replies: 21
Views: 2095

Re: Make ListIconGadget() active

Thank you RASHAD, I finally got it, but I think the bottom ListIconGadget Image needs to be moved ever so slightly to the left. I'm not sure if the top ListIconGadget image needs to move left or right any.

[Edit:] I took a close look and the bottom gadget image does need to be moved slightly to the ...
by Distorted Pixel
Mon May 26, 2025 9:28 pm
Forum: Coding Questions
Topic: [Solved]ListIconGadget() active
Replies: 21
Views: 2095

Re: Make ListIconGadget() active

Thank you RASHAD,

I forgot to mention that the window is full screen borderless and the background image is the size of my desktop 1920x1080. I tried working with your code example and if I set my image to it, it says Image is not initialized . I also tried changing necessary things to hopefully ...
by Distorted Pixel
Mon May 26, 2025 4:09 pm
Forum: Coding Questions
Topic: [Solved]ListIconGadget() active
Replies: 21
Views: 2095

Re: Make ListIconGadget() active

This is an old thread I started, but what I need pertains to the transparency talk part of this thread.

Is it possible to have 2 ListIconGadgets transparent on one window? Even if it is the fake transparency instead of the real , it is acceptable.

I have tried to get the fake transparency to work ...
by Distorted Pixel
Sun May 18, 2025 5:33 pm
Forum: Coding Questions
Topic: [Solved]Use gradient to draw horizontal elliptical effect so buttons look raised
Replies: 1
Views: 374

Re: Use gradient to draw horizontal elliptical effect so buttons look raised

I figured it out.

I changed the ellipticalGradient statement to this and it works. I just wish it looked more raised

Code: Select all

EllipticalGradient(ButtonWidth/2, ButtonHeight/2, ButtonWidth, ButtonHeight)
by Distorted Pixel
Sun May 18, 2025 5:08 pm
Forum: Coding Questions
Topic: [Solved]Use gradient to draw horizontal elliptical effect so buttons look raised
Replies: 1
Views: 374

[Solved]Use gradient to draw horizontal elliptical effect so buttons look raised

Hi,

This is so far my best attempt to get the effect that I am after. I am after the same or similar effect like the jelly button does in IceDesign. I can't seem to get it right lol
https://i.servimg.com/u/f47/20/54/79/12/colorb10.png

Enumeration
#MainWindow
EndEnumeration


Enumeration ...