Horde3D

Next-Generation Graphics Engine
It is currently 29.03.2024, 16:40

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 21.06.2010, 18:52 
Offline

Joined: 11.12.2009, 12:59
Posts: 19
Hi,
I would like to place 2 different textures on 1 3d object.
What is the best way to do this? Is it needed to create a shader for this or what?
Example: created a cup with white texture on it
It is needed to place a logo of the front side of the cup.


Top
 Profile  
Reply with quote  
PostPosted: 22.06.2010, 10:02 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Did you already read this thread?


Top
 Profile  
Reply with quote  
PostPosted: 28.06.2010, 15:51 
Offline

Joined: 11.12.2009, 12:59
Posts: 19
Now yes.
AFAIU I need to edit shaders for this... will investigate how to do it...


Top
 Profile  
Reply with quote  
PostPosted: 29.06.2010, 04:50 
Offline

Joined: 08.11.2006, 03:10
Posts: 384
Location: Australia
You probably just need to use two materials (without making any new shaders).


Top
 Profile  
Reply with quote  
PostPosted: 05.04.2011, 08:32 
Offline

Joined: 11.12.2009, 12:59
Posts: 19
How to assign 2 materials to one 3d object?
Let me explain what I want to achieve.
I have an object which I want to be painted with stone texture. At some place of this object I would like to place some grass circles. I have stone and grass textures. However I don't want to manually create a mixed stone+grass texture. How do I do it programmatically?
I assume I'll need 2 sets of UV coordinates for each texture...


Top
 Profile  
Reply with quote  
PostPosted: 05.04.2011, 10:02 
Offline

Joined: 27.03.2011, 08:40
Posts: 47
Location: Fi
Use Texture splatting (texture blending) technique. I think you need to write your own shader.


Top
 Profile  
Reply with quote  
PostPosted: 08.04.2011, 21:09 
Offline

Joined: 08.03.2011, 18:29
Posts: 17
DIMEDROLL wrote:
How to assign 2 materials to one 3d object?
Let me explain what I want to achieve.
I have an object which I want to be painted with stone texture. At some place of this object I would like to place some grass circles. I have stone and grass textures. However I don't want to manually create a mixed stone+grass texture. How do I do it programmatically?
I assume I'll need 2 sets of UV coordinates for each texture...


The easiest way to understand what to do would be to check out one of the included ".scene.xml" files of your models. Here is one example:

Code:
<Model name="person" geometry="models/person/person.geo">
   <Joint name="Bip01" tx="0" ty="87.3667" tz="0" rx="-88.48">
   (...)
   </Joint>
   <Mesh name="person_mediumpoly" material="models/person/person_body.material.xml" batchStart="0" batchCount="7188" vertRStart="0" vertREnd="1632">
      <Mesh name="#person_mediumpoly" material="models/person/person_hair.material.xml" batchStart="7188" batchCount="246" vertRStart="1633" vertREnd="1705" />
   </Mesh>
</Model>


At the bottom you see that this model contains two meshes. You can chose the material for each mesh individually.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 31 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group