Crystal Space
Welcome, Guest. Please login or register.
September 01, 2014, 07:43:20 pm

Login with username, password and session length
Search:     Advanced search
9009 Posts in 2043 Topics by 8371 Members
Latest Member: Berger4
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  Making export pluging for Cinema4D. How uv define texture position in xml?
« previous next »
Pages: [1] Print
Author Topic: Making export pluging for Cinema4D. How uv define texture position in xml?  (Read 1905 times)
Newbie
*
Posts: 8


View Profile Email
« on: December 11, 2007, 02:32:00 pm »

Hi, I'm coding a world xml export plugin for Cinema 4D. Just started with CS, and can't figure out how uv defines the texture position; in "Intro to Building Maps in XML" article, the faces in the cube are textured as

<p>
<v>1</v>
<v>2</v>
<v>3</v>
<v>0</v>
<material>defaultWall</material>
<texmap>
<uv idx="0" u="1" v="0"/>
<uv idx="1" u="1" v="1"/>
<uv idx="2" u="0" v="1"/>

</texmap>
</p>

There are three idx; I suppose they are ids for the uv coordinates. Could be rotation, scale and position, but I have played with the numbers and I can't figure out how they work. Somebody help, please?

 Dan
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #1 on: December 11, 2007, 02:45:03 pm »

Please don't export to thing mesh. Thing mesh is obsolete and will be gone in 1.4. Please use genmesh instead.

Greetings,
Logged
Newbie
*
Posts: 8


View Profile Email
« Reply #2 on: December 12, 2007, 12:43:12 am »

Ok. The export plugin is now made with genmesh. The mesh is ok, the uv must be corrected as they are not quite right, but it looks good.

 Dan
Logged
Newbie
*
Posts: 8


View Profile Email
« Reply #3 on: December 17, 2007, 08:53:18 pm »

 The first part of the plugin is finished; the mesh is correct and the UV's too. Right now it writes *all* points in each triangle of the object, so for a cube, for example, it writes 36 points, some of them redundant. I'm coding it to optimize the output so only unique points are exported (must be very easy, but it is turning to be a nightmare!). Suppose next step will be submeshes; where are they documented? Only found reference to them in http://cel.crystalspace3d.org/docs/online/manual/MeshObject-Genmesh.html but not a word about indexbuffers as suggested by bookeater2 in http://cel.crystalspace3d.org/docs/online/manual/MeshObject-Genmesh.html

 How indexbuffer (components, type, indices ... ) work?

 Thanks

 Dan 
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 3.186 seconds with 15 queries.