How do I set texture in Q3D plugin

Get help using Construct 2

Post » Sun Jun 18, 2017 12:27 am

I can't set texture for .obj model in Q3D plugin. Every new runtime model just changes it's colour to random. How to add texture to .obj model in Q3D plugin? .capx would be really good here...
Thanks and sorry for bad ENG :?
B
15
S
5
G
1
Posts: 31
Reputation: 2,594

Post » Sun Jun 18, 2017 8:45 pm

lolish wrote:I can't set texture for .obj model in Q3D plugin. Every new runtime model just changes it's colour to random. How to add texture to .obj model in Q3D plugin? .capx would be really good here...
Thanks and sorry for bad ENG :?


The basic workflow for model textures in Q3D is:

1. Under "Files", right-click to add your .obj file.
2. Create a new Q3Dmodel object in a layout.
3. Double-click on the object to open the image/animation editor.
4. Under "animations", add a new animation called "DiffuseMap".
5. Import the texture that you created in Maya/Blender/3DSmax/wherever.

Q3D requires that you have at least one diffuse map called "DiffuseMap", so that it automatically detects that a diffuse map exists. Once you have one called "DiffuseMap", you can add other diffuse maps and call them whatever you like.

6. Close the animation editor. Click on your object, and make sure you have the following settings:

(If you have Q3DOimoPhysics behavior, make sure "Debug body" is set to "Disabled")

"Use Model" - "Yes"
"Model Filename" - "Creep_level1.obj" (replace this with the name of your .obj file)
"Model Auto Load" - "Yes"

"B.Box Debug" - "Off"
"Collider Debug" - "Off"

If you are seeing something that is randomly colored, it is because it hasn't loaded a texture and/or you are seeing one of the debug bodies (physics, bounding box, or collider).

If you are seeing something that is randomly multicolored, it is because you are simultaneously seeing two or more overlapping debug bodies.

If you haven't done so already, I recommend taking a look the Q3D manual:

https://www.dropbox.com/s/vpn0mbh4m7lo9zj/Q3D%20Users%20Manual%20V2-4_2.docx?dl=0
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
45
S
11
G
20
Posts: 363
Reputation: 14,174

Post » Sun Jun 18, 2017 8:58 pm

cjbruce wrote:
lolish wrote:I can't set texture for .obj model in Q3D plugin. Every new runtime model just changes it's colour to random. How to add texture to .obj model in Q3D plugin? .capx would be really good here...
Thanks and sorry for bad ENG :?


The basic workflow for model textures in Q3D is:

1. Under "Files", right-click to add your .obj file.
2. Create a new Q3Dmodel object in a layout.
3. Double-click on the object to open the image/animation editor.
4. Under "animations", add a new animation called "DiffuseMap".
5. Import the texture that you created in Maya/Blender/3DSmax/wherever.

Q3D requires that you have at least one diffuse map called "DiffuseMap", so that it automatically detects that a diffuse map exists. Once you have one called "DiffuseMap", you can add other diffuse maps and call them whatever you like.

6. Close the animation editor. Click on your object, and make sure you have the following settings:

(If you have Q3DOimoPhysics behavior, make sure "Debug body" is set to "Disabled")

"Use Model" - "Yes"
"Model Filename" - "Creep_level1.obj" (replace this with the name of your .obj file)
"Model Auto Load" - "Yes"

"B.Box Debug" - "Off"
"Collider Debug" - "Off"

If you are seeing something that is randomly colored, it is because it hasn't loaded a texture and/or you are seeing one of the debug bodies (physics, bounding box, or collider).

If you are seeing something that is randomly multicolored, it is because you are simultaneously seeing two or more overlapping debug bodies.

If you haven't done so already, I recommend taking a look the Q3D manual:

https://www.dropbox.com/s/vpn0mbh4m7lo9zj/Q3D%20Users%20Manual%20V2-4_2.docx?dl=0



Many thanks :shock: ! Now I know, that problem is in fifth paragraph, the only thing I don't understand properly is how to create and import right texture with Blender or Maya, can you please explain it more? :) (The only thing I know, that I need three.js addon for Blender or Maya, but wherever I don't understand how to make it work)
B
15
S
5
G
1
Posts: 31
Reputation: 2,594

Post » Sun Jun 18, 2017 9:42 pm

lolish wrote:
cjbruce wrote:5. Import the texture that you created in Maya/Blender/3DSmax/wherever.

Q3D requires that you have at least one diffuse map called "DiffuseMap", so that it automatically detects that a diffuse map exists. Once you have one called "DiffuseMap", you can add other diffuse maps and call them whatever you like.

6. Close the animation editor. Click on your object, and make sure you have the following settings:



Many thanks :shock: ! Now I know, that problem is in fifth paragraph, the only thing I don't understand properly is how to create and import right texture with Blender or Maya, can you please explain it more? :) (The only thing I know, that I need three.js addon for Blender or Maya, but wherever I don't understand how to make it work)


You actually don't need the three.js add-on if you are working exclusively with .obj files. The three.js add-on allows you to a few more things than the basic .obj import allows:

1. The three.js add-on allows you to create a model in Blender, UV-unwrap it in Blender, assign materials in Blender, draw textures in Blender, then import everything all at once as a single .json file into Q3D. If you are working with .obj files, you can do all of this, except when you go to export, you will also need to save the texture maps as images, and later import them as I have described above.

2. The three.js add-on allows you to create a skeletal animation in Blender and save it to a .json file. Q3D can import your skeletal animation and use it in the game. The .obj format does not support any sort of animation -- it is only for static meshes.

What is your experience level with 3D modeling software like Blender/Maya/3DSmax? Do you know how to create a low-poly model, UV-unwrap it, then texture it? If so, then just save the resulting texture as a .png and import it into C2 as a "DiffuseMap" as I described above. If not, then you will need to either learn how to do texturing yourself, or get someone to do these steps for you in the 3D modeling software.

I hope this helps!
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
45
S
11
G
20
Posts: 363
Reputation: 14,174


Return to How do I....?

Who is online

Users browsing this forum: ivanski1983, KTML5, XavierOrionGames and 5 guests