SP导入unity3d和虚幻4哪个好材质怎么完美还原

SP粗糙度贴图在Unity里责怎么贴_百度知道
SP粗糙度贴图在Unity里责怎么贴
答题抽奖
首次认真答题后
即可获得3次抽奖机会,100%中奖。
主要经营计算机网络服务,设计、制作、代理、发布国内各类广告,健康信息咨询。
这个有不同的情况:
如果 贴图Unity3D能够识别,只是没有贴到模型上面,这个好解决,把贴图拖到模型的相应位置就可以了。
如果贴图不识别,材质球是灰色的,可以尝试吧把图的格式改成bmp等其他格式,重新导入,然后拖到相应位置。
如果用3DMAX导出的时候点选嵌入贴图,貌似也能解决个问题,试试看看重新导出。
新手自学,如果见解不当,希望指正,非常感谢。
dadizhichong3
dadizhichong3
引用小夜曲0的回答:这个有不同的情况:
如果 贴图Unity3D能够识别,只是没有贴到模型上面,这个好解决,把贴图拖到模型的相应位置就可以了。
如果贴图不识别,材质球是灰色的,可以尝试吧把图的格式改成bmp等其他格式,重新导入,然后拖到相应位置。
如果用3DMAX导出的时候点选嵌入贴图,貌似也能解决个问题,试试看看重新导出。
新手自学,如果见解不当,希望指正,非常感谢。
他问的是贴图怎么,也就是不知道贴到哪个位置,而不是贴图格式对不对的问题
1条折叠回答
为你推荐:
其他类似问题
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。package com.unity.
import java.io.BufferedR
import java.io.DataOutputS
import java.io.IOE
import java.io.InputStreamR
import java.net.ServerS
import java.net.S
import com.unity3d.player.UnityP
import com.unity3d.player.UnityPlayerA
import android.content.C
import android.content.I
import android.os.B
import android.os.PowerM
import android_serialport_api.ComP
//import android.serialport.sample.R;
public class MyserialActivity extends UnityPlayerActivity {
public static ComPort mComP
public static ComPort mComPort3;
private static final int Port = 5281;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = new Intent();
intent.setAction("android.intent.action.HIDE_NAVIGATION_BAR");
MyserialActivity.this.sendBroadcast(intent);
public void OpenttyS1()
if(mComPort == null)
mComPort = new ComPort();
mComPort.Start("ttyS1");
public void OpenttyS3()
if(mComPort3 == null)
mComPort3 = new ComPort();
mComPort3.Start("ttyS3");
public static String bytes2HexString(byte[] b, int len) {
String ret = "";
for (int i = 0; i & i++) {
String hex = Integer.toHexString(b[ i ] & 0xFF);
if (hex.length() == 1) {
hex = '0' +
ret += hex.toUpperCase();
public static byte uniteBytes(byte src0, byte src1) {
byte _b0 = Byte.decode("0x" + new String(new byte[]{src0})).byteValue();
_b0 = (byte)(_b0 && 4);
byte _b1 = Byte.decode("0x" + new String(new byte[]{src1})).byteValue();
byte ret = (byte)(_b0 ^ _b1);
void ttyS1Send(byte[] data,int length)
mComPort.SendData(data, length);
void ttyS3Send(byte[] data,int length)
mComPort3.SendData(data, length);
public void RestartSystem()
new ServerThread().start();
class ServerThread extends Thread {
ServerSocket serversocket =
public void run()
super.run();
serversocket = new ServerSocket(Port);
Socket socket = serversocket.accept();
while (true) {
OutputStream ou = socket.getOutputStream();
DataOutputStream wirter = new DataOutputStream(socket.getOutputStream());
BufferedReader buffer = new BufferedReader(
new InputStreamReader(socket.getInputStream()));
wirter.writeBytes("reboot\n");
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
serversocket.close();
} catch (IOException e) {[mw_shl_code=java,true]/*
* Copyright 2009 Cedric Priscal
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
package android_serialport_
import java.io.F
import java.io.IOE
import java.io.InputS
import java.io.OutputS
import java.nio.charset.C
import java.nio.charset.UnsupportedCharsetE
import java.security.InvalidParameterE
import com.unity3d.player.UnityP
import android.R.
import android.util.L
import android_serialport_api.SerialP
class ComPort {
protected SerialPort mSerialP
protected OutputStream mOutputS
private InputStream mInputS
private ReadThread mReadT
private String unityFunction="";
private static StringBuffer SendBuffer=
private class ReadThread extends Thread {
public void run() {
super.run();
while(!isInterrupted()) {
int size=0;
byte[] buffer = new byte[64];
for(int k=0;k&64;k++)
buffer[k]=0;
if (mInputStream == null)
size = mInputStream.read(buffer);
if (size & 0) {
onDataReceived(buffer, size);
} catch (IOException e) {
e.printStackTrace();
public ComPort()
SendBuffer=new StringBuffer();
private void DisplayError(String reason) {
/*AlertDialog.Builder b = new AlertDialog.Builder(this);
b.setTitle("Error");
b.setMessage(resourceId);
b.setPositiveButton("OK", new OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
SerialPortActivity.this.finish();
b.show();*/
Destroy();
Log.e("openserialport",reason);
public void Start(String pname) {
//UnityPlayer.UnitySendMessage("SerialPort","ReviceData_s1", "尝试绑定串口");
int baudrateS
if(pname.equals("ttyS1"))
unityFunction="ReviceData_s1";
baudrateSpeed=115200;
unityFunction="ReviceData_s3";
baudrateSpeed=57600;
if (mSerialPort == null) {
//mSerialPort = new SerialPort(new File("/dev/ttyS2"), );
mSerialPort = new SerialPort(new File("/dev/"+pname), baudrateSpeed, 0);
UnityPlayer.UnitySendMessage("SerialPort","ReviceData_s1", "串口绑定成功");
mOutputStream = mSerialPort.getOutputStream();
mInputStream = mSerialPort.getInputStream();
/* Create a receiving thread */
if(baudrateSpeed==115200)
mReadThread = new ReadThread();
mReadThread.start();
} catch (SecurityException e) {
UnityPlayer.UnitySendMessage("SerialPort","ReviceData_s1", "串口绑定失败1");
DisplayError("error_security");
} catch (IOException e) {
UnityPlayer.UnitySendMessage("SerialPort","ReviceData_s1", "串口绑定失败2");
DisplayError("error_unknown");
} catch (InvalidParameterException e) {
UnityPlayer.UnitySendMessage("SerialPort","ReviceData_s1", "串口绑定失败3");
DisplayError("error_configuration");
UnityPlayer.UnitySendMessage("SerialPort","ReviceData_s1", "获取攒口读写接口 "+pname);
//protected abstract void onDataReceived(final byte[] buffer, final int size);
private static Charset getDefaultCharset() {
String encoding = System.getProperty("file.encoding", "UTF-8");
return Charset.forName(encoding);
} catch (UnsupportedCharsetException e) {
return Charset.forName("UTF-8");
public void SendData(byte[] buffer, int size)
if (mOutputStream != null) {
mOutputStream.write(buffer,0, size);
//} catch (IOException e) {
} catch (Exception e) {
//UnityPlayer.UnitySendMessage("SerialPort","ReviceData_s1", "串口java发送失败3");
//e.printStackTrace();
public static String bytes2HexString(byte[] b, int len) {
String ret = "";
for (int i = 0; i & i++) {
String hex = Integer.toHexString(b[ i ] & 0xFF);
if (hex.length() == 1) {
hex = '0' +
ret += hex.toUpperCase();
public static String bytes2HexString2(byte[] b, int len) {
SendBuffer.delete(0, SendBuffer.length());
for (int i = 0; i & i++) {
String hex = Integer.toHexString(b[ i ] & 0xFF);
if (hex.length() == 1) {
hex = '0' +
SendBuffer.append( hex.toUpperCase());
return SendBuffer.toString();
protected void onDataReceived(byte[] buffer, int size) {
// ignore incoming data
if (mOutputStream != null) {
String sss= bytes2HexString2(buffer, size);
UnityPlayer.UnitySendMessage("SerialPort",unityFunction,sss);
//mOutputStream.write(buffer,0, size);
//UnityPlayer.UnitySendMessage("Main Camera","java_messgae","hi unity.this is java com msg.");
} //else {
//} catch (IOException e) {
e.printStackTrace();
//mOutputStream.write(buffer);
public void Destroy() {
if (mReadThread != null)
mReadThread.interrupt();
if (mSerialPort != null) {
mSerialPort.close();
mSerialPort =
* Copyright 2009 Cedric Priscal
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
package android_serialport_
import java.io.F
import java.io.FileD
import java.io.FileInputS
import java.io.FileOutputS
import java.io.IOE
import java.io.InputS
import java.io.OutputS
import android.util.L
public class SerialPort {
private static final String TAG = "SerialPort";
* Do not remove or rename the field mFd: it is used by native method close();
private FileDescriptor mFd;
private FileInputStream mFileInputS
private FileOutputStream mFileOutputS
public SerialPort(File device, int baudrate, int flags) throws SecurityException, IOException {
/* Check access permission */
if (!device.canRead() || !device.canWrite()) {
/* Missing read/write permission, trying to chmod the file */
su = Runtime.getRuntime().exec("/system/bin/su");
String cmd = "chmod 666 " + device.getAbsolutePath() + "\n"
+ "exit\n";
su.getOutputStream().write(cmd.getBytes());
if ((su.waitFor() != 0) || !device.canRead()
|| !device.canWrite()) {
throw new SecurityException();
} catch (Exception e) {
e.printStackTrace();
throw new SecurityException();
mFd = open(device.getAbsolutePath(), baudrate, flags,8);
if (mFd == null) {
Log.e(TAG, "native open returns null");
throw new IOException();
mFileInputStream = new FileInputStream(mFd);
mFileOutputStream = new FileOutputStream(mFd);
// Getters and setters
public InputStream getInputStream() {
return mFileInputS
public OutputStream getOutputStream() {
return mFileOutputS
private native static FileDescriptor open(String path, int baudrate, int flags,int min_byte);
public native void close();
System.loadLibrary("serial_port");
* Copyright 2009 Cedric Priscal
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
package android_serialport_
import java.io.F
import java.io.FileD
import java.io.FileInputS
import java.io.FileOutputS
import java.io.IOE
import java.io.InputS
import java.io.OutputS
import android.util.L
public class SerialPort {
private static final String TAG = "SerialPort";
* Do not remove or rename the field mFd: it is used by native method close();
private FileDescriptor mFd;
private FileInputStream mFileInputS
private FileOutputStream mFileOutputS
public SerialPort(File device, int baudrate, int flags) throws SecurityException, IOException {
/* Check access permission */
if (!device.canRead() || !device.canWrite()) {
/* Missing read/write permission, trying to chmod the file */
su = Runtime.getRuntime().exec("/system/bin/su");
String cmd = "chmod 666 " + device.getAbsolutePath() + "\n"
+ "exit\n";
su.getOutputStream().write(cmd.getBytes());[attach]150981[/attach][attach]150981[/attach]
if ((su.waitFor() != 0) || !device.canRead()
|| !device.canWrite()) {
throw new SecurityException();
} catch (Exception e) {
e.printStackTrace();
throw new SecurityException();
mFd = open(device.getAbsolutePath(), baudrate, flags,8);
if (mFd == null) {
Log.e(TAG, "native open returns null");
throw new IOException();
mFileInputStream = new FileInputStream(mFd);
mFileOutputStream = new FileOutputStream(mFd);
// Getters and setters
public InputStream getInputStream() {
return mFileInputS
public OutputStream getOutputStream() {
return mFileOutputS
private native static FileDescriptor open(String path, int baudrate, int flags,int min_byte);
public native void close();
System.loadLibrary("serial_port");
http://www.manew.com/thread--1.html
Unity 安卓下使用串口提示:System.DllNotFoundException: MonoPosixHelper的解决办法
Unity3D内部串口通信和Unity3D与Winform程序的串口通信的实现和异常问题
基于Unity串口通信的解决方案
unity基础开发----unity串口通信
Unity各种传输方式转串口COM端口的数据操作SerialPort类
没有更多推荐了,sp 做出来的几张贴图是贴max里还unity里?_unity吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:28,926贴子:
sp 做出来的几张贴图是贴max里还unity里?收藏
刚毕业的新人到处求职居然最后进的是一个新项目,负责我的是一个才学几个月的人,我做模型他不清楚弄引擎什么的,现在有问题了,我做了个次时代贴图,不知道是怎么给他用
登录百度帐号255 瀛﹀憳 璁插笀
涓嬫?涓}

我要回帖

更多关于 unity导入材质 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信